The following issues happened once a month. I hope AWS Engineers could fix it soon.
When I successfully log in then query the data by Flutter Amplify API
Amplify.DataStore.observeQuery(HomePageMediaModel.classType).listen((event) {
});
I always get the following error in Android with no data response.
For iOS with no explicit error and no data response.
"errorType":"UnauthorizedException","message":"You are not authorized to make this call.","errorCode":401
My solution is log in Amplify Studio select “Data”, find the data structure of HomePageMediaModel then add a random field (or call it “key”), then click the save and deploy button.
Then It works like magic.
网友评论