-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Amplify Datastore sync stops #6198
Comments
More details - the root cause here appears to be the Segment model, and, at a wild guess... the JSON object in locations This is... an array of locations, so is of variable size. GraphQL request
Response
|
Notes: the locations array is likely to be around 60 objects -> but could go as high as 150 objects. It's dependent on how fast you are travelling. :-) |
And... Seem to have fixed this issue by following instructions here: Adding this:
}) Seems to have worked around the current issue |
thanks @millarm for confirming. Closing this since the issue is resolved for you. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
Symptoms:
Amplify react native application that's is working reliably under test conditions, but when I use it for real it stops syncing.
It's an application that's for tracking location data, so testing requires getting up, and away from a desk!
Symptoms are:
App is working fine locally on device, but there is no sync to the backend from DataStore, so other clients don't get updated. No errors are logged, and there doesn't seem to be any API to force DataStore to sync.
First question is:
(Seems to be: Amplify.Logger.LOG_LEVEL = 'DEBUG'; which outputs debug logging. Can one enable logging for just DataStore?)
This is my schema:
With debug logging on it seems the error is caused by:
Util - attempt #9 with this vars: ["query operation($limit: Int, $nextToken: String, $lastSync: AWSTimestamp){\n\t\tsyncSegments(limit: $limit, nextToken: $nextToken, lastSync: $lastSync){\n\t\t\titems {\n\t\t\t\t\t\t\tid\njourneyID\nstartTime\nstartPosition\nendTime\nendPosition\nsensorData\nlocations\nowner\n_version\n_lastChangedAt\n_deleted\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnextToken\n\t\t\t\t\t\tstartedAt\n\t\t}\n\t}",{"limit":1000,"nextToken":null,"lastSync":0}]
I get an error logged (only with debug logging on)
errors: Array(1)
0:
data: null
errorInfo: null
errorType: "MappingTemplate"
locations: [{…}]
message: "Transformation too large"
path: Array(1)
0: "syncSegments"
length: 1
So... how do I go about establishing what's causing this, and fixing the issue?
The text was updated successfully, but these errors were encountered: