* 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?
@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.
thank you @elorzafe . That fixed the problem!
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
@vdiaza were you able to resolve the issue you were facing? I'm having a similar issue.
@adhikarisandeep not really. I ended up using the hosting provided by the amplify cli.
Most helpful comment
@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.