-
Notifications
You must be signed in to change notification settings - Fork 4k
🐛 [Cloud_Firestore] Multiple crashes on 3.1.7: Fatal Exception: java.lang.RuntimeException Internal error in Cloud Firestore (24.0.1). #7988
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
Comments
@KubaStachecki
|
Similar / related: #7985 |
Hi! Yes, both settings are already in the code:
|
We also witnessed extreme crash repetition, frequency and growth with cloud_firestore release 3.1.7. We immediately rolled back to cloud_firestore 3.1.6 and firebase_core 1.11.0. We witnessed 6 new crash types (including the one mentioned above by @KubaStachecki). We can provide trace stacks of these, if desired. We could not produce these errors in debug / during manual QA prior to production roll-out (Unfortunately we aren't using Firebase Test Labs at this time), and as a result, discovered these crashes when customers starting calling, and alarms ringing. Reverting to prior release of firestore and firebase_core removed all 6 crash types from our crashalytics, and we have been running crash free (Aside from the TransactionStreamHandler crash fixed in firestore 3.1.7) for 3 days now on the reverted release. The only thing changed between the trouble crash production release and the reverted release were library increments on cloud_firestore and firebase_core. Every one of the new 6 crashes have to do with a blame frame matching "io.grpc.internal.***". We witnessed these crashes in production primarily on Android 11 and the Motorola G Fast, though other phones experienced the crashes as well. We can provide additional details if desired. |
Looking at the crash log, it seems to be related to native Android sdk. See below issues from that repo for your reference: firebase/firebase-android-sdk#382 But I'll keep it open for further insights from the team. |
Similar crash report from |
Hey @KubaStachecki, the The other change made in The stack trace leads me to believe the firebase android sdk might have a bug (or requires further gradle config). Not sure if you're able to override the Firebase BOM to |
Hmmm, actually, I do see the Firestore transaction handler invoked in this line:
So it probably is the change to the transaction handler 🤔. |
Unfortunately I can't reproduce this crash locally so far, so I can't test this 29.0.4 - 3.1.6 scenario, but I can confirm that crashes disappeared after returning dependencies to firebase_core: 1.11.0 and cloud_firestore: 3.1.6 - thank you @bswhite1 ! |
Yes, I think it is probably the transaction update causing the problem so I will get this remedied in the next release 👍 |
i am facing the same issue in release mode. I know we can resolve this problem by 'shrinkResources false minifyEnabled false' |
I got the same problem in development environment using cloud_firestore 3.1.7 and firebase_core 1.12.0, it causes my app crash every time I open it. Workaround: Hope it will be fixed soon. |
In my case it is not working even with same version of cloud_firestore 3.1.6 and firebase_core 1.11.0 with minifyEnable true ...hope it will fix soon ..minifyEnable false is not even proper solution |
Could you rollback the TransactionStreamHandler fix from 3.1.7 until this is resolved? That way we can get the other updates available. |
After internal conversations and reviewing the stack trace, we're not convinced this problem originates from FlutterFire. @mk-dev-1 & @pranavo72bex have confirmed the rollback did not make a difference for them. We also note that the stack trace is made almost entirely from the native android SDK and its dependencies. The current implementation also solves a previous transaction bug. for these reasons, we're holding back on any implementation reversal. If someone could provide a reproducible sample, I'd be very grateful. That way we'd be able to diagnose the problem and get it solved. |
DID you try to test the firebase package with minifyEnabled true??
|
Yes, tried both: shrinkResources & minifyEnabled on and off. It if is off, everything's working perfectly and it is a proposed solution for this error in other threads. However, I would not consider this a real solution.... There is a related thread here: firebase/firebase-android-sdk#3490 |
Great work @mk-dev-1, so it appears this is a bug at the level of the firebase-android-sdk and it has been resolved with this merge: firebase/firebase-android-sdk#3495. I'll update this channel once this has been released on the android sdk and subsequently on FlutterFire. |
Thanks @russellwheatley - any ideas on when that update will be available? |
Not sure. Last firebase android update was Feb 20th. So it is due a release soon. Then FlutterFire needs to be released with firebase android sdk bump. |
Hey @KubaStachecki. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Version 24.0.2 was released a few hours ago - I have overwritten the depencency like this
in my app level build.gradle. It is showing in the dependency tree like this:
Unfortunately, the crash remains:
|
@mk-dev-1, it appears you need to create a separate issue. This issue, as defined in first post is to fix: "Attempt to invoke virtual method 'com.google.firebase.firestore.model.DocumentKey com.google.firebase.firestore.model.MutableDocument.getKey()' on a null object reference Your issue appears to be around initialization. Also sounds like you have a locally reproducible example? |
@bswhite1 Based on your feedback I have added a separate issue for this. Unfortunately, I yet have to find a way to reproduce the issue. Setting up a blank project with just firestore, a stream listener and release configuration does not crash the app. Let's continue this in the new issue then.... |
Did you enable minify in your blank project? |
Overriding the dependencies in my android's Is there a new FLutterFire version in the pipeline for this fix? |
@pranavo72bex Yes, I did ;-) @luckyhandler: Does it fix the original issue raised by KubaStachecki, or does it fix the issue I raised a couple of posts earlier or the one in #8265? |
It fixes the original issue by @KubaStachecki with the
stacktrace |
@luckyhandler, thank you for confirming the upgrade as a fix. I'll raise a PR and look to get a release out ASAP. Thank you. |
@
This solve the issues in my case ..thanks man you are life saver 🤗 |
As for the issue I raised a couple of posts earlier - after finally identifying a working commit in my app's repository history, I was able to identify and resolve that issue, too. Replacing Happy to close this issue & Thanks for everyone's support |
Bug report
Describe the bug
Since firebase 3.1.7 app crashes in production a lot. I can't replicate this on my side, but I got multiple reports and stability % is falling like a knife. Reports from crashlytics are not pointing in anything specific in my code, hence I'm not sure what to sample.
Sample report:
DelayedClientCall.java line 447
io.grpc.internal.DelayedClientCall$DelayedListener.onMessage
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Sample project
Providing a minimal example project which demonstrates the bug in isolation from your main App greatly enhances the chance of a timely fix.
Please link to the public repository URL.
Additional context
Add any other context about the problem here.
Flutter doctor
Run
flutter doctor
and paste the output below:/Users/kuba/flutter/bin/flutter doctor --verbose
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.5.2 20G95 darwin-x64, locale en-GB)
• Flutter version 2.8.1 at /Users/kuba/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (7 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/kuba/Library/Android/sdk
• Platform android-31, build-tools 29.0.3
• ANDROID_HOME = /Users/kuba/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:firebase_core: ^1.12.0 firebase_auth: ^3.3.6 firebase_analytics: ^9.1.0 firebase_dynamic_links: ^4.0.5 cloud_firestore: ^3.1.7 firebase_database: ^9.0.6 firebase_storage: ^10.2.6 firebase_messaging: ^11.2.6 firebase_crashlytics: ^2.5.0 firebase_app_check: ^0.0.6+5 firebase_remote_config: ^2.0.0
Click To Expand
The text was updated successfully, but these errors were encountered: