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

GraphQLError: Request failed with status code 401 #2783

Closed
V1j1 opened this issue Mar 1, 2019 · 6 comments
Closed

GraphQLError: Request failed with status code 401 #2783

V1j1 opened this issue Mar 1, 2019 · 6 comments

Comments

@V1j1
Copy link

@V1j1 V1j1 commented Mar 1, 2019

** Which Category is your question related to? **
Amplify graphql react-native
** What AWS Services are you utilizing? **
Amplify
** Provide additional details e.g. code snippets **
My code was working perfectly fine for weeks and today all of a sudden I am getting this error:
Opening exp://127.0.0.1:19000 in iOS simulator
error: Object {
"data": Object {},
"errors": Array [
[GraphQLError: Request failed with status code 401],
],
}

I am new to aws amplify, graphql and react-native etc so my troubleshooting skills are limited. So far, I have regenerated the aws access key, secret key. My graphql schema exists in my aws account. I am using API key authentication for AppSync and key, API endpoint looks correct in aws-exports.js.

Any other ideas for troubleshooting?

@elorzafe

This comment has been minimized.

Copy link
Contributor

@elorzafe elorzafe commented Mar 1, 2019

@V1j1 your api key should be expired, you can go to AWS AppSync console to create a new one and you will need to update that key on your aws-exports file/amplify config as well.

@V1j1

This comment has been minimized.

Copy link
Author

@V1j1 V1j1 commented Mar 1, 2019

thank you @elorzafe . That fixed the problem!

@V1j1 V1j1 closed this Mar 1, 2019
@vdiaza

This comment has been minimized.

Copy link

@vdiaza vdiaza commented Oct 23, 2019

Hi I am having the same issue, but only with my deployed site.
When I work on my local I have no issue.

Is there any extra configuration that needs to be done after deploying the app through amplify?
I am currently deploying through the AWS Amplify console through bitbucket.

I noticed that aws-exports.js file is automatically ignored by .gitignore file. could that be the reason of this error? the login feature with incognito works fine though.

Thanks

@adhikarisandeep

This comment has been minimized.

Copy link

@adhikarisandeep adhikarisandeep commented Nov 10, 2019

@vdiaza were you able to resolve the issue you were facing? I'm having a similar issue.

@vdiaza

This comment has been minimized.

Copy link

@vdiaza vdiaza commented Nov 10, 2019

@adhikarisandeep not really. I ended up using the hosting provided by the amplify cli.

@deanbarrow

This comment has been minimized.

Copy link

@deanbarrow deanbarrow commented Nov 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.