Firestore Internal Error (21.1.1)
See original GitHub issue[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Android Studio version: 3.5
- Firebase Component: Firestore (Database, Firestore, Storage, Functions, etc)
- Component version: 21.1.1
[REQUIRED] Step 3: Describe the problem
Firestore is crashing sporadically in production. I’m seeing the following stack traces together in Crashlytics.
Fatal Exception: java.lang.RuntimeException: Internal error in Cloud Firestore (21.1.1).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:529)
at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(AsyncQueue.java:2000)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7073)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
com.google.firebase.firestore.core.SyncEngine.handleCredentialChange (SyncEngine.java:599)
com.google.firebase.firestore.core.FirestoreClient.lambda$new$0 (FirestoreClient.java:105)
com.google.firebase.firestore.core.FirestoreClient$$Lambda$15.run (FirestoreClient.java:3599)
com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2 (AsyncQueue.java:431)
com.google.firebase.firestore.util.AsyncQueue$$Lambda$2.call (AsyncQueue.java:2000)
com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1 (AsyncQueue.java:317)
com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$Lambda$2.run (AsyncQueue.java:2317)
java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:459)
java.util.concurrent.FutureTask.run (FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301)
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run (AsyncQueue.java:224)
java.lang.Thread.run (Thread.java:764)
Steps to reproduce:
This is happening in production and being reported back to my via Crashlytics.
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
Internal error in Cloud Firestore on API 23 - Stack Overflow
The error occurs when I try to fetch a document from Firebase java.lang.RuntimeException: Internal error in Cloud Firestore (24.3.0). at ...
Read more >Firebase Android SDK Release Notes - Google
Internal changes to ensure functionality alignment with other SDK releases. ... Firestore listeners to stop working and receive a Permission Denied error.
Read more >java.lang.runtimeexception: internal error in cloud firestore ...
As for my env: Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-x64, locale en-JP). I upgraded firebase related packages using the same...
Read more >java.lang.RuntimeException Internal error in Firestore (0.6.6 ...
You received this message because you are subscribed to the Google Groups "google-cloud-firestore-discuss" group. To unsubscribe from this group and stop ...
Read more >Release Notes - Play services - Google Developers
Firebase Android BoM (Bill of Materials); Cloud Firestore; Cloud Functions for Firebase ... com.google.android.gms:play-services-measurement-sdk-api:21.1.1 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MattSkala Thanks for the hint with
BroadcastReceiver
. Fix for this NPE is coming.We have been seeing similar crashes in production for several months now. If it helps, it seems that all of them happen when the app is launched in background using
BroadcastReceiver
. We are considering to deploy the app with de-obfuscated Firestore classes in the next release, so we can get a better stack trace.For now, my guess is that
user
orsyncEngine
isnull
here:https://github.com/firebase/firebase-android-sdk/blob/9ce9c184263d8a48ce0da26e70920650a6c95d84/firebase-firestore/src/main/java/com/google/firebase/firestore/core/FirestoreClient.java#L107-L108