amplify-js: Auth SignUp auto send another request and throw Error: No credentials, applicationId or region
** Which Category is your question related to? **
Auth
** What AWS Services are you utilizing? **
Cognito
** Provide additional details e.g. code snippets **
I have 2 projects which are using the same code like this:
Auth.signUp({ username, password, attributes }).then(data => console.log(data)).catch(error => console.log(error)).finally(() => console.log('done'));
Just like this: https://aws-amplify.github.io/docs/js/authentication#sign-up
Here is the problem show out:
- In my old project, everything is ok, just 1 request is sign up send to AWS and got some data from it: https://cognito-idp.ap-southeast-2.amazonaws.com/
- In my new project, I have another request go to AWS after the sign up request. There are: https://cognito-idp.ap-southeast-2.amazonaws.com/ And : https://cognito-identity.ap-southeast-2.amazonaws.com/ which is after the first one and its response is :
message: “Unauthenticated access is not supported for this identity pool.” __type: “NotAuthorizedException”
After that, I got the error in console: Error: No credentials, applicationId or region.
Not sure why is the old project is working fine but with this one, this error show up. Is it because the different in amplify ?
Thanks.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 21
- Comments: 30 (5 by maintainers)
Disabling as per the docs fixed this for me.
This is still an issue, disabling the analytics is not the right solution. Are there any status updates on this? Did anyone figure out what’s causing it
The following solution is working for me. Have to manually disable Analytics when using with React Native:
Are you sure you have not imported the whole aws-amplify package?
@filipemcg oh oh oh. Thanks for the tip! using only
@aws-amplify/core@aws-amplify/authfixed the problem!we are not using analytics, but updating all imports like the following [no aws-amplify] solved the issue …
Run into same problem with new project
Above solutions not worked for me
I am using aws-amplify and aws-amplify-react-native
I’m experiencing the same issue but I’m not using
@aws-amplify/analytics.Can confirm that this works. Thanks!
I found the conditions that is causing the AWSPintpointProvider.ts error.
IF I import Analytics from ‘@aws-amplify/analytics’; even if I don’t use it at runtime ( in our project we call analytics.record only in production mode set by environment.prod.ts ) AND the JSON to Amplify.configure is missing the “Analytics” settings ( again we conditionally add the analytics json using Object.assign to add the analytics configs at runtime)
THEN the Uncaught exception will appear.
The exception start to appear today, an is likely because we upgraded to the latest amplify (stable) sometime this week.
versions details ( everything are the latest stable except TypeScript is at 3.4.5) “@aws-amplify/analytics”: “^1.2.17”, “@aws-amplify/api”: “^1.0.36”, “@aws-amplify/auth”: “^1.2.25”, “@aws-amplify/ui”: “^1.0.20”, “aws-amplify-angular”: “^3.0.4”,
Angular 8.0.3
In your configs:
identityPoolIdstarts fromi, NOT FROMI* (thanks for incorrect docs and examples)#3614 should prevent “Error: No credentials, applicationId or region.” from occurring when Analytics is not be used or configured.
I got it working by reverting
@aws-amplify/analyticsto1.2.16.I get the same error with react native after an update. aws-amplify@1.1.29 “react”: “16.8.3”, “react-native”: “0.59.9”,