-
Notifications
You must be signed in to change notification settings - Fork 119
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.stop or DataStore.clear may interrupt DataStore.start #1690
Comments
Hi, any updates on this issue? I still have a problem with that. |
Any updates? |
I'll take a look at this issue. |
@wojciechzahradnikdeviniti can I ask what version of Amplify you're using? We've made a number of changes around this behaviour recently. |
@mattcreaser I used 1.3.0 - 1.3.3 flutter versions of the lib and this bug occurs there |
Flutter 1.3.3 uses Android 2.11.2. It's possible that #2551 addressed this issue in 2.11.3. I'll see if I am able to reproduce it in either version. |
This is reproducible in 2.11.3. The issue occurs because It appears from my testing that typically A simple fix is to set the |
This should be fixed in Amplify Android 2.12.0. Please note that the fix only addresses the use case of calling stop/clear and then start once: Amplify.DataStore.stop(
{
Amplify.DataStore.start(
{ Log.i("MyAmplifyApp", "DataStore started") },
{ Log.e("MyAmplifyApp", "Error starting DataStore", it) }
)
},
{ Log.e("MyAmplifyApp", "Error clearing DataStore", it) }
) It does not address possible issues that may arise with calling stop/clear and start multiple times each in a short timeframe. |
|
Before opening, please confirm:
Language and Async Model
Java
Amplify Categories
DataStore
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
Original amplify-flutter issue: aws-amplify/amplify-flutter#1479
Using the code example provided in this document.
the
start
process may be interrupted by theclear
call due to below errorIt looks like that the
onComplete
action provided to thestop
and theclear
APIs is not guaranteed to be executed afterstop
andclear
is completed finished.Reproduction steps (if applicable)
start
may fail (not 100% failing, but mostly)Code Snippet
// Put your code below this line.
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: