首页 > 解决方案 > Firebase 内部错误:java.lang.RuntimeException:Firestore (19.0.2) 中的内部错误

问题描述

在使用 Firebase、Cloud Vision API 和 Google Translate API 时,依赖项之间存在冲突并且案例已解决,但我遇到了这个问题。我不知道是什么问题。在 Firebase 代码的情况下,它运行良好,直到我放入云和谷歌翻译 API。

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.voca, PID: 32584
java.lang.RuntimeException: Internal error in Firestore (19.0.2).
    at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$5(com.google.firebase:firebase-firestore@@19.0.2:379)
    at com.google.firebase.firestore.util.AsyncQueue$$Lambda$5.run(Unknown Source:2)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
 Caused by: java.lang.ExceptionInInitializerError
    at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore@@19.0.2:915)
    at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore@@19.0.2:408)
    at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore@@19.0.2:62)
    at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore@@19.0.2:149)
    at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore@@19.0.2:167)
    at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore@@19.0.2:263)
    at com.google.firebase.firestore.core.FirestoreClient.lambda$new$2(com.google.firebase:firebase-firestore@@19.0.2:117)
    at com.google.firebase.firestore.core.FirestoreClient$$Lambda$2.run(Unknown Source:8)
    at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$4(com.google.firebase:firebase-firestore@@19.0.2:311)
    at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call(Unknown Source:2)
    at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$3(com.google.firebase:firebase-firestore@@19.0.2:287)
    at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:4)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@19.0.2:205)
    at java.lang.Thread.run(Thread.java:764)
 Caused by: java.lang.RuntimeException: Unable to get message info for com.google.firestore.v1.ListenRequest
    at com.google.protobuf.GeneratedMessageInfoFactory.messageInfoFor(GeneratedMessageInfoFactory.java:62)
    at com.google.protobuf.ManifestSchemaFactory$CompositeMessageInfoFactory.messageInfoFor(ManifestSchemaFactory.java:143)
    at com.google.protobuf.ManifestSchemaFactory.createSchema(ManifestSchemaFactory.java:55)
    at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:93)
    at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:107)
    at com.google.protobuf.GeneratedMessageLite.makeImmutable(GeneratedMessageLite.java:171)
    at com.google.firestore.v1.ListenRequest.<clinit>(com.google.firebase:firebase-firestore@@19.0.2:911)
    at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore@@19.0.2:915) 
    at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore@@19.0.2:408) 
    at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore@@19.0.2:62) 
    at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore@@19.0.2:149) 
    at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore@@19.0.2:167) 
    at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore@@19.0.2:263) 
    at com.google.firebase.firestore.core.FirestoreClient.lambda$new$2(com.google.firebase:firebase-firestore@@19.0.2:117) 
    at com.google.firebase.firestore.core.FirestoreClient$$Lambda$2.run(Unknown Source:8) 
    at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$4(com.google.firebase:firebase-firestore@@19.0.2:311) 
    at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call(Unknown Source:2) 
    at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$3(com.google.firebase:firebase-firestore@@19.0.2:287) 
    at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:4) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
    at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@19.0.2:205) 
    at java.lang.Thread.run(Thread.java:764) 
 Caused by: java.lang.UnsupportedOperationException
    at com.google.firestore.v1.ListenRequest.dynamicMethod(com.google.firebase:firebase-firestore@@19.0.2:903)
    at com.google.protobuf.GeneratedMessageLite.dynamicMethod(GeneratedMessageLite.java:252)
    at com.google.protobuf.GeneratedMessageLite.buildMessageInfo(GeneratedMessageLite.java:280)
    at com.google.protobuf.GeneratedMessageInfoFactory.messageInfoFor(GeneratedMessageInfoFactory.java:60)
    at com.google.protobuf.ManifestSchemaFactory$CompositeMessageInfoFactory.messageInfoFor(ManifestSchemaFactory.java:143) 
    at com.google.protobuf.ManifestSchemaFactory.createSchema(ManifestSchemaFactory.java:55) 
    at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:93) 
    at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:107) 
    at com.google.protobuf.GeneratedMessageLite.makeImmutable(GeneratedMessageLite.java:171) 
    at com.google.firestore.v1.ListenRequest.<clinit>(com.google.firebase:firebase-firestore@@19.0.2:911) 
    at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore@@19.0.2:915) 
    at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore@@19.0.2:408) 
    at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore@@19.0.2:62) 
    at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore@@19.0.2:149) 
    at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore@@19.0.2:167) 
    at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore@@19.0.2:263) 
    at com.google.firebase.firestore.core.FirestoreClient.lambda$new$2(com.google.firebase:firebase-firestore@@19.0.2:117) 
    at com.google.firebase.firestore.core.FirestoreClient$$Lambda$2.run(Unknown Source:8) 
    at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$4(com.google.firebase:firebase-firestore@@19.0.2:311) 
    at com.google.firebase.firestore.util.AsyncQueue$$Lambda$4.call(Unknown Source:2) 
    at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$3(com.google.firebase:firebase-firestore@@19.0.2:287) 
    at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(Unknown Source:4) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
    at com.google.firebase.firestore.util.AsyncQueue$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@19.0.2:205) 
    at java.lang.Thread.run(Thread.java:764) 

标签: androidfirebasegoogle-cloud-platformgoogle-cloud-firestore

解决方案


推荐阅读