You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every time the app starts, DataStore performs a full sync, even though no changes have been made to the local or remote data. The expectation is that after the initial sync, subsequent app starts should not fetch the same updates again if no modifications have been made. I'm not sure if I'm missing some configs. I setup everything according to the docs. Hope someone can help.
Expected behavior
I receive these kind of logs on every app start LOG modelSynced: {"isFullSync":true,"isDeltaSync":false,"counts":{"new":0,"updated":21,"deleted":0}}
After the second start I would expect the counts to be zero
Reproduction steps
Initialize Amplify and DataStore with the following configuration:
I've noticed that this only happens on the simulator for some reason. When testing the app on a real device, it works as expected. Is it a known issue that the simulator behaves this way?
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
DataStore
Amplify Version
v6
Amplify Categories
auth
Backend
Amplify CLI
Environment information
Describe the bug
Every time the app starts, DataStore performs a full sync, even though no changes have been made to the local or remote data. The expectation is that after the initial sync, subsequent app starts should not fetch the same updates again if no modifications have been made. I'm not sure if I'm missing some configs. I setup everything according to the docs. Hope someone can help.
Expected behavior
I receive these kind of logs on every app start
LOG modelSynced: {"isFullSync":true,"isDeltaSync":false,"counts":{"new":0,"updated":21,"deleted":0}}
After the second start I would expect the counts to be zero
Reproduction steps
Initialize Amplify and DataStore with the following configuration:
Observe that every app start triggers a full sync:
LOG modelSynced: {"isFullSync":true,"isDeltaSync":false,"counts":{"new":0,"updated":21,"deleted":0}}
Confirm that local DataStore already contains the same data as observed in the sync event.
Disable cloud sync and inspect the local database; the same records that are being "updated" on each start are already present.
Code Snippet
My schema in my amplify backend
How I persist the data locally:
How I setup the listeners. The hook is only called once on app start in my layout.tsx.
restartSync
is only called on a relogin.Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
Iphone 15 Pro (Simulator)
Mobile Operating System
iOS 17.5
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: