Closed dragosiordachioaia closed 1 year ago
May possibly be fixed by this PR. Testing with the latest release.
@david-mcafee I already have that change and unfortunately it doesn't fix it. I've even tried to make a fork of the DataStore repo to completely remove code that dequeues items and all that resulted in was DataStore kept retrying the item forever, with DynamoDB returning the same error.
I've just realised that the "Unrecoverable DataStore error" message is a log I had added to my own code, but that doesn't change the underlying issue. Just putting this here because it's probably confusing to see that error message in the issue description, since the wording isn't actually coming from within DataStore itself.
@dragosiordachioaia We're seeing this from at least one other customer as well. But, any additional information you can provide would be very helpful.
Is there any chance you can provide scrubbed request and response bodies for me to look at?
Hi @dragosiordachioaia and @jameswillis99 👋 We haven't been able to reproduce this issue with the reproduction steps given on the latest version of aws-amplify
. Going to close this as stale, but if you are experiencing this issue please let us know or provide any additional context/info you might've gathered since. We can re-open this issue once we have more information.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
DataStore
Amplify Categories
auth, api
Environment information
Describe the bug
Creating items in DataStore fails if there is bad connectivity. When it comes to the availability of the internet connection, there are 3 main scenarios:
In short, if a "create" mutation has already started processing and then it fails for a network-related reason and then the internet connection goes offline altogether, when the connection returns, there is an
Unrecoverable DataStore error
message from DataStore with aConditionalCheckFailedException
coming from DynamoDB. At this point, the mutation is removed from the queue and it never gets retried, which means that item is never going to be properly synchronised.I've looked in DynamoDB and the item does get created, which explains the
ConditionalCheckFailedException
we get back.Expected behavior
If there is spotty connectivity, I expect that when good connectivity is re-established, DataStore would perform a sync that lets it know the item has actually been successfully synchronised, which should make it update its local database with the correct state.
Reproduction steps
Unrecoverable DataStore error
message from DataStore with aConditionalCheckFailedException
coming from DynamoDB.updatedAt
field.Code Snippet
Log output
No response
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response