-
Notifications
You must be signed in to change notification settings - Fork 160
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
1.13.0 Enabling/disabling Firestore network causes a crash on iOS #552
Comments
Might be related to #551 |
Might be related to #554 |
Do you add a failing test for this? Or a minimal reproducer to this issue? |
@nbransby here is a minimal reproducer repo: The usage is here: https://bitbucket.org/kaidotarma/firestore_example/src/5f1bf79a42e34a4c706d4221350048a5ea282f9a/shared/src/commonMain/kotlin/App.kt#lines-32 Last commit has the crash enabled: https://bitbucket.org/kaidotarma/firestore_example/commits/5f1bf79a42e34a4c706d4221350048a5ea282f9a Android works with both versions 1.12.0 and 1.13.0. Error: |
+1 Also seeing this error on iOS. But not on Android |
Looks like the same issue happens with terminate() and clearPersistence(). Updated the sample project to include these functions. PS: clearPersistence() is expected to fail (with another error) if we don't run terminate() before that - but currently receives the same error. |
@nbransby Bump :) |
Could be, I'll have a look asap |
@kaidotarma can you share a minimum reproducible code. Enablling/disabling the network works fine for me in a test case. The only reason I can see it not working is if you apply settings after changing the network state. This would probably not have crashed in 1.12 or lower, but that was actually hiding the settings not being applied at all. |
@Daeda88 did you try running: https://bitbucket.org/kaidotarma/firestore_example/src/master/ |
Missed that, lets have a look |
Okay, I understand the problem, trying to get a fix asap. |
#562 should fix it I expect |
Looks like version 1.13.0 created a new issue where:
Firebase.firestore.enableNetwork()
or
Firebase.firestore.disableNetwork()
would cause an app to crash:
*** Terminating app due to uncaught exception 'FIRIllegalStateException', reason: 'Firestore instance has already been started and its settings can no longer be changed. You can only set settings before calling any other methods on a Firestore instance.'
The reason seems to be that firestoreSettings gets recreated when this function is called.
This was not an issue in version 1.12.0.
The issue does not reproduce in Android app (1.13.0).
The text was updated successfully, but these errors were encountered: