-
Notifications
You must be signed in to change notification settings - Fork 653
Open
Labels
Description
[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: Android Studio Otter | 2025.2.1 Patch 1 (Build #AI-252.25557.131.2521.14432022)
- Firebase Component: Firestore
- Component version: 26.0.2 (via BoM 34.6.0)
[REQUIRED] Step 3: Describe the problem
The app crashes with a RuntimeException wrapping a SQLiteException ("Native could not create new byte[]") originating from SQLiteRemoteDocumentCache.
Steps to reproduce:
I cannot reproduce this deterministically, but it occurs during normal application usage while the Firestore SDK is heavily syncing data in the background.
Relevant Code:
2025-12-01 17:47:38.742 32449-32449 AndroidRuntime com.myapp E FATAL EXCEPTION: main (Ask Gemini)
Process: com.myapp, PID: 32449
java.lang.RuntimeException: Internal error in Cloud Firestore (26.0.2).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:546)
at com.google.firebase.firestore.util.AsyncQueue$$ExternalSyntheticLambda3.run(D8$$SyntheticClass:0)
at android.os.Handler.handleCallback(Handler.java:995)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loopOnce(Looper.java:273)
at android.os.Looper.loop(Looper.java:363)
at android.app.ActivityThread.main(ActivityThread.java:10060)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: android.database.sqlite.SQLiteException: unknown error (code 0 SQLITE_OK[0]): Native could not create new byte[]
at android.database.CursorWindow.nativeGetBlob(Native Method)
at android.database.CursorWindow.getBlob(CursorWindow.java:475)
at android.database.AbstractWindowedCursor.getBlob(AbstractWindowedCursor.java:48)
at com.google.firebase.firestore.local.SQLiteRemoteDocumentCache.processRowInBackground(SQLiteRemoteDocumentCache.java:303)
at com.google.firebase.firestore.local.SQLiteRemoteDocumentCache.lambda$getAll$0$com-google-firebase-firestore-local-SQLiteRemoteDocumentCache(SQLiteRemoteDocumentCache.java:175)
at com.google.firebase.firestore.local.SQLiteRemoteDocumentCache$$ExternalSyntheticLambda2.accept(D8$$SyntheticClass:0)
at com.google.firebase.firestore.local.SQLitePersistence$Query.forEach(SQLitePersistence.java:500)
at com.google.firebase.firestore.local.SQLiteRemoteDocumentCache.getAll(SQLiteRemoteDocumentCache.java:175)
at com.google.firebase.firestore.local.LocalStore.populateDocumentChanges(LocalStore.java:518)
at com.google.firebase.firestore.local.LocalStore.lambda$applyRemoteEvent$6$com-google-firebase-firestore-local-LocalStore(LocalStore.java:469)
at com.google.firebase.firestore.local.LocalStore$$ExternalSyntheticLambda14.get(D8$$SyntheticClass:0)
at com.google.firebase.firestore.local.SQLitePersistence.runTransaction(SQLitePersistence.java:233)
at com.google.firebase.firestore.local.LocalStore.applyRemoteEvent(LocalStore.java:418)
at com.google.firebase.firestore.core.SyncEngine.handleRemoteEvent(SyncEngine.java:403)
at com.google.firebase.firestore.core.MemoryComponentProvider$RemoteStoreCallback.handleRemoteEvent(MemoryComponentProvider.java:120)
at com.google.firebase.firestore.remote.RemoteStore.raiseWatchSnapshot(RemoteStore.java:586)
at com.google.firebase.firestore.remote.RemoteStore.handleWatchChange(RemoteStore.java:497)
at com.google.firebase.firestore.remote.RemoteStore.access$100(RemoteStore.java:60)
at com.google.firebase.firestore.remote.RemoteStore$1.onWatchChange(RemoteStore.java:188)
at com.google.firebase.firestore.remote.WatchStream.onNext(WatchStream.java:114)
at com.google.firebase.firestore.remote.WatchStream.onNext(WatchStream.java:38)
at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.lambda$onNext$1$com-google-firebase-firestore-remote-AbstractStream$StreamObserver(AbstractStream.java:126)
at com.google.firebase.firestore.remote.AbstractStream$StreamObserver$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)
at com.google.firebase.firestore.remote.AbstractStream$CloseGuardedRunner.run(AbstractStream.java:67)
at com.google.firebase.firestore.remote.AbstractStream$StreamObserver.onNext(AbstractStream.java:113)
at com.google.firebase.firestore.remote.FirestoreChannel$1.onMessage(FirestoreChannel.java:162)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInternal(ClientCallImpl.java:667)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(ClientCallImpl.java:654)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)