-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 INTERNAL ASSERTION FAILED: value.has_value() Fatal crash on App Start #9985
Comments
Note: It seems as if there are operations pending that Firebase executes internally every time it opens (because I see the writes being done remotely), the error log also registered 100 errors from 1 person (me) in a short amount of this. I believe this can be related to a write operation that was repeatedly called inside a timer (this corrupting the internal state). |
Drive-by comment: It would be very helpful if you could symbolicate the stack trace. All of the That being said, the assertion message is luckily a bit helpful. The assertion check for
Tagging @wu-hui who may have some insights. |
Thanks for the report. This is likely a bug from a recent change. It looks like your app does not patch mutations on documents, there is a new change to try to squash those mutations, and somehow it ended up in a situation our code think is impossible to happen. Are you able to reproduce this locally? If not, can you try to examine your App's patch mutation usage, and see if you can create a local reproduction? |
Also experiencing this. It happened with i updated a document. The documented updated fine on firebase. When i run the app through xcode i get this, hopefully it mean more to you:
|
Hi @Theunodb It seems like you were able to reproduce this locally (your log seems to be from a simulator). Is it possible to share a minimum version of it, that is still able to reproduce this? |
I also started receiving reports about this after updating to the cloud_firestore 3.3.0 flutter package, which now contains Firebase iOS SDK to 9.2.0. Unfortunately, I am unable to reproduce this myself. Crash report from Xcode:
|
I don’t have a minimum version. But from what I can see is that i can read any document fine, and SET most of the documents fine. Only some SET puts the app in the broken state. I have to revert to a previous version on TestFlight on a real device, or clear the simulator completely to get the app running again. Otherwise it just crashes on startup. I can’t confirm 100% but it looks like whenever i set a document with merge = true, and i omit fields that had values in a previous SET, it crashes. Ex
Then in the same session i update the doc again, but this time like this:
I can’t reproduce this on android, its still happening on ios after today’s package updates |
Thanks @Theunodb I have tried what you suggested, and I still cannot reproduce it unfortunately. It seems like you are pretty close to a reproduction, do you mind helping us to try to isolate and reproduce this? We would appreciate your effort greatly! In the meanwhile, I'll keep trying to reproduce from my end. |
As another data point, note that another customer has reported this crash: #9874 (comment). However, they only saw the crash once and haven't seen it since. |
In my case, this happened after I moved the app to a background (Home button/Swipe up) for a short time, ~10 seconds maybe, and then opened it and immediately caught this crash. After restarting the application, everything was normal, that is, the app does not crash endlessly on start. |
I am also seeing a large number of my users reporting this issue. Only on iOS and with no pattern. I have tried so many things and cannot for the life of me reproduce it locally. The only work around I have found is to have them completely uninstall & reinstall my app. It then seems to go away for a while but eventually comes back. |
Hey folks, I have identified a potential fix: #10016 I am fairly confident this would fix the issues (maybe except igorvoytovich's issue, which seems to be a different one). Apologies for the troubles it caused, and thanks for all of you trying to reproduce it! @igorvoytovich I am not sure this will fix your problem, because it looks different. Please file a different issue if the fix does not help you. |
Hello @wu-hui , Thanks for the update. This fix will be included in 9.4.0 right? If so, could you please tell when approximately it should be released? |
@wu-hui Any word on when this fix will be released? It seems like a pretty impacting issue as there isn't much of a work around. Can it get fast tracked to get pushed out quickly somehow? |
9.4.0 is scheduled to release around Aug 2. The fix is in |
I also got the same issue on ver 7.1.0 of Firebase SDK. |
Describe your environment
Describe the problem
When the App gets into a certain state, it crashes on Start every time, even after App reinstall.
Steps to reproduce:
This is the error that Crashlytics reports.
Debug Console Log:
The text was updated successfully, but these errors were encountered: