wild-rydes-mobile
wild-rydes-mobile copied to clipboard
"filter" error
Okay, so react-native branch, when you get sign-in finished and sign in, it directs to MainApp.js, where there's an error that pops up with filter being undefined or something. In the workshop, we commented out the hasAPI function and moved on. Inspecting awsconfig.js for aws_cloud_logic_custom, which filter is being run on, reveals that at this point because awsmobile cloud-api enable --prompt hasn't been run yet, there is no aws_cloud_logic_custom field.
Related: the getData and onPress methods are on the MainApp component, not in the home/HailRide component, which doesn't exist in the react-native project. Also, the button is written with onClick, rather than onPress.
Which gets us pretty far, but I still get:
MainApp.js:101 Error: Request failed with status code 500 at e.exports (createError.js:16) at e.exports (settle.js:18) at XMLHttpRequest.f.(/anonymous function) (http://wildrydesmobilenomfa-hosting-mobilehub-1749570465.s3-website.us-east-1.amazonaws.com/static/js/main.b3c7b4f2.js:1:374694)
(anonymous) | @ | MainApp.js:101 | |
---|---|---|---|
r | @ | runtime.js:62 | |
(anonymous) | @ | runtime.js:296 | |
e.(anonymous function) | @ | runtime.js:114 | |
r | @ | main.b3c7b4f2.js:76606 | |
(anonymous) | @ | main.b3c7b4f2.js:76606 | |
Promise.then (async) | |||
r | @ | main.b3c7b4f2.js:76606 | |
(anonymous) | @ | main.b3c7b4f2.js:76606 | |
(anonymous) | @ | main.b3c7b4f2.js:76606 | |
e | @ | main.b3c7b4f2.js:76631 | |
onClick | @ | MainApp.js:158 | |
i | @ | react-dom.production.min.js:15 | |
invokeGuardedCallback | @ | react-dom.production.min.js:16 | |
invokeGuardedCallbackAndCatchFirstError | @ | react-dom.production.min.js:16 | |
l | @ | react-dom.production.min.js:20 | |
f | @ | react-dom.production.min.js:22 | |
m | @ | react-dom.production.min.js:22 | |
d | @ | react-dom.production.min.js:21 | |
g | @ | react-dom.production.min.js:24 | |
v | @ | react-dom.production.min.js:24 | |
Le | @ | react-dom.production.min.js:82 | |
batchedUpdates | @ | react-dom.production.min.js:186 | |
Q | @ | react-dom.production.min.js:42 | |
Ke | @ | react-dom.production.min.js:84 | |
interactiveUpdates | @ | react-dom.production.min.js:187 | |
ze | @ | react-dom.production.min.js:83 |
I'd love to help further, I haven't debugged async code all that much though, and it will certainly be faster for someone with more experience to look through the onPress (onClick) method and see why it's catching. I think I'd done everything else right. Here's my repo, including modification to not use MFA, though you have to include a phone number ... because schema? Lot going on right then. You can get up and running this way if you don't have a phone to receive the MFA code, though.
https://github.com/Twitchkidd/wild-rydes-react-native-no-mfa
Oh also just noting, currently country code (+1) must be included for a valid phone number.
Thanks so much for throwing Mobile Week guys! It was a blast!