-
Notifications
You must be signed in to change notification settings - Fork 875
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
Firestore breaks on mobile safari if network is lost while app is in the background. #3495
Labels
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
I have actually seen this locally as well. "The database connection is closing" is however thrown at a strange layer in our code, and so the work I have done to recover from IndexedDB errors doesn't help here. I need to see if I can figure out how to change our recovery logic to apply here as well. |
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[REQUIRED] Describe your environment
iOS 13.6
"Mozilla/5.0 (iPad; CPU OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148"
)7.16.0
(also present on7.17.1
)firestore
[REQUIRED] Describe the problem
We have a multi page Cordova app which uses Firestore with persistence enabled. It issue happens when users navigate about a few pages and then put the app in the background and toggle their wifi on and off. Then when users bring the app to the foreground firebase finds itself in some inconsistent state and cannot be used until users reload the page.
This could potentially be related to :
#2710
And this
#2755
Even though all PRs in @schmidt-sebastian comment in the link above have been merged we're still experiencing the issue.
Steps to reproduce:
With our production app we can consistently recreate it with the following steps:
This seems to be important as we could not recreate it while being on the same screen. However it is not important which few screens we navigate to as we could reproduce the same error navigating between any two screens. I will add that that before leaving each of the screens (before runtime is destroyed) we destroy firebase app to release resources and then reinitialise it on the following screen.
Debug enabled log output shows starts at the time just before app is put to background, then toggling wifi on and off in the settings and ends after the app has been resumed:
If the issue is already being addressed on some other ticket/tracker, please let us know.
As this is our production app you would understand our keenness to get to the bottom of it
Thanks!
EDIT:
This only seems to happen with persistence enabled.
Also it seems older iOS versions are not affected. Tested on iOS 12.4.1 with no issues.
The text was updated successfully, but these errors were encountered: