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)
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'
}
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.