Internal error in Cloud Firestore on API 23

Viewed 37

I know this question has been asked here multiple times, but none of the solutions have worked for me.

I ran 7 unit tests on APIs 23,24... up to 33, and they all passed with the exception of API 23, which fails with Internal error in Cloud Firestore (24.3.0)

Answers to similar questions seem to point to an issue with proguard, or outdated packages, I'm not using proguard for debug, and I'm positive that all my packages are up to date so maybe I have to try lower versions but I haven't found one that works, so any help would be really appreciated.

The error occurs when I try to fetch a document from Firebase

java.lang.RuntimeException: Internal error in Cloud Firestore (24.3.0).
    at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:539)
    at com.google.firebase.firestore.util.AsyncQueue$$ExternalSyntheticLambda3.run(D8$$SyntheticClass)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5417)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
 Caused by: java.lang.NoClassDefFoundError: com.google.firebase.firestore.local.IndexBackfiller$$ExternalSyntheticLambda0
    at com.google.firebase.firestore.local.IndexBackfiller.<init>(IndexBackfiller.java:51)
    at com.google.firebase.firestore.core.SQLiteComponentProvider.createIndexBackfiller(SQLiteComponentProvider.java:38)
    at com.google.firebase.firestore.core.ComponentProvider.initialize(ComponentProvider.java:159)
    at com.google.firebase.firestore.core.FirestoreClient.initialize(FirestoreClient.java:275)
    at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0$com-google-firebase-firestore-core-FirestoreClient(FirestoreClient.java:110)
    at com.google.firebase.firestore.core.FirestoreClient$$ExternalSyntheticLambda17.run(D8$$SyntheticClass)
    at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2(AsyncQueue.java:441)
    at com.google.firebase.firestore.util.AsyncQueue$$ExternalSyntheticLambda6.call(D8$$SyntheticClass)
    at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(AsyncQueue.java:327)
    at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$ExternalSyntheticLambda0.run(D8$$SyntheticClass)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:269)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
    at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:234)
    at java.lang.Thread.run(Thread.java:818)

Gradle:

implementation platform('com.google.firebase:firebase-bom:30.4.0')

implementation 'com.google.firebase:firebase-crashlytics-ktx'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.firebaseui:firebase-ui-auth:8.0.1'
implementation 'com.firebaseui:firebase-ui-database:8.0.1'

implementation 'com.google.firebase:firebase-messaging-ktx'
implementation "com.google.firebase:firebase-auth-ktx"
implementation "com.google.firebase:firebase-storage-ktx"
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation "com.google.firebase:firebase-ads:21.1.0"
implementation "com.google.firebase:firebase-config-ktx"
implementation "com.google.firebase:firebase-perf-ktx"
implementation "com.google.firebase:firebase-database-ktx"
implementation "com.google.firebase:firebase-appindexing"
implementation 'com.google.firebase:firebase-firestore-ktx'
implementation 'com.google.firebase:firebase-config-ktx'
implementation 'com.google.firebase:firebase-functions-ktx'
implementation 'com.google.guava:guava:30.0-android'
implementation 'com.google.firebase:firebase-appcheck-playintegrity'
implementation 'com.google.firebase:firebase-appcheck-safetynet:16.0.1'
debugImplementation 'com.google.firebase:firebase-appcheck-debug:16.0.1'

UPDATE

I was able to narrow down the problem to 5 packages

implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0' // 1.6.4
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.0' // 1.6.4
implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2' // 2.5.2
implementation 'androidx.navigation:navigation-ui-ktx:2.4.2' // 2.5.2
implementation "androidx.fragment:fragment-ktx:1.4.1" // 2.5.2

Updating any of these packages to a higher version will trigger a Firebase exception on API 23

0 Answers
Related