-
Notifications
You must be signed in to change notification settings - Fork 207
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 does not restart after toggle airplane mode off and on #2152
Comments
From #1901
So it appears that stopping DataStore is intentional to fix the issue in #1901. However, it is creating a different issue with subscriptions because it is waiting for an explicit DataStore operation (save/query/delete) to be called before restarting. I don't think there is a workaround for this other than to explicitly call DataStore start after connectivity is restored to the device. The problem is that I don't think there is an appropriate trigger to listen to. |
what we'd like to verify is that, turning airplane mode on will stop the sync process successfully. As @dpilch mentioned, DataStore is not reacting to network events to restart the sync process. The expectation, and what we'd like to verify, is that turning off airplane mode, then calling DataStore.start explicitly or performing a DataStore operation will put DataStore into a sync active state. |
We were able to verify that toggling the wifi off and then back on causes DataStore's sync process to stop. Toggling the wifi off first doesn't do anything, but when the wifi is toggled back on, the error is then sent to DataStore
DataStore then moves to a stopped state, it will not receive subscription events even though the network has already recovered. Calling DataStore.start does recover the system. The next steps for this is, how can we improve the time it takes for DataStore to recover? Can the sync process handle |
I'm going to mark this as a feature request to improve the network reachability client in iOS as a way to recovery faster if it is able to detect network issues. |
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you! |
Pending release on |
Both of the above PR are released, closing the ticket. Feel free to reopen the ticket or create a new one if you are still facing any issue. |
Describe the bug
The issue was originally reported in Discord. Customer states that this issue started appearing on iOS 15.6.
When using DataStore and airplane mode is switched to off and then back on DataStore will stop but not restart.
Appears to be related to #1901.
Steps To Reproduce
websocketDidReceiveMessage
message is not present in logsExpected behavior
DataStore should restart and reconnect.
Amplify Framework Version
1.28.0
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
5.6.1
CLI version
9.2.1
Xcode version
13.4.1
Relevant log output
Log Messages
Is this a regression?
Yes
Regression additional context
I haven't tested but customer states that this is new behavior in iOS 15.6.
Device
iPhone 11
iOS Version
15.6
Specific to simulators
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: