Java 从Firebase Firestore获取io.grpc.StatusException
我经常从Firestore获得此运行时异常。下面我附上了stacktrace。我正在使用: firebase:firebase firestore:17.0.1Java 从Firebase Firestore获取io.grpc.StatusException,java,android,firebase,google-cloud-firestore,Java,Android,Firebase,Google Cloud Firestore,我经常从Firestore获得此运行时异常。下面我附上了stacktrace。我正在使用: firebase:firebase firestore:17.0.1 我不确定,但我想当我在firestore.Collection方法的onComplete回调中调用task.getResult时,会遇到此异常。尝试检查此异常。如果您没有登录应用程序,请尝试将读取设置为TRUE 服务云.firestore{ 匹配/databases/{database}/documents{ 匹配/{documen
我不确定,但我想当我在firestore.Collection方法的onComplete回调中调用task.getResult时,会遇到此异常。尝试检查此异常。如果您没有登录应用程序,请尝试将读取设置为TRUE 服务云.firestore{ 匹配/databases/{database}/documents{ 匹配/{document=**}{ 允许读、写; } }
}您尝试运行的是什么操作?我正在firestore的onComplete回调中调用task.getResult。收集方法是否超过使用限制?您可能需要重新考虑您的收藏大小。我不认为我们正在超过写入/秒或并发连接。此外,文档大小小于5kbAm,我收到此错误,因为我没有检查task.isSuccessful,然后调用task.getResult?嘿@saurabhlahoti,找到答案了吗?是。。这是因为我的应用程序中有多个firebase项目,而我没有提供访问特定firestore的正确项目ID
Caused by io.grpc.StatusException: DEADLINE_EXCEEDED: The datastore operation timed out, or the data was temporarily unavailable.
at io.grpc.Status.asException(SourceFile:534)
at com.google.firebase.firestore.g.zzs.zza(SourceFile:98)
at com.google.firebase.firestore.b.zzd.zza(SourceFile:122)
at com.google.firebase.firestore.b.zzab.zza(SourceFile:321)
at com.google.firebase.firestore.b.zzf.zza(SourceFile:236)
at com.google.firebase.firestore.f.zzo.zza(SourceFile:6527)
at com.google.firebase.firestore.f.zzv.zzb(SourceFile:2089)
at com.google.firebase.firestore.f.zza$zzb.zza(SourceFile:73)
at com.google.firebase.firestore.g.zzm$1.onMessage(SourceFile:77)
at io.grpc.ForwardingClientCallListener.onMessage(SourceFile:36)
at io.grpc.ForwardingClientCallListener.onMessage(SourceFile:36)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1MessagesAvailable.runInContext(SourceFile:498)
at io.grpc.internal.ContextRunnable.run(SourceFile:37)
at io.grpc.internal.SerializingExecutor.run(SourceFile:123)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at com.google.firebase.firestore.g.zza$zza.run(SourceFile:190) at java.lang.Thread.run(Thread.java:818)