amazon-archives / wild-rydes-mobile Goto Github PK
View Code? Open in Web Editor NEWLearn serverless mobile cloud computing with this fictional unicorn ride-sharing app.
License: Apache License 2.0
Learn serverless mobile cloud computing with this fictional unicorn ride-sharing app.
License: Apache License 2.0
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!
I get this error when following the beginning section of the intro-to-aws-mobile branch.
backend awsmobile project unknown
I followed the steps exactly and this is what it produces. I should also mention that I wasnt given the opportunity to name the project in the init step, it skipped over it and named it as you see below.
spadg@DESKTOP-DADGJRU MINGW64 ~/WebDevelopment/00-Projects/Local/Learn AWS
$ create-react-app aws-mobile-react
Creating a new React app in C:\Users\spadg\WebDevelopment\00-Projects\Local\Learn AWS\aws-mobile-react.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
> [email protected] postinstall C:\Users\spadg\WebDevelopment\00-Projects\Local\Learn AWS\aws-mobile-react\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
+ [email protected]
+ [email protected]
+ [email protected]
added 1318 packages from 810 contributors and audited 14279 packages in 27.409s
found 0 vulnerabilities
Success! Created aws-mobile-react at C:\Users\spadg\WebDevelopment\00-Projects\Local\Learn AWS\aws-mobile-react
Inside that directory, you can run several commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd aws-mobile-react
npm start
Happy hacking!
spadg@DESKTOP-DADGJRU MINGW64 ~/WebDevelopment/00-Projects/Local/Learn AWS
$ cd aws-mobile-react/
spadg@DESKTOP-DADGJRU MINGW64 ~/WebDevelopment/00-Projects/Local/Learn AWS/aws-mobile-react
$ awsmobile configure
configure aws
? accessKeyId: my-access-key-went-here
? secretAccessKey: my-secret-access-key-went-here
? region: us-west-1
spadg@DESKTOP-DADGJRU MINGW64 ~/WebDevelopment/00-Projects/Local/Learn AWS/aws-mobile-react
$ awsmobile init
Please tell us about your project:
? Where is your project's source directory: src
? Where is your project's distribution directory that stores build artifacts: build
? What is your project's build command: npm.cmd run-script build
? What is your project's start command for local test run: npm.cmd run-script start
? What awsmobile project name would you like to use: (aws-mobile-react-2018-07-21-18-33-10)
spadg@DESKTOP-DADGJRU MINGW64 ~/WebDevelopment/00-Projects/Local/Learn AWS/aws-mobile-react
$ awsmobile console
backend awsmobile project unknown
Unlike the other unicorn app, I dont see any mention of the word unicorn after the title
I dont see any ride-share CRUD
I see some pet db stuff
Some screenshots as in the other app would have been nice.
@@ -159,7 +159,7 @@ confirmsignIn = () => {
Once the user is logged in, we want to be able to check AsyncStorage to see if the user is still available, and if so autmoatically log them in.
-To do so, we can call Auth.currentAuthenticatedUser
, and if this call returns successfully we can log them in automratically:
+To do so, we can call Auth.currentAuthenticatedUser
in src/auth/Home.js, and if this call returns successfully we can log them in automratically:
// import Auth from amplify in imports
I tried configuring cloud-api. but I am getting following CORS errors.
when I try API.get()
method.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://xxxx.execute-api.eu-west-1.amazonaws.com/Development/pet. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
any idea how to fix this ?
The command awsmobile publish -c -n -f
is incorrect as awsmobile publish does not seem to recognize the -n flag.
awsmobile publish -c -f
works fine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.