gpt4 book ai didi

android - Firebase SDK 在接收广播 Intent 时崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:05:09 26 4
gpt4 key购买 nike

在最近的更新中,我们开始看到 2 次崩溃来自 Firebase。这些崩溃都不可重现,它们发生的频率很低,但频率足以让我们担心。第一个出现在 Android 7 上的概率为 99%(在 Android 5 上为 1%):

Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in com.google.firebase.iid.f@96947cd
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1132)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
at com.google.firebase.iid.zzad.zzchp(Unknown Source)
at com.google.firebase.iid.zzae.onReceive(Unknown Source)
at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1122)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

这一个完全来自 Android 8:

Fatal Exception: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x4000010 (has extras) } in com.google.firebase.iid.f@8746d6a
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1323)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnected()' on a null object reference
at com.google.firebase.iid.zzad.zzchp(Unknown Source:24)
at com.google.firebase.iid.zzae.onReceive(Unknown Source:7)
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$-android_app_LoadedApk$ReceiverDispatcher$Args_52497(LoadedApk.java:1313)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.$m$7(Unknown Source:4)
at android.app.-$Lambda$aS31cHIhRx41653CMnd4gZqshIQ.run(Unknown Source:39)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

不幸的是,Firebase SDK 被混淆了,所以我看不到崩溃的完整上下文,但抛出的异常是尝试执行 isConnected 方法的 NetworkInfo 对象上的 NPE。

这些是我们在此构建中使用的 firebase 库:

api "com.google.firebase:firebase-config:11.6.2"
api "com.firebase:firebase-jobdispatcher:0.8.4"

我们将 firebase-config 库从 11.2.0 升级到 11.6.2,并在之前的版本和我们开始看到的新版本之间添加了 jobdispatcher 库碰撞。我四处搜索,但没有看到任何关于该问题的现有对话,如果有人有洞察力,我们将不胜感激。谢谢!

最佳答案

我收到了 firebase 团队对我发送的有关此问题的错误报告的正式答复:

Yes, you are right. This is currently an issue from Firebase SDK 11.6.0 onwards.
Our engineers are currently working on a fix for this issue, but I can't share any details or timelines at this time.

In the meantime, I would suggest you to use the older version of the Firebase SDK.

You may check our release notes for any further updates.

关于android - Firebase SDK 在接收广播 Intent 时崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47682530/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com