Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught (in promise) Error: No credentials, applicationId or region at AWSPinpointProvider.js:349 #4824

Closed
WinstonN opened this issue Feb 1, 2020 · 19 comments · Fixed by #5629
Assignees
Labels
Analytics Related to analytics Auth Related to Auth components/category bug Something isn't working

Comments

@WinstonN
Copy link

WinstonN commented Feb 1, 2020

Fresh install of amplify with versions

    "aws-amplify": "^2.2.2",
    "aws-amplify-react": "^3.1.3",

Auth.signIn succeeds but throws console error

Uncaught (in promise) Error: No credentials, applicationId or region
    at AWSPinpointProvider.<anonymous> (AWSPinpointProvider.js:349)
    at step (AWSPinpointProvider.js:137)
    at Object.next (AWSPinpointProvider.js:67)
    at fulfilled (AWSPinpointProvider.js:19)

image
image

@WinstonN WinstonN added the to-be-reproduced Used in order for Amplify to reproduce said issue label Feb 1, 2020
@ashika01
Copy link
Contributor

ashika01 commented Feb 1, 2020

@WinstonN : Could you provide us with steps to reproduce this? How are you adding auth and analytics?

@ashika01 ashika01 added Analytics Related to analytics Auth Related to Auth components/category React React related issues pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. and removed to-be-reproduced Used in order for Amplify to reproduce said issue labels Feb 1, 2020
@laygir
Copy link

laygir commented Feb 8, 2020

I'm having a similar problem in a Vue project with the following packages

"@aws-amplify/analytics": "^2.2.4",
"@aws-amplify/auth": "^2.1.5",

@stale stale bot removed the pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. label Feb 8, 2020
@WinstonN
Copy link
Author

WinstonN commented Feb 8, 2020

@ashika01

Steps to reproduce

  1. npm install aws-amplify aws-amplify-react
  2. Create IAM user with policy https://aws-amplify.github.io/docs/cli-toolchain/usage#iam-policy-for-the-cli
  3. amplify configure
  4. amplify init
  5. amplify auth add
  6. amplify push
  7. add amplify
// amplify
import AmplifyAuth from '@aws-amplify/auth';
  1. use code here for signIn https://aws-amplify.github.io/docs/js/authentication#sign-in

Console error will be produced

@stale
Copy link

stale bot commented Mar 16, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. label Mar 16, 2020
@ashika01 ashika01 added to-be-reproduced Used in order for Amplify to reproduce said issue and removed pending-close-response-required A response is required for this issue to remain open, it will be closed within the next 7 days. labels Mar 16, 2020
@ashika01
Copy link
Contributor

@WinstonN : could you check if your policy is properly linked to your auth accounts in console? we will work on reproducing this.

@nihp
Copy link

nihp commented Apr 29, 2020

I am also facing the same issue. But I am using aws-amplify-react-native

"aws-amplify": "^2.2.5",
"aws-amplify-react-native": "^3.2.2",

@gmfinear
Copy link

@nihp I am also using aws-amplify-react-native and experiencing this issue

@ashika01
Copy link
Contributor

@gmfinear what versions are you using?

@ashika01
Copy link
Contributor

Could anyone try with the latest versions? and let me know if it still an issue?

"aws-amplify": "3.0.9",
"aws-amplify-react-native": "4.1.0",

@gmfinear
Copy link

@ashika01
"aws-amplify": "^3.0.8",
"aws-amplify-react-native": "^4.0.4",

@ashika01
Copy link
Contributor

@gmfinear : Would it possible to share some code? Also, what are using analytics category for?

@gmfinear
Copy link

@ashika01 My code is superrr simple right now... I basically just ran expo init, and then followed instructions from https://aws-amplify.github.io/docs/js/tutorials/building-react-native-apps/ all the way up through Add Auth / User Sign-in.
Screen Shot 2020-04-29 at 3 54 17 PM

@ashika01
Copy link
Contributor

ashika01 commented Apr 29, 2020

@gmfinear Let me just reproduce this.

Are you configuring with default configuration in amplify add auth?

@ashika01 ashika01 self-assigned this Apr 29, 2020
@ashika01
Copy link
Contributor

@gmfinear : I just followed the same steps. In my case its just a warning. Nevertheless, it shouldn't be happening. Will do some investigation

@gmfinear
Copy link

@ashika01 it's just a warning for me too, but really annoying :( thank you for investigating!!

@ashika01 ashika01 added bug Something isn't working and removed React React related issues to-be-reproduced Used in order for Amplify to reproduce said issue labels Apr 30, 2020
@ashika01
Copy link
Contributor

@nihp @gmfinear This seems to be a bug in react-native. I have opened up the PR #5629

@WinstonN - we have moved into new UI components. Please open a new issue if you are facing this issue with the new component. Docs - https://docs.amplify.aws/ui/auth/authenticator/q/framework/vue

@sanyashvets
Copy link

sanyashvets commented May 8, 2020

#3484 (comment) worked for me

@SJI-ParthaSarathi
Copy link

SJI-ParthaSarathi commented Apr 1, 2021

I am getting this error! Is there anyone help me out please!

Unhandled Runtime Error
Error: No credentials

Call Stack
GraphQLAPIClass.eval
node_modules/@aws-amplify/api-graphql/lib-esm/GraphQLAPI.js (193:0)
step
node_modules/@aws-amplify/api-graphql/lib-esm/GraphQLAPI.js (43:0)
Object.eval [as next]
node_modules/@aws-amplify/api-graphql/lib-esm/GraphQLAPI.js (24:44)
fulfilled
node_modules/@aws-amplify/api-graphql/lib-esm/GraphQLAPI.js (15:41)

@github-actions
Copy link

github-actions bot commented Apr 2, 2022

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Analytics Related to analytics Auth Related to Auth components/category bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants