SecurityException "Too many alarms" on FCM

2,126 views
Skip to first unread message

Júlio Cesar Bueno Cotta

unread,
Sep 28, 2016, 10:37:18 AM9/28/16
to Firebase Google Group
I am using the latest FCM version for android 9.6 and I today started receiving this crash reports..
From Firebase crash report:

Exception java.lang.SecurityException: !@Too many alarms (500) registered from pid 11624 uid 10161
android.os.Parcel.readException (Parcel.java:1546)
android.os.Parcel.readException (Parcel.java:1499)
android.app.IAlarmManager$Stub$Proxy.set (IAlarmManager.java:206)
android.app.AlarmManager.setImpl (AlarmManager.java:428)
android.app.AlarmManager.set (AlarmManager.java:215)
com.google.firebase.iid.FirebaseInstanceIdService.zzagl ()
com.google.firebase.iid.FirebaseInstanceIdService.zzd ()
com.google.firebase.iid.FirebaseInstanceIdService.zza ()
com.google.firebase.iid.FirebaseInstanceIdService.zzm ()
com.google.firebase.iid.zzb$2.run ()
java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1112)
java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:587)
java.lang.Thread.run (Thread.java:818)



Jack Cheung

unread,
Oct 6, 2016, 4:02:46 AM10/6/16
to Firebase Google Group
In addition, I'm aware that those issues come from Samsung devices.
Perhaps we are bumping into this:

Ian Barber

unread,
Oct 6, 2016, 11:56:43 AM10/6/16
to Firebase Google Group
Yep that looks like that issue, hitting the limit on some samsung devices. We've got an issue tracking the problem internally.

Ian Barber

unread,
Oct 11, 2016, 10:58:46 PM10/11/16
to Firebase Google Group
Just to update: we have a fix for (part) of this, but the code involved wasn't making that many alarms - you may be able to mitigate in the meantime by looking for other alarm use and ensuring its using FLAG_UPDATE_CURRENT or similar. 

David Montiel

unread,
Oct 14, 2016, 9:10:04 AM10/14/16
to Firebase Google Group
Hello I am having this same issue, also on Samsung devices, but I am not using any alarms at all, actually I am only using firebase to send notifications and a couple of remote config stuff, why would this be affecting me?

Michał Urbaniak

unread,
Oct 22, 2016, 11:54:06 AM10/22/16
to Firebase Google Group
As David said, I have also the same problem on the Samsung devices, and I don't use any alarms in my app.

Alax Hoo

unread,
Oct 25, 2016, 10:51:33 AM10/25/16
to Firebase Google Group
Hi,

I also meet the same issue after I upgrade firebase form 9.4.0 to 9.6.1. All occurs on Samsung devices with Android 6.0+.
My solution is to downgrade firebase back to version 9.4.0, and the issue gone.

I have checked the latest firebase 9.8.0 release notes, but likely there is no any fix regarding the issue.
Please correct me, I think the issue was introduced by firebase 9.6.1, and not my code.

Thanks.

David Montiel

unread,
Oct 26, 2016, 5:25:10 PM10/26/16
to Firebase Google Group
Hello, are there no news about when/if this would get fixed? i guess i have to downgrade then...

Stelios Tzouvaras

unread,
Oct 28, 2016, 10:51:10 AM10/28/16
to Firebase Google Group
Same problem here. The crashes are thousands

Jacob Wenger

unread,
Oct 28, 2016, 9:00:06 PM10/28/16
to fireba...@googlegroups.com
Hey all,

We are aware of this bug and the team is working hard to resolve the underlying issue and get a fix out to you all. What we do know is that the issue is affecting only some Samsung devices. It doesn't look like we have a workaround for you at the moment. Please hang tight while we resolve this issue.

Cheers,
Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/a845585c-b4ca-4a53-852b-688fdcd75e0b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mihir Joshi

unread,
Oct 29, 2016, 11:02:40 AM10/29/16
to Firebase Google Group
The only option is to downgrade to 9.4.0 for now.

Jacob Wenger

unread,
Nov 3, 2016, 1:05:50 PM11/3/16
to fireba...@googlegroups.com
Hey all,

I just wanted to follow up on this thread with some updated information.

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.

We appreciate your patience while we get this all worked out.

Jacob

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.

Mihir Joshi

unread,
Nov 10, 2016, 4:30:48 PM11/10/16
to Firebase Google Group
This kinda sucks because I am using Mobile Ads SDK as well and there is another crash in v9.4.0.

:com.google.android.gms line 1227
kie
.a


Caused by java.lang.NullPointerException
kie
.a (:com.google.android.gms:1227)
kid
.b (:com.google.android.gms:197)
iyk
.logEvent (:com.google.android.gms:1216)
iyk
.logEvent (:com.google.android.gms:60)
com
.google.android.chimera.container.DebugLogger.logEvent (:com.google.android.gms:65)
com
.google.android.chimera.container.ConfigurationManager.loadModuleByModuleId (:com.google.android.gms:546)
iym
.a (:com.google.android.gms:74)
cuo
. (:com.google.android.gms)
cuo
.a (:com.google.android.gms:27)
com
.google.android.gms.ads.MobileAdsSettingManagerCreatorImpl.getMobileAdsSettingManager (:com.google.android.gms:38)
com
.google.android.gms.ads.internal.client.bc.onTransact (:com.google.android.gms:55)
android
.os.Binder.transact (Binder.java:385)
com
.google.android.gms.ads.internal.client.zzaa$zza$zza.zza (Unknown Source)
com
.google.android.gms.ads.internal.client.zzai.zzm (Unknown Source)
com
.google.android.gms.ads.internal.client.zzl$5.zzjj (Unknown Source)
com
.google.android.gms.ads.internal.client.zzl$5.zzjh (Unknown Source)
com
.google.android.gms.ads.internal.client.zzl$zza.zzjp (Unknown Source)
com
.google.android.gms.ads.internal.client.zzl.zza (Unknown Source)
com
.google.android.gms.ads.internal.client.zzl.zzl (Unknown Source)
com
.google.android.gms.ads.internal.client.zzag.zza (Unknown Source)
com
.google.android.gms.ads.MobileAds.initialize (Unknown Source)
com
.google.android.gms.ads.MobileAds.initialize (Unknown Source)



On Wednesday, September 28, 2016 at 8:07:18 PM UTC+5:30, Júlio Cesar Bueno Cotta wrote:

Kishor Gandham

unread,
Nov 22, 2016, 11:02:28 AM11/22/16
to Firebase Google Group
Hi Jacob,

Can you confirm if this fix is part of latest firebase sdk for android (10.0) release today?

Cheers,
Kishor
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.

Mihir Joshi

unread,
Nov 22, 2016, 11:02:32 AM11/22/16
to Firebase Google Group
Is this fixed in version 10.0? I cannot see anything related to it in the release notes.


On Wednesday, September 28, 2016 at 8:07:18 PM UTC+5:30, Júlio Cesar Bueno Cotta wrote:

Jacob Wenger

unread,
Nov 22, 2016, 11:43:29 AM11/22/16
to fireba...@googlegroups.com
Hey all,

Yes, this is fixed with yesterday's release! It looks like we forgot to add this to the release notes, but we are in the process of adding the following line to them right now:

Firebase Messaging: fixed a bug that could cause extra alarms to be set and could lead to crashes in specific Samsung devices.

Cheers,
Jacob

To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.

To post to this group, send email to fireba...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages