How do I fix the error "DataStore - User is unauthorized"

1

React application when attempting to use any Datastore functions returns this warning in the console.

DataStore - subscriptionError Connection failed: com.amazonaws.deepdish.graphql.auth#UnauthorizedException DataStore - User is unauthorized to query syncFriendships with auth mode API_KEY. No data could be returned.

What is causing this error, how do I fix it, and get my app to where I can read and write data to the database? Note this backend works on a react native application. I have ran amplify pull and have all the changes locally. I am on day 7 of trying to fix this.

  • I have the same issue: My Expo project was working fine. After I installed TopTabNavigation my project got messed up. I started having issues with conflicting versions of dependencies specially for react-native-tab-view which I fixed with expo doctor --fix-dependencies, but then I got this error that I have not found in any forum yet: DataStore - User is unauthorized to query syncUsers with auth mode API_KEY. No data could be returned

    Can you help me? Thanks

preguntada hace 2 años159 visualizaciones
No hay respuestas

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas