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

已提问 2 年前159 查看次数
没有答案

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则