You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

API 23环境下Cloud Firestore内部错误问题求助

API 23环境下Firestore单元测试触发Internal Error问题
  • 测试覆盖API 23至33版本,共7个单元测试,仅API 23执行失败,抛出Internal error in Cloud Firestore (24.3.0)错误
  • 排除常见原因:Debug模式未启用ProGuard,所有依赖包均为最新版本,尝试降级Firestore相关包后问题依旧
  • 错误触发时机:从Firebase Firestore获取文档的操作阶段

错误栈信息

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'

问题范围更新

已定位到以下5个依赖包,将其中任意一个升级至标注的更高版本时,API 23环境下就会触发该Firebase异常:

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

内容的提问来源于stack exchange,提问作者Tiago Oliveira

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 03:35:24