-
Notifications
You must be signed in to change notification settings - Fork 249
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
DataStore is syncing with large delay #5458
Comments
Hi @olena1911, sorry to hear your data syncs are taking longer than on Android. This seems unexpected. Although I do not have experience with the decorators you are using, your plugin configuration looks okay. I would suggest trying to update to the latest version of Amplify DataStore, 2.4.1. If the problem persists, can you provide your schema and any logs from the delayed sync? |
Hi @Equartey , thanks for your reply. It's hard to catch related logs. I found something but I'm not sure if it's related. There is an attempt to make a mutation after adding data, but it fails
|
@olena1911 thanks for providing the error logs. have you been able to upgrade to latest version of Amplify DataStore and if this log message if from the latest version? Based on the logs it seems that the app can not fetch the auth token and so the mutation request to appsync is failing. In this case we should anticipate continuous sync failures rather than intermittent delays. can you please confirm if the logs are for the delayed sync issue and also provide your schema so that we can reproduce this issue? thanks. |
Hi, we have hit this issue with amplify_datastore v2.5.0 when the app is destroyed in the background on Android. This can be replicated using by enabling "Don't keep activities". When trying to update Datastore after the activity is re-created after being destroyed the "Failed to retrieve auth token from Cognito provider." exception occurs. |
@HarkerTech would you be able to share the error message you receive. would you please confirm if the user is authenticated and also if there is a network connection? |
Description
When I modify some entity in DataStore (either add a new one to the table or remove), the updates on the cloud are made with a delay (sometimes it's several minutes, sometimes it's up to several hours). Initial sync when DataStore is started is successful, but updates to the cloud takes more time than expected.
It seems that the problem is only on Android. From our experiments, iOS works fine.
Can it be a bug or some additional configurations should be made?
Categories
Steps to Reproduce
await _amplifyDataStore.start();
Screenshots
No response
Platforms
Flutter Version
3.22.2
Amplify Flutter Version
2.1.0
Deployment Method
Amplify CLI (Gen 1)
Schema
No response
The text was updated successfully, but these errors were encountered: