question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Too much ANRs of com.google.firebase.iid.FirebaseInstanceIdReceiver

See original GitHub issue

[READ] Step 1: Are you in the right place?

Getting ANRs from Firebase SDK library.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 2020.3.1 Patch3
  • Firebase Component: Firebase Messaging Service
  • Component version: 20.2.4

[REQUIRED] Step 3: Describe the problem

Getting too many ANRs by com.google.firebase.iid.FirebaseInstanceIdReceiver in Google play console ANR & Crash logs.

Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x11000010 pkg=com.abc.xyz cmp=com.abc.xyz/com.google.firebase.iid.FirebaseInstanceIdReceiver (has extras) }

Steps to reproduce:

Its happening randomly on almost all android versions and android devices.

Relevant Code:


Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:17 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
hukum-singhcommented, Jun 20, 2022

Steps to reproduce:

  1. Enable StrictMode in Application#onCreate()
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
                .detectDiskReads()
                .detectDiskWrites()
                .detectNetwork()   // or .detectAll() for all detectable problems
                .penaltyLog()
                .build());
        StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
                .detectLeakedSqlLiteObjects()
                .detectLeakedClosableObjects()
                .penaltyLog()
                .penaltyDeath()
                .build());

2… kill the app, then send a push notification to the device.
3… You will see the following ANR log in the logcat.

E: >>> msg's executing time is too long
E: Blocked msg = { when=-2s725ms what=110 target=android.app.ActivityThread$H obj=AppBindData{appInfo=ApplicationInfo{aaa9b0e com.my.app}} } , cost  = 2687 ms

E: >>>Current msg List is:
E: Current msg <1> = { when=-11d18h43m26s232ms what=0 target=android.os.Handler callback=android.os.-$$Lambda$StrictMode$AndroidBlockGuardPolicy$9nBulCQKaMajrWr41SB7f7YRT1I }
E: Current msg <2> = { when=-2s724ms what=113 target=android.app.ActivityThread$H obj=ReceiverData{intent=Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x11080010 pkg=com.my.app cmp=com.my.app/com.google.firebase.iid.FirebaseInstanceIdReceiver (has extras) } packageName=com.my.app resultCode=0 resultData=null resultExtras=null} }
E: Current msg <3> = { when=-1s205ms what=0 target=com.google.android.gms.internal.firebase-perf.zzg callback=com.google.firebase.perf.metrics.AppStartTrace$zza }
E: Current msg <4> = { when=-1s105ms what=0 target=com.google.android.gms.internal.tasks.zza callback=com.google.android.gms.tasks.zzc }
E: Current msg <5> = { when=-1s55ms what=0 target=com.google.android.gms.internal.tasks.zza callback=com.google.android.gms.tasks.zzo }
E: Current msg <6> = { when=-1s33ms what=0 target=android.app.ActivityThread$H callback=android.app.LoadedApk$ServiceDispatcher$RunConnection }
E: Current msg <7> = { when=-954ms what=0 target=android.os.Handler callback=Hq0 }
E: Current msg <8> = { when=-935ms what=0 target=android.app.ActivityThread$H callback=android.app.LoadedApk$ServiceDispatcher$RunConnection }
E: Current msg <9> = { when=-917ms what=0 target=android.app.ActivityThread$H callback=android.app.LoadedApk$ServiceDispatcher$RunConnection }
E: Current msg <10> = { when=-876ms what=0 target=android.app.ActivityThread$H callback=android.os.-$$Lambda$PowerManager$3$IpywypHwh4Ty9Ep6SO6VX961lSU }
E: >>>CURRENT MSG DUMP OVER<<<
0reactions
google-oss-botcommented, Jul 25, 2022

Since there haven’t been any recent updates here, I am going to close this issue.

@khawarraza if you’re still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Too much ANR of com.google.firebase.iid ... - GitHub
Too much ANR of com.google.firebase.iid. ... FirebaseInstanceIdReceiver By Android version Android 11 (SDK 30) By device Samsung Galaxy A30s ...
Read more >
ANR on FirebaseInstanceIdReceiver - android - Stack Overflow
These ANRs for act=com.google.android.c2dm.intent.RECEIVE are very common in Android apps which are sending a lot of push notifications.
Read more >
ANR from Firebase messaging - Stephen - Medium
If your app is using Firebase Cloud Messaging(FCM), you might be familiar with this ANR in Google Play console. This ANR looks like...
Read more >
FirebaseInstanceId - Google
A new Instance ID will be generated at next app start if Firebase Cloud Messaging auto-init is enabled. This is a blocking function...
Read more >
RN: Android ANR Broadcast of Intent...com.google.firebase.iid ...
This looks to be an issue with Firebase itself as there are many reports of this issue on the web for Android O...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found