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.

ANR Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE cmp=package_name/com.google.firebase.iid.FirebaseInstanceIdReceiver }

See original GitHub issue

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

Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow with the firebase tag.
  • For general Firebase discussion, use the firebase-talk google group.
  • For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Android Studio Dolphin | 2021.3.1
  • Firebase Component: 'com.google.firebase:firebase-common:20.1.0', 'com.google.firebase:firebase-auth:21.0.3', 'com.google.firebase:firebase-analytics:20.1.2', 'com.google.firebase:firebase-crashlytics-ndk:18.2.10', 'com.google.firebase:firebase-iid:21.1.0', 'com.google.firebase:firebase-messaging:23.0.2'
  • Component version: see previous line

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

We are getting too many ANR errors.

Title: Native method - android.os.MessageQueue.nativePollOnce Subtitle: Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE cmp=package_name/com.google.firebase.iid.FirebaseInstanceIdReceiver }

What happened? How can we make the problem occur? This could be a description, log/console output, etc.

Honestly, we don’t have steps, only Google Console: screenshotGithub

Stack trace from GP console:

"Signal Catcher" tid=3 Runnable
  #00  pc 0x000000000039d2b4  /system/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, int, BacktraceMap*, char const*, art::ArtMethod*, void*))
  #00  pc 0x000000000046460c  /system/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool, BacktraceMap*, bool) const)
  #00  pc 0x000000000047b6cc  /system/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*))
  #00  pc 0x0000000000474230  /system/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*))
  #00  pc 0x0000000000473c2c  /system/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char>>&, bool))
  #00  pc 0x00000000004737c0  /system/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&))
  #00  pc 0x0000000000448bb0  /system/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits<char>>&))
  #00  pc 0x0000000000452440  /system/lib64/libart.so (art::SignalCatcher::HandleSigQuit())
  #00  pc 0x000000000045123c  /system/lib64/libart.so (art::SignalCatcher::Run(void*))
  #00  pc 0x000000000006701c  /system/lib64/libc.so (__pthread_start(void*))
  #00  pc 0x000000000001ec54  /system/lib64/libc.so (__start_thread)
  
"Firebase-Messaging-Network-Io" tid=46 Runnable
  at com.android.okhttp.HttpHandler.openConnection (HttpHandler.java)
  at java.net.URL.openConnection (URL.java:992)
  at com.google.firebase.messaging.ImageDownload.blockingDownloadBytes (ImageDownload.java:104)
  at com.google.firebase.messaging.ImageDownload.blockingDownload (ImageDownload.java:90)
  at com.google.firebase.messaging.ImageDownload.lambda$start$0$ImageDownload (ImageDownload.java:72)
  at com.google.firebase.messaging.-$$Lambda$ImageDownload$1Xn11wJGkQ0YswSUNQTBL7K7Rek.run (lambda)
  at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:457)
  at java.util.concurrent.FutureTask.run (FutureTask.java:266)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.0.0:2)
  at java.lang.Thread.run (Thread.java:764)

"main" tid=1 Native
  #00  pc 0x00000000000697a4  /system/lib64/libc.so (__epoll_pwait)
  #00  pc 0x000000000001f440  /system/lib64/libc.so (epoll_pwait)
  #00  pc 0x0000000000015c64  /system/lib64/libutils.so (android::Looper::pollInner(int))
  #00  pc 0x0000000000015b44  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**))
  #00  pc 0x0000000000117e90  /system/lib64/libandroid_runtime.so
  #00  pc 0x00000000001f088c  /system/framework/arm64/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:325)
  at android.os.Looper.loop (Looper.java:147)
  at android.app.ActivityThread.main (ActivityThread.java:6749)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:845)

"Jit thread pool worker thread 0" tid=2 Native
  #00  pc 0x000000000001d6ec  /system/lib64/libc.so (syscall)
  #00  pc 0x00000000000e1b74  /system/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*))
  #00  pc 0x000000000047cf90  /system/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*))
  #00  pc 0x000000000047c540  /system/lib64/libart.so (art::ThreadPoolWorker::Run())
  #00  pc 0x000000000047c00c  /system/lib64/libart.so (art::ThreadPoolWorker::Callback(void*))
  #00  pc 0x000000000006701c  /system/lib64/libc.so (__pthread_start(void*))
  #00  pc 0x000000000001ec54  /system/lib64/libc.so (__start_thread)

"Binder:26453_1" tid=4 Native
  #00  pc 0x0000000000069890  /system/lib64/libc.so (__ioctl)
  #00  pc 0x0000000000023f48  /system/lib64/libc.so (ioctl)
  #00  pc 0x0000000000061a9c  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool))
  #00  pc 0x0000000000061c10  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand())
  #00  pc 0x00000000000622e8  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool))
  #00  pc 0x0000000000083a10  /system/lib64/libbinder.so
  #00  pc 0x0000000000011634  /system/lib64/libutils.so (android::Thread::_threadLoop(void*))
  #00  pc 0x00000000000bba80  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*))
  #00  pc 0x000000000006701c  /system/lib64/libc.so (__pthread_start(void*))
  #00  pc 0x000000000001ec54  /system/lib64/libc.so (__start_thread)

"Binder:26453_2" tid=5 Native
  #00  pc 0x0000000000069890  /system/lib64/libc.so (__ioctl)
  #00  pc 0x0000000000023f48  /system/lib64/libc.so (ioctl)
  #00  pc 0x0000000000061a9c  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool))
  #00  pc 0x0000000000061c10  /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand())
  #00  pc 0x00000000000622e8  /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool))
  #00  pc 0x0000000000083a10  /system/lib64/libbinder.so
  #00  pc 0x0000000000011634  /system/lib64/libutils.so (android::Thread::_threadLoop(void*))
  #00  pc 0x00000000000bba80  /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*))
  #00  pc 0x000000000006701c  /system/lib64/libc.so (__pthread_start(void*))
  #00  pc 0x000000000001ec54  /system/lib64/libc.so (__start_thread)

"HeapTaskDaemon" tid=6 Blocked
  #00  pc 0x000000000001d6f0  /system/lib64/libc.so (syscall)
  #00  pc 0x00000000000e1f9c  /system/lib64/libart.so (art::ConditionVariable::TimedWait(art::Thread*, long, int))
  #00  pc 0x0000000000243220  /system/lib64/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*))
  #00  pc 0x0000000000243b00  /system/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*))
  #00  pc 0x000000000020c96c  /system/framework/arm64/boot-core-libart.oat (Java_dalvik_system_VMRuntime_runHeapTasks__)
  at dalvik.system.VMRuntime.runHeapTasks (Native method)
  at java.lang.Daemons$HeapTaskDaemon.runInternal (Daemons.java:463)
  at java.lang.Daemons$Daemon.run (Daemons.java:105)
  at java.lang.Thread.run (Thread.java:764)


"FinalizerWatchdogDaemon" tid=7 Timed Waiting
  at java.lang.Thread.sleep (Native method)
  at java.lang.Thread.sleep (Thread.java:373)
  at java.lang.Thread.sleep (Thread.java:314)
  at java.lang.Daemons$FinalizerWatchdogDaemon.sleepFor (Daemons.java:344)
  at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization (Daemons.java:366)
  at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal (Daemons.java:283)
  at java.lang.Daemons$Daemon.run (Daemons.java:105)
  at java.lang.Thread.run (Thread.java:764)


"FinalizerDaemon" tid=8 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Object.wait (Object.java:422)
  at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:188)
  at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:209)
  at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:234)
  at java.lang.Daemons$Daemon.run (Daemons.java:105)
  at java.lang.Thread.run (Thread.java:764)

"ReferenceQueueDaemon" tid=9 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Daemons$ReferenceQueueDaemon.runInternal (Daemons.java:180)
  at java.lang.Daemons$Daemon.run (Daemons.java:105)
  at java.lang.Thread.run (Thread.java:764)

"Profile Saver" tid=10 Native
  #00  pc 0x000000000001d6ec  /system/lib64/libc.so (syscall)
  #00  pc 0x00000000000e1b74  /system/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*))
  #00  pc 0x000000000030d164  /system/lib64/libart.so (art::ProfileSaver::Run())
  #00  pc 0x000000000030f0ec  /system/lib64/libart.so (art::ProfileSaver::RunProfileSaverThread(void*))
  #00  pc 0x000000000006701c  /system/lib64/libc.so (__pthread_start(void*))
  #00  pc 0x000000000001ec54  /system/lib64/libc.so (__start_thread)

"GoogleApiHandler" tid=14 Native
  #00  pc 0x00000000000697a4  /system/lib64/libc.so (__epoll_pwait)
  #00  pc 0x000000000001f440  /system/lib64/libc.so (epoll_pwait)
  #00  pc 0x0000000000015c64  /system/lib64/libutils.so (android::Looper::pollInner(int))
  #00  pc 0x0000000000015b44  /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**))
  #00  pc 0x0000000000117e90  /system/lib64/libandroid_runtime.so
  #00  pc 0x00000000001f088c  /system/framework/arm64/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:325)
  at android.os.Looper.loop (Looper.java:147)
  at android.os.HandlerThread.run (HandlerThread.java:65)

"pool-3-thread-1" tid=15 Timed Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2101)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1132)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1113)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1087)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at java.lang.Thread.run (Thread.java:764)

"ScionFrontendApi" tid=13 Timed Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2101)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1086)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at java.lang.Thread.run (Thread.java:764)

"Crashlytics Exception Handler1" tid=16 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2059)
  at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1087)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun (ExecutorUtils.java:64)
  at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run (BackgroundPriorityRunnable.java:27)
  at java.lang.Thread.run (Thread.java:764)

"GmsDynamite" tid=17 Waiting
  at java.lang.Object.wait (Native method)
  at com.google.android.gms.dynamite.zza.run (com.google.android.gms:play-services-basement@@18.0.0:2)

"com.google.firebase.crashlytics.startup1" tid=18 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2059)
  at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1087)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun (ExecutorUtils.java:64)
  at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run (BackgroundPriorityRunnable.java:27)
  at java.lang.Thread.run (Thread.java:764)

"firebase-installations-executor-1" tid=19 Timed Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2101)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1086)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at java.lang.Thread.run (Thread.java:764)

"firebase-installations-executor-2" tid=20 Timed Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2101)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1086)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at java.lang.Thread.run (Thread.java:764)

"awaitEvenIfOnMainThread task continuation executor1" tid=21 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2059)
  at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1087)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun (ExecutorUtils.java:64)
  at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run (BackgroundPriorityRunnable.java:27)
  at java.lang.Thread.run (Thread.java:764)

"Measurement Worker" tid=22 Native
  #00  pc 0x0000000000069ce4  /system/lib64/libc.so (fdatasync)
  #00  pc 0x000000000002727c  /system/lib64/libsqlite.so
  #00  pc 0x000000000002d804  /system/lib64/libsqlite.so
  #00  pc 0x000000000001364c  /system/lib64/libsqlite.so
  #00  pc 0x0000000000013c8c  /system/lib64/libsqlite.so
  #00  pc 0x000000000003c484  /system/lib64/libsqlite.so
  #00  pc 0x000000000004cb84  /system/lib64/libsqlite.so
  #00  pc 0x0000000000016b44  /system/lib64/libsqlite.so (sqlite3_step)
  #00  pc 0x00000000000ecfbc  /system/lib64/libandroid_runtime.so
  #00  pc 0x000000000049e650  /system/framework/arm64/boot-framework.oat (Java_android_database_sqlite_SQLiteConnection_nativeExecute__JJ)
  at android.database.sqlite.SQLiteConnection.nativeExecute (Native method)
  at android.database.sqlite.SQLiteConnection.execute (SQLiteConnection.java:571)
  at android.database.sqlite.SQLiteSession.endTransactionUnchecked (SQLiteSession.java:437)
  at android.database.sqlite.SQLiteSession.endTransaction (SQLiteSession.java:401)
  at android.database.sqlite.SQLiteDatabase.endTransaction (SQLiteDatabase.java:539)
  at ik.q (:com.google.android.gms.dynamite_measurementdynamite@222615051@22.26.15 (040408-0):12)
  at kn.r (:com.google.android.gms.dynamite_measurementdynamite@222615051@22.26.15 (040408-0):7)
  at jd.run (:com.google.android.gms.dynamite_measurementdynamite@222615051@22.26.15 (040408-0):112)
  at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:457)
  at java.util.concurrent.FutureTask.run (FutureTask.java:266)
  at ja.run (:com.google.android.gms.dynamite_measurementdynamite@222615051@22.26.15 (040408-0):5)

"pool-15-thread-1" tid=23 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2059)
  at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1087)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at java.lang.Thread.run (Thread.java:764)

"Firebase-Messaging-Init" tid=24 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2059)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1120)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1113)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1087)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.0.0:2)
  at java.lang.Thread.run (Thread.java:764)


"Firebase-Messaging-Topics-Io" tid=25 Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2059)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1120)
  at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1113)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1087)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at com.google.android.gms.common.util.concurrent.zza.run (com.google.android.gms:play-services-basement@@18.0.0:2)
  at java.lang.Thread.run (Thread.java:764)


"heartbeat-information-executor" tid=26 Timed Waiting
  at java.lang.Object.wait (Native method)
  at java.lang.Thread.parkFor$ (Thread.java:2135)
  at sun.misc.Unsafe.park (Unsafe.java:358)
  at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2101)
  at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
  at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1086)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1147)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
  at java.lang.Thread.run (Thread.java:764)

"AsyncTask #1" tid=27 Native
  #00  pc 0x0000000000069890  /system/lib64/libc.so (__ioctl)
  #00  pc 0x0000000000023f48  /system/lib64/libc.so (ioctl)
  #00  pc 0x0000000000061a9c  /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool))
  #00  pc 0x0000000000062854  /system/lib64/libbinder.so (android::IPCThreadState::waitForResponse(android::Parcel*, int*))
  #00  pc 0x0000000000062560  /system/lib64/libbinder.so (android::IPCThreadState::transact(int, unsigned int, android::Parcel const&, android::Parcel*, unsigned int))

!!! To save you and me time on answers, I have previously read similar issues and prepared answers in advance: Q: Any chance you’re using a custom Application class? A: We use android:name=“androidx.multidex.MultiDexApplication”

We also use advertising SDKs in the application, but we don’t initialize them in onCreate Application.

Relevant Code:

// TODO(you): code here to reproduce the problem

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:3
  • Comments:55 (23 by maintainers)

github_iconTop GitHub Comments

2reactions
gsakakiharacommented, Dec 9, 2022

@OlehHaidaienko I noticed that you are using a version of the BoM before the ANR fix went in. Could you try updating to a newer version (ideally v31.1.1, which contains a fix for a deadlock)? Also, in reference to setting a breakpoint in FirebaseInstanceIdReceiver.onMessageReceive(), yes, it would be expected to cause an ANR if that was blocked because the broadcast is not finished until that method returns. FirebaseInstanceIdReceiver normally hands off the message to FirebaseMessagingService and then returns immediately after that, so we shouldn’t see a similar issue normally.

@1008k Were you seeing ANRs for instances using BoM v31.1.0? If so, could you create a new issue and add some of the ANR report stack traces that you saw?

2reactions
1008kcommented, Nov 8, 2022

Hello everyone. For the past few months I have been suffering from this ANR as well. Based on the article linked by @ld2006203, isolating the FCM process and moving the processing in ApplicationClass to ActivityClass improved in my case.

It has been said that the crash rate and ANR rate have a negative impact on the Play Store ranking factors, but the following article states that further penalties will be imposed. https://android-developers.googleblog.com/2022/10/raising-bar-on-technical-quality-on-google-play.html

This is a very critical issue and I hope it will be fixed soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ANR Broadcast of Intent { act=com.google.android.c2dm.intent ...
[READ] Step 1: Are you in the right place? Issues filed here should be about bugs in the code in this repository.
Read more >
ANR because of Broadcast of Intent { act=com.google.android ...
ANR because of Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x11000010 cmp=com.google.firebase.iid.FirebaseInstanceIdReceiver (has ...
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 >
RN: Android ANR Broadcast of Intent...com.google.firebase.iid ...
No testing required. Description. Introduced in 1.20.1 (build 201). Broadcast of Intent { act ...
Read more >
ANR from Firebase messaging - Stephen - Medium
Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x11000010 pkg=xxx cmp=xxx/com.google.firebase.iid.
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