正如您所看到的,崩溃位于Firebase库内。我读了其他的答案,但所有这些都是关于在代码中使用警报,如一个。我只使用Firebase库进行消息,分析和远程配置。
compilecom.google.firebase:firebase-core :$ firebaseLibVersion compilecom.google.firebase:firebase-config:$ firebaseLibVersion compilecom.google.firebase:firebase-messaging:$ firebaseLibVersion ext { firebaseLibVersion ='9.6.1'}只有在三星设备,如预期的那样。所以,我知道为什么它在三星设备上发生,但我不知道如何解决这个问题。
a href =groups.google/d/msg/firebase-talk/Q_zycHnTGu0/tIF1pQFsBwAJ =noreferrer> firebase-talk邮件列表:
我们发现了这个错误的原因。同步(未)订阅的主题列表时,FCM SDK可能会卡住。在subscribeToTopic / unsubscribeFromTopic操作期间,设备处于脱机状态时可能会发生该错误,并可能导致特定三星设备上的电池电量耗尽和应用程序崩溃。退出此状态的唯一方法是将手机连接到互联网,并打开应用程序以允许主题列表与服务器同步。
我们已经接近修复,但由于我们的发布周期,我们将不会有至少几个星期在您的手中有一个新的SDK。现在,您可以按照Mihir的建议降级到9.4.0。
I am getting following crash:
Fatal Exception: java.lang.SecurityException: !@Too many alarms (500) registered from pid 27251 uid 11383 at android.os.Parcel.readException(Parcel.java:1620) at android.os.Parcel.readException(Parcel.java:1573) at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:217) at android.app.AlarmManager.setImpl(AlarmManager.java:484) at android.app.AlarmManager.set(AlarmManager.java:260) at com.google.firebase.iid.FirebaseInstanceIdService.zzagl(Unknown Source) at com.google.firebase.iid.FirebaseInstanceIdService.zzd(Unknown Source) at com.google.firebase.iid.FirebaseInstanceIdService.zza(Unknown Source) at com.google.firebase.iid.FirebaseInstanceIdService.zzm(Unknown Source) at com.google.firebase.iid.zzb$2.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)As you can see crash is inside Firebase library. I read other answers but all of them are about usage of Alarms inside the code, like this one. I am using just Firebase libraries for messages, analytics, and remote config.
compile "com.google.firebase:firebase-core:$firebaseLibVersion" compile "com.google.firebase:firebase-config:$firebaseLibVersion" compile "com.google.firebase:firebase-messaging:$firebaseLibVersion" ext { firebaseLibVersion = '9.6.1' }Problems are happening only on Samsung devices, as expected. So, I know why it's happening on Samsung devices, but I don't know how to fix it.
解决方案From the firebase-talk mailing list:
We've found the cause of this bug. The FCM SDK can get stuck while syncing the (un)subscribed list of topics. The bug can happen when the device is offline during the subscribeToTopic / unsubscribeFromTopic operations and can lead to battery draining and app crashes on specific Samsung devices. The only way to exit this state is to connect the phone to the internet and open the app to allow the topics list to sync with the server.
We are close to a fix, but due to our release cycle, we won't have a new SDK in your hands for at least a few weeks. For now, you can downgrade to 9.4.0 as Mihir suggested.
更多推荐
致命异常:java.lang.SecurityException:!@Too在Firebase中注册了许多警报(500)
发布评论