Firebase应用内消息传递导致java.lang.RuntimeException:Cloud Firestore中的内部错误21.4.1

如何解决Firebase应用内消息传递导致java.lang.RuntimeException:Cloud Firestore中的内部错误21.4.1

在尝试使用Firebase身份验证和应用程序内消息传递时获取运行时异常。当我尝试使用Firebase对用户进行身份验证时,出现以下异常-

I/FIAM.Headless: Starting InAppMessaging runtime with Installation ID dT********Gl49TUSZRKMx

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: buzz.anusmarak,PID: 24274
    java.lang.RuntimeException: Internal error in Cloud Firestore (21.4.1).
        at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(com.google.firebase:firebase-firestore@@21.4.1:534)
        at com.google.firebase.firestore.util.AsyncQueue$$Lambda$3.run(com.google.firebase:firebase-firestore@@21.4.1)
        at android.os.Handler.handleCallback(Handler.java:754)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:163)
        at android.app.ActivityThread.main(ActivityThread.java:6361)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
     Caused by: java.lang.ExceptionInInitializerError
        at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore@@21.4.1:915)
        at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore@@21.4.1:408)
        at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore@@21.4.1:61)
        at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore@@21.4.1:115)
        at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore@@21.4.1:167)
        at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore@@21.4.1:280)
        at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0(com.google.firebase:firebase-firestore@@21.4.1:108)
        at com.google.firebase.firestore.core.FirestoreClient$$Lambda$1.run(com.google.firebase:firebase-firestore@@21.4.1)
        at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2(com.google.firebase:firebase-firestore@@21.4.1:436)
        at com.google.firebase.firestore.util.AsyncQueue$$Lambda$2.call(com.google.firebase:firebase-firestore@@21.4.1)
        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(com.google.firebase:firebase-firestore@@21.4.1:322)
        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$Lambda$2.run(com.google.firebase:firebase-firestore@@21.4.1)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@21.4.1:229)
        at java.lang.Thread.run(Thread.java:760)
     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@@21.4.1:911)
        at com.google.firestore.v1.ListenRequest.getDefaultInstance(com.google.firebase:firebase-firestore@@21.4.1:915) 
        at com.google.firestore.v1.FirestoreGrpc.getListenMethod(com.google.firebase:firebase-firestore@@21.4.1:408) 
        at com.google.firebase.firestore.remote.WatchStream.<init>(com.google.firebase:firebase-firestore@@21.4.1:61) 
        at com.google.firebase.firestore.remote.Datastore.createWatchStream(com.google.firebase:firebase-firestore@@21.4.1:115) 
        at com.google.firebase.firestore.remote.RemoteStore.<init>(com.google.firebase:firebase-firestore@@21.4.1:167) 
        at com.google.firebase.firestore.core.FirestoreClient.initialize(com.google.firebase:firebase-firestore@@21.4.1:280) 
        at com.google.firebase.firestore.core.FirestoreClient.lambda$new$0(com.google.firebase:firebase-firestore@@21.4.1:108) 
        at com.google.firebase.firestore.core.FirestoreClient$$Lambda$1.run(com.google.firebase:firebase-firestore@@21.4.1) 
        at com.google.firebase.firestore.util.AsyncQueue.lambda$enqueue$2(com.google.firebase:firebase-firestore@@21.4.1:436) 
        at com.google.firebase.firestore.util.AsyncQueue$$Lambda$2.call(com.google.firebase:firebase-firestore@@21.4.1) 
        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor.lambda$executeAndReportResult$1(com.google.firebase:firebase-firestore@@21.4.1:322) 
        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$$Lambda$2.run(com.google.firebase:firebase-firestore@@21.4.1) 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
        at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(com.google.firebase:firebase-firestore@@21.4.1:229) 
        at java.lang.Thread.run(Thread.java:760) 
     Caused by: java.lang.UnsupportedOperationException
        at com.google.firestore.v1.ListenRequest.dynamicmethod(com.google.firebase:firebase-firestore@@21.4.1:903)
        at com.google.protobuf.GeneratedMessageLite.dynamicmethod(GeneratedMessageLite.java:252)
        at com.google.protobuf.GeneratedMessageLite.buildMessageInfo(GeneratedMessageLite.java:280)
E/AndroidRuntime:     at com.google.protobuf.GeneratedMessageInfoFactory.messageInfoFor(GeneratedMessageInfoFactory.java:60)
            ... 25 more

正在使用以下依赖项-

dependencies {
    implementation filetree(dir: 'libs',include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

    implementation 'androidx.navigation:navigation-fragment:2.3.0'
    implementation 'androidx.navigation:navigation-ui:2.3.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.squareup.picasso:picasso:2.71828'

    //firebase Analytics
    implementation 'com.google.firebase:firebase-analytics:17.5.0'
    // firebaseui for Cloud Firestore
    implementation 'com.firebaseui:firebase-ui-firestore:6.2.1'
    // firebaseui for Firebase Auth
    implementation 'com.firebaseui:firebase-ui-auth:6.2.1'
    //Firebase Storage
    implementation 'com.google.firebase:firebase-storage:19.2.0'
    //Firebase Cloud Messaging
    implementation 'com.google.firebase:firebase-messaging:20.3.0'
    //Firebase in-app Messaging
    implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.1'
    implementation 'com.google.firebase:firebase-inappmessaging:19.1.1'

    //AdsMob
    implementation 'com.google.android.gms:play-services-ads:19.4.0'

    //Preferences Screen
    implementation 'androidx.preference:preference:1.1.1'

    //Kotlin extension
    implementation 'androidx.core:core-ktx:1.3.1'

    //circular images
    implementation 'com.mikhaellopez:circularimageview:4.2.0'

    //lottie animation
    implementation 'com.airbnb.android:lottie:3.4.1'

    // Room components
    implementation "androidx.room:room-runtime:2.2.5"
    annotationProcessor "androidx.room:room-compiler:2.2.5"
    androidTestImplementation "androidx.room:room-testing:2.2.5"

    //Joda Time
    implementation 'net.danlew:android.joda:2.10.6'

    //Image Cropper
    implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'

    //Calendar View
    implementation 'com.applandeo:material-calendar-view:1.7.0'

    //Work Manager
    implementation "androidx.work:work-runtime:2.4.0"

    //Guava error
    implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

    //Custom Preference Library
    implementation 'com.takisoft.preferencex:preferencex:1.1.0'
    implementation 'com.takisoft.preferencex:preferencex-datetimepicker:1.1.0'
    implementation 'com.takisoft.preferencex:preferencex-colorpicker:1.1.0'
    //https://github.com/Gericop/Android-Support-Preference-V7-Fix/wiki/Preference-types#timepickerpreference

    //Color Picker
    implementation 'com.github.rtugeek:colorseekbar:1.7.7'
    //https://github.com/rtugeek/ColorSeekBar
}

如果我从build.gradle文件删除以下依赖项

implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.1'
implementation 'com.google.firebase:firebase-inappmessaging:19.1.1'

然后异常已解决,但我想在我的应用中使用Firebase应用内消息传递功能。欢迎任何帮助或建议。

解决方法

java.lang.RuntimeException: Internal error in Cloud Firestore 

似乎是此版本的错误。您可以为此提出@Google@Github问题。

Android问题跟踪器包含待处理的技术任务的列表 涉及各种主题,与这些任务相关的信息,以及 有关这些任务进度的信息,包括哪些任务可能 在短期内得到研究。

您应该升级FirebaseUI for Android版本。适用于Android的FirebaseUI v6.3.0 是一个次要版本,其中包含新功能和错误修复。阅读v6.3.0

   implementation 'com.firebaseui:firebase-ui-firestore:6.3.0'
   implementation 'com.firebaseui:firebase-ui-auth:6.3.0'

仅供参考

如果仍然存在相同的问题,那么您可以暂时降级您的版本

   implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.0'
   implementation 'com.google.firebase:firebase-inappmessaging:19.1.0'

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其他元素将获得点击?
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。)
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?