ionic-team / ionic2-starter-aws Goto Github PK
View Code? Open in Web Editor NEWIonic + AWS MobileHub Starter Project
Ionic + AWS MobileHub Starter Project
Trying to start the aws project for the first time. When I ran the following on the CLI I got a failure:
> ionic start myApp aws
โ Creating directory ./choreman-aws - done!
[INFO] Fetching app base (https://github.com/ionic-team/ionic2-app-base/archive/master.tar.gz)
โ Downloading - done!
[INFO] Fetching starter template aws (https://github.com/ionic-team/ionic2-starter-aws/archive/master.tar.gz)
โ Downloading - done!
โ Updating package.json with app details - done!
โ Creating configuration file ionic.config.json - done!
[INFO] Installing dependencies may take several minutes!
> yarn install --non-interactive
โ Running command - done!
> yarn add --dev --exact --non-interactive @ionic/cli-plugin-ionic-angular@latest
โ Running command - failed!
[ERROR] An error occurred while running yarn add --dev --exact --non-interactive @ionic/cli-plugin-ionic-angular@latest
(exit code 1):
yarn add v0.21.3
error Missing list of packages to add to your project.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
In the readme we have 'copy the bucket name that contains contentdelivery.'. This naming convention no longer exists in AWS. We need to select either 'hosting' or 'streaming'.
As a consequence it's not possible to find the aws-config.js file.
R
In AWS's official site the command they recommend to use is
pip install --upgrade --user awscli
http://docs.aws.amazon.com/cli/latest/userguide/installing.html
I cannot install until I add the --upgrade
tag. Maybe this is worth noting in the README file.
I get "this.isAuthenticated is undefined" after login and "this.refreshTasks" is undefined after adding a task. To fix my local copy, I changed the callback to a typescript fat arrow in user.ts line 36 and tasks.ts line 78.
I have the project integrated into my own project with little difficulty. It works well.
However, when I switch to federated login, I get a user does not exist error.
Any help on this one would be appreciated
From @ndnparis on October 18, 2017 15:12
Ionic version: (check one with "x")
(For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)
[ ] 2.x
[x] 3.x
[ ] 4.x
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/
Current behavior:
Got the following error when run the app on Android Device Samsung S4
Ionic Native: deviceready event fired after 15027 ms vendor.js:114769
accepted session main.js:1079
you are authenticated! main.js:853
ERROR
Error {rejection: TypeError, promise: t, zone: r, task: e}
vendor.js:1377
defaultErrorLogger vendor.js:1377
ErrorHandler.handleError vendor.js:1437
IonicErrorHandler.handleError vendor.js:113943
onError.subscribe.next vendor.js:4860
schedulerFn vendor.js:3992
SafeSubscriber.__tryOrUnsub vendor.js:32731
SafeSubscriber.next vendor.js:32678
Subscriber._next vendor.js:32618
Subscriber.next vendor.js:32582
Subject.next vendor.js:37568
EventEmitter.emit vendor.js:3978
(anonymous function) vendor.js:4269
t.invoke polyfills.js:3
r.run polyfills.js:3
NgZone.runOutsideAngular vendor.js:4201
zone._inner.zone._inner.fork.onHandleError vendor.js:4269
t.handleError polyfills.js:3
r.runGuarded polyfills.js:3
(anonymous function) polyfills.js:3
n.microtaskDrainDone polyfills.js:3
o polyfills.js:3
e.invokeTask polyfills.js:3
i.isUsingGlobalCallback.invoke polyfills.js:3
n
Expected behavior:
Steps to reproduce:
Get started with the following Ionic AWS Starter
$ ionic start myApp aws
$ ionic cordova platform add android
$ ionic cordova build android
Related code:
Other information:
Ionic info: (run ionic info
from a terminal/cmd prompt and paste output below):
insert the output from ionic info here
cli packages: (/home/develop/.npm-packages/lib/node_modules)
@ionic/cli-utils : 1.13.1
ionic (Ionic CLI) : 3.13.1
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.0.0
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.7.1
System:
Node : v8.7.0
npm : 5.4.2
OS : Linux 3.10
Misc:
backend : pro
_Copied from original issue: ionic-team/ionic#13176_
On the accounts page the Change Photo button doesn't seem to work on Android (or web). Have not tested on Apple.
Hi, when running the aws-starter-kit I get this error message, 'CredentialsError: Missing credentials in config' when trying to view or add a Task. The full error message is as follows,
CredentialsError: Missing credentials in config
Stack trace:
handleRequest/<@http://localhost:8100/assets/aws-sdk.min.js:40:14371
f</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:9956
onInvokeTask@http://localhost:8100/build/vendor.js:4499:28
f</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:9869
c</r.prototype.runTask@http://localhost:8100/build/polyfills.js:3:5124
t/this.invoke@http://localhost:8100/build/polyfills.js:3:10938
I did not modify the code apart from downloading the aws-config.js file. The auth process seems to work fine in that I can create a user profile and then log in. The Task window remains blank, however. I get the same error message when trying to add a task. I appreciate any help you can give me on this!
When I try to login, the error "this.isAuthenticated is not a function" pops up. On reload, the authentication works perfectly fine.
Is there any examples to implement Facebook and Google login?
I get this even after installing
pip install awscli
I'm using python 3. Is that why?
What is the solution
Hi, I have faced this issue after sign up an account and manage to sign in. I was trying to create a new task, however it shows that the identity has no permission in doing that. The error is as below. May I know how to add the permission policy for this?
Error: User: arn:aws:sts::831509325306:assumed-role/mobilehubproject_auth_MOBILEHUB_1218068470/CognitoIdentityCredentials is not authorized to perform: dynamodb:Query on resource: arn:aws:dynamodb:ap-northeast-1:831509325306:table/ionic-mobile-hub-tasks/index/DateSorted
Hi,
Exception occured while copying the configuration file aws-config.js.
minaz@minaz-desktop:~/myApp$ aws s3 cp s3://mobilehubproject-hosting-mobilehub-1949489024/aws-config.js src/assets
Invalid endpoint: https://s3.US_EAST_1.amazonaws.com
minaz@minaz-desktop:~/myApp$
I followed all the steps smoothely without any exception and all works perfectly.But dont know y I face this exception in this step.
Can anyone have the solution?
Please help me to solve this.
When i try log into the application i get this error. What should i do?
Hi,
I did not understand what to replace WEBSITE_BUCKET
in the following command:
aws s3 cp --recursive ./www s3://WEBSITE_BUCKET
if someone can show me an example
Hi,
My app with starter kit runs well both in browser and Android tablet during development.
When I try to build prod release by ionic cordova build android --prod --release
, error like below appears.
I assume the error roots from here IonicModule.forRoot(MyApp, new AwsConfig().load())
in app.module.ts
Thanks,
Xi
Error: Error encountered resolving symbol values statically. Calling function 'AwsConfig',
function calls are not supported. Consider replacing the function or lambda with a reference to an exported function,
resolving symbol AppModule in app.module.ts, resolving symbol AppModule
Hi,
After getting the fb accesstoken I do this ->
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
IdentityPoolId: aws_cognito_identity_pool_id,
Logins: { 'graph.facebook.com': response.authResponse.accessToken}
}, {
region: aws_cognito_region
});
AWS.config.credentials.get(function(e){
console.log(e);
resolve();
});`
I takes a very long time (almost 1 minute) to give me the following the error ->
Error: Missing required key 'IdentityId' in params code:"MissingRequiredParameter" message:"Missing required key 'IdentityId' in params" name:"MissingRequiredParameter" stack:"MissingRequiredParameter: Missing required key 'IdentityId' in params\n at constructor.fail (http://localhost:8000/assets/aws-sdk.min.js:41:23483)\n at constructor.validateStructure (http://localhost:8000/assets/aws-sdk.min.js:41:23693)\n at constructor.validateMember (http://localhost:8000/assets/aws-sdk.min.js:41:24069)\n at constructor.validate (http://localhost:8000/assets/aws-sdk.min.js:41:23139)\n at constructor.<anonymous> (http://localhost:8000/assets/aws-sdk.min.js:41:957)\n at constructor.callListeners (http://localhost:8000/assets/aws-sdk.min.js:42:27867)\n at constructor.emit (http://localhost:8000/assets/aws-sdk.min.js:42:27578)\n at constructor.emitEvent (http://localhost:8000/assets/aws-sdk.min.js:42:13684)\n at constructor.e (http://localhost:8000/assets/aws-sdk.min.js:42:9341)\n at a.runTo (http://localhost:8000/assets/aws-sdk.min.js:44:5201)" time:Wed Jul 05 2017 07:13:26 GMT+0200 (CEST) {}
I already updated the aws-sdk to the latest one but still the same error. Furthermore the login via email works but its slow like hell. Any advise or help?
in src/providers/user.ts
, I had to change the way that the callback functions are declared in order to get the a this
which refers to a User object, or else the call to this.isAuthenticated
fails.
- 'onSuccess': (result) => {
+ 'onSuccess': function(result) {
- 'onFailure': (err) => {
+ 'onFailure': function(err) {
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 2.0.0
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : browser 4.1.0
Ionic Framework : ionic-angular 3.5.0
System:
Node : v7.10.0
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : not installed
ios-sim : not installed
npm : 4.2.0```
This is a problem my team has experienced for some time (before this repo was created). From what I understand the encryption done by the cognito/aws (not sure which one) sdk doesn't play nice with the JavaScriptCore. Executing a login or register will hang for up to 15-20 seconds on older ios devices.
I get that it's not an ionic problem but I'd be interested in hearing workarounds or ideas from others.
I am trying to import the zip in my aws account but I have the message
Unable to create Amazon S3 bucket for deployment artifacts. You have attempted to create more buckets than allowed (Service: Amazon S3; Status Code: 400; Error Code: TooManyBuckets; Request ID:
Could anybody help me what it means ?
Hi,
I have Runtime Errors like "this.isAuthenticated is not a function" and "this.refreshTasks is not a function" ???
Any idea ?
Could you add Facebook and Google login auth ?
Hi - thanks for this. One quick note, when I got to this step:
aws s3 cp s3://BUCKET_NAME/aws-config.js src/assets
I got an error, "fatal error: Unable to locate credentials"
The solution is to run "aws configure" and provide an AWS access key ID and secret (obtained from IAM). Some users may already have done this, but since this guide walks them through installing the AWS CLI it seems geared toward those who won't have so it might be worth a mention.
Hello,
The project is working fine, but what about the offline capabilities ?
AWS docs say its SDKs allow offline capabilities, but I made some tests running the app in the browser with ionic serve and cutting the wi-fi, and I've got obviously this error :
POST https://dynamodb.eu-west-1.amazonaws.com/ net::ERR_INTERNET_DISCONNECTED
I didn't find a very clear answer neither on the web, nor in AWS docs.
Thank you for you help.
I attempted to upload the project config file (mobile-hub-project.zip) and received this error:
The security token included in the request is invalid. (Service: AWSCognitoIdentityProvider; Status Code: 400; Error Code: UnrecognizedClientException; Request ID: 78d893a4-6cd6-11e7-bbed-5d0ccbc06132)
I don't see this listed in the yml file but assume it's related to the sign-in config. Is this a permissions issue?
Receive an error running the ionic serve. webpackjsonp is not defined stack trace /build/main.js 1:1
Tokens doesn't match every second login .AWS.config.credentials.identityId is "unknown".
After successful login, AWS.config.credentials.identityId seems undefined. I realize that an issue but I don't know how can I handle:
First login: Old user identityId
Second login: Empty user
Third login: Correct id
It can be related with missing credentials in config issue but the solution in issue is not worked for me. It causes always undefined id.
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.