Too much ANR of com.google.firebase.iid.FirebaseInstanceIdReceiver
See original GitHub issue[REQUIRED] Step 2: Describe your environment
- Android Studio version: Android Studio 4.2.1 Build #AI-202.7660.26.42.7351085, built on May 10, 2021
- Firebase Component: Analytics, messaging, remote config
- Component version: implementation platform(‘com.google.firebase:firebase-bom:28.2.1’)
[REQUIRED] Step 3: Describe the problem
the issue is produced in production and having two ANR from playstore console dont know they are related or not. i am using play services ad version 19.8.0. and firebase messaging for topic messaging
Steps to reproduce:
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
Relevant Code:
admob init code
MobileAds.initialize(
this,
initializationStatus -> {});
top subscribing
FirebaseMessaging.getInstance().subscribeToTopic("abc")
ANR details
Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x11000010
pkg=com.packagename
cmp=com.packagename/com.google.firebase.iid.FirebaseInstanceIdReceiver (has extras) }
com.google.firebase.iid.FirebaseInstanceIdReceiver
By Android version
Android 11 (SDK 30)
By device
Samsung Galaxy A30s
Samsung Galaxy A10s
Samsung Galaxy Tab A (8.0", 2019)
Samsung Galaxy A30
ANR
Android 11 (SDK 30)
Type
"main" prio=5 tid=1 Native
#0 pc 0000000000034018 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#0 pc 0000000000130db3 /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+82)
#0 pc 00000000002d6abf /apex/com.android.art/lib/libart.so (art::JNI::NewString(_JNIEnv*, unsigned short const*, int)+402)
#0 pc 0000000001838cc7 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 0000000001837aaf /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000020a793f /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000020a78d1 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000026bbbe7 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000026bbb81 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 0000000000d0be31 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000026e9727 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000026d8aeb /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000020bc3f3 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000020bc20f /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 0000000000d0c177 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 0000000000c82dbd /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000020cd8a3 /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000020cd30f /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (???)
#0 pc 00000000020cd1eb /data/app/~~B_edW4TVUBv1O8VPmlebVw==/com.google.android.trichromelibrary_460607130-CQJFH9MMt_5cnxy8qAv0zw==/base.apk!libmonochrome.so (Java_J_N_M1Y_1XVCN+66)
at J.N.M1Y_XVCN (Native method)
at org.chromium.content.browser.BrowserStartupControllerImpl.a (chromium-TrichromeWebViewGoogle.aab-stable-460607130:2)
at org.chromium.content.browser.BrowserStartupControllerImpl.g (chromium-TrichromeWebViewGoogle.aab-stable-460607130:8)
at y8.run (chromium-TrichromeWebViewGoogle.aab-stable-460607130:23)
at org.chromium.base.ThreadUtils.f (chromium-TrichromeWebViewGoogle.aab-stable-460607130:2)
at vA0.h (chromium-TrichromeWebViewGoogle.aab-stable-460607130:41)
at vA0.b (chromium-TrichromeWebViewGoogle.aab-stable-460607130:20)
at vA0.j (chromium-TrichromeWebViewGoogle.aab-stable-460607130:2)
at com.android.webview.chromium.WebViewChromiumFactoryProvider.g (chromium-TrichromeWebViewGoogle.aab-stable-460607130:2)
at com.android.webview.chromium.WebViewChromium.init (chromium-TrichromeWebViewGoogle.aab-stable-460607130:14)
at android.webkit.WebView. (WebView.java:435)
at android.webkit.WebView. (WebView.java:355)
at android.webkit.WebView. (WebView.java:337)
at android.webkit.WebView. (WebView.java:324)
at android.webkit.WebView. (WebView.java:314)
at com.google.android.gms.ads.internal.webview.ac. (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:1)
at com.google.android.gms.ads.internal.webview.s.a (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:4)
at com.google.android.gms.ads.internal.webview.v.a (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:5)
at com.google.android.gms.ads.internal.js.l. (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:3)
at com.google.android.gms.ads.internal.js.r.run (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:2)
at com.google.android.gms.ads.internal.util.future.c.execute (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:2)
at com.google.android.gms.ads.internal.util.future.d.execute (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565)
at com.google.android.gms.ads.internal.js.ai.b (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:3)
at com.google.android.gms.ads.internal.js.ai.a (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:5)
at com.google.android.gms.ads.internal.js.function.n.b (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565)
at com.google.android.gms.ads.internal.e.b (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:19)
at com.google.android.gms.ads.internal.e.a (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565)
at com.google.android.gms.ads.nonagon.au.h (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:8)
at com.google.android.gms.ads.internal.client.br.bU (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:23)
at mo.onTransact (com.google.android.gms.policy_ads_fdr_dynamite@212910700@212910700057.385466565.385466565:4)
at android.os.Binder.transact (Binder.java:1043)
at com.google.android.gms.internal.ads.zzgw.zzb (zzgw.java)
at com.google.android.gms.internal.ads.zzyj.zza (zzyj.java)
at com.google.android.gms.internal.ads.zzzs.zza (zzzs.java)
at com.google.android.gms.ads.MobileAds.initialize (MobileAds.java)
at com.packagename.MyApplication.onCreate (MyApplication.java)
at android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6754)
at android.app.ActivityThread.access$1400 (ActivityThread.java:244)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1952)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:223)
at android.app.ActivityThread.main (ActivityThread.java:7700)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:997)
Type
"Jit thread pool worker thread 0" daemon prio=5 tid=7 Native
#0 pc 0000000000034018 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#0 pc 0000000000130db3 /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+82)
#0 pc 0000000000459633 /apex/com.android.art/lib/libart.so (art::ThreadPool::GetTask(art::Thread*)+58)
#0 pc 0000000000458d45 /apex/com.android.art/lib/libart.so (art::ThreadPoolWorker::Run()+72)
#0 pc 0000000000458999 /apex/com.android.art/lib/libart.so (art::ThreadPoolWorker::Callback(void*)+116)
#0 pc 0000000000080923 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#0 pc 0000000000039d63 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
Type
"FinalizerDaemon" daemon prio=5 tid=9 Waiting
at java.lang.Object.wait (Native method)
at java.lang.Object.wait (Object.java:442)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:190)
at java.lang.ref.ReferenceQueue.remove (ReferenceQueue.java:211)
at java.lang.Daemons$FinalizerDaemon.runInternal (Daemons.java:273)
at java.lang.Daemons$Daemon.run (Daemons.java:139)
at java.lang.Thread.run (Thread.java:923)
Type
"ReferenceQueueDaemon" daemon prio=5 tid=10 Waiting
at java.lang.Object.wait (Native method)
at java.lang.Object.wait (Object.java:442)
at java.lang.Object.wait (Object.java:568)
at java.lang.Daemons$ReferenceQueueDaemon.runInternal (Daemons.java:217)
at java.lang.Daemons$Daemon.run (Daemons.java:139)
at java.lang.Thread.run (Thread.java:923)
Type
"FinalizerWatchdogDaemon" daemon prio=5 tid=11 Waiting
at java.lang.Object.wait (Native method)
at java.lang.Object.wait (Object.java:442)
at java.lang.Object.wait (Object.java:568)
at java.lang.Daemons$FinalizerWatchdogDaemon.sleepUntilNeeded (Daemons.java:341)
at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal (Daemons.java:321)
at java.lang.Daemons$Daemon.run (Daemons.java:139)
at java.lang.Thread.run (Thread.java:923)
Type
"Binder:19208_1" prio=5 tid=12 Native
#0 pc 0000000000034018 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#0 pc 0000000000130db3 /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+82)
#0 pc 00000000002a869d /apex/com.android.art/lib/libart.so (art::JNI::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+400)
#0 pc 0000000000067f31 /system/lib/libandroid_runtime.so (_JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)+28)
#0 pc 00000000000c5acf /system/lib/libandroid_runtime.so (JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+106)
#0 pc 0000000000034289 /system/lib/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+144)
#0 pc 0000000000039edd /system/lib/libbinder.so (android::IPCThreadState::executeCommand(int)+624)
#0 pc 0000000000039bb7 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+98)
#0 pc 000000000003a237 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
#0 pc 000000000005359d /system/lib/libbinder.so (android::PoolThread::threadLoop()+12)
#0 pc 000000000000ee95 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+168)
#0 pc 000000000006c813 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+86)
#0 pc 000000000000e9dd /system/lib/libutils.so (thread_data_t::trampoline(thread_data_t const*)+256)
#0 pc 0000000000080923 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#0 pc 0000000000039d63 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
Type
"Binder:19208_2" prio=5 tid=13 Native
#0 pc 0000000000034018 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#0 pc 0000000000130db3 /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+82)
#0 pc 00000000002a869d /apex/com.android.art/lib/libart.so (art::JNI::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+400)
#0 pc 0000000000067f31 /system/lib/libandroid_runtime.so (_JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)+28)
#0 pc 00000000000c5acf /system/lib/libandroid_runtime.so (JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+106)
#0 pc 0000000000034289 /system/lib/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+144)
#0 pc 0000000000039edd /system/lib/libbinder.so (android::IPCThreadState::executeCommand(int)+624)
#0 pc 0000000000039bb7 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+98)
#0 pc 000000000003a237 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
#0 pc 000000000005359d /system/lib/libbinder.so (android::PoolThread::threadLoop()+12)
#0 pc 000000000000ee95 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+168)
#0 pc 000000000006c813 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+86)
#0 pc 000000000000e9dd /system/lib/libutils.so (thread_data_t::trampoline(thread_data_t const*)+256)
#0 pc 0000000000080923 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#0 pc 0000000000039d63 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
Type
"Binder:19208_3" prio=5 tid=14 Native
#0 pc 0000000000034018 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#0 pc 0000000000130db3 /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+82)
#0 pc 00000000002a869d /apex/com.android.art/lib/libart.so (art::JNI::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+400)
#0 pc 0000000000067f31 /system/lib/libandroid_runtime.so (_JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)+28)
#0 pc 00000000000c5acf /system/lib/libandroid_runtime.so (JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+106)
#0 pc 0000000000034289 /system/lib/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+144)
#0 pc 0000000000039edd /system/lib/libbinder.so (android::IPCThreadState::executeCommand(int)+624)
#0 pc 0000000000039bb7 /system/lib/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+98)
#0 pc 000000000003a237 /system/lib/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+38)
#0 pc 000000000005359d /system/lib/libbinder.so (android::PoolThread::threadLoop()+12)
#0 pc 000000000000ee95 /system/lib/libutils.so (android::Thread::_threadLoop(void*)+168)
#0 pc 000000000006c813 /system/lib/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+86)
#0 pc 000000000000e9dd /system/lib/libutils.so (thread_data_t::trampoline(thread_data_t const*)+256)
#0 pc 0000000000080923 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#0 pc 0000000000039d63 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
Type
"Profile Saver" daemon prio=5 tid=15 Native
#0 pc 0000000000034018 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#0 pc 0000000000130db3 /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+82)
#0 pc 000000000026ca11 /apex/com.android.art/lib/libart.so (art::ProfileSaver::Run()+376)
#0 pc 0000000000270403 /apex/com.android.art/lib/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+106)
#0 pc 0000000000080923 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#0 pc 0000000000039d63 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
Type
"AsyncTask #1" prio=5 tid=16 Waiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill (SynchronousQueue.java:459)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer (SynchronousQueue.java:362)
at java.util.concurrent.SynchronousQueue.take (SynchronousQueue.java:920)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:923)
Type
"ScionFrontendApi" prio=5 tid=18 TimedWaiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:923)
Type
"Firebase-Messaging-Init" prio=5 tid=19 Waiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:1120)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take (ScheduledThreadPoolExecutor.java:849)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at e.d.b.b.e.l.j.b.run
at java.lang.Thread.run (Thread.java:923)
Type
"pool-3-thread-1" prio=5 tid=20 Waiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await (AbstractQueuedSynchronizer.java:2067)
at java.util.concurrent.LinkedBlockingQueue.take (LinkedBlockingQueue.java:442)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1092)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:923)
Type
"Firebase-Messaging-Topics-Io" prio=5 tid=22 Waiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.park (LockSupport.java:190)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt (AbstractQueuedSynchronizer.java:868)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly (AbstractQueuedSynchronizer.java:1023)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly (AbstractQueuedSynchronizer.java:1334)
at java.util.concurrent.CountDownLatch.await (CountDownLatch.java:232)
at e.d.b.b.c.a.a (:3)
at com.google.firebase.messaging.FirebaseMessaging.a (:2)
at e.d.d.v.r0.b
at e.d.d.v.r0.h (:8)
at e.d.d.v.s0.run
at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:462)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run (ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at e.d.b.b.e.l.j.b.run
at java.lang.Thread.run (Thread.java:923)
Type
"pool-9-thread-1" prio=5 tid=23 TimedWaiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill (SynchronousQueue.java:461)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer (SynchronousQueue.java:362)
at java.util.concurrent.SynchronousQueue.poll (SynchronousQueue.java:937)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:923)
Type
"Firebase-Messaging-Trigger-Topics-Io" prio=5 tid=24 TimedWaiting
at sun.misc.Unsafe.park (Native method)
at java.util.concurrent.locks.LockSupport.parkNanos (LockSupport.java:230)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos (AbstractQueuedSynchronizer.java:2109)
at java.util.concurrent.LinkedBlockingQueue.poll (LinkedBlockingQueue.java:467)
at java.util.concurrent.ThreadPoolExecutor.getTask (ThreadPoolExecutor.java:1091)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at e.d.b.b.e.l.j.b.run
at java.lang.Thread.run (Thread.java:923)
Type
"Signal Catcher" daemon prio=10 tid=6 Runnable
#0 pc 0000000000371015 /apex/com.android.art/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+76)
#0 pc 000000000043fb87 /apex/com.android.art/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits >&, bool, BacktraceMap*, bool) const+386)
#0 pc 000000000043b553 /apex/com.android.art/lib/libart.so (art::Thread::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&, bool, BacktraceMap*, bool) const+34)
#0 pc 0000000000458129 /apex/com.android.art/lib/libart.so (art::DumpCheckpoint::Run(art::Thread*)+664)
#0 pc 0000000000453703 /apex/com.android.art/lib/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+354)
#0 pc 0000000000452c3b /apex/com.android.art/lib/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&, bool)+1486)
#0 pc 0000000000452335 /apex/com.android.art/lib/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+604)
#0 pc 000000000040adc7 /apex/com.android.art/lib/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+130)
#0 pc 000000000041a94b /apex/com.android.art/lib/libart.so (art::SignalCatcher::HandleSigQuit()+1046)
#0 pc 0000000000419cef /apex/com.android.art/lib/libart.so (art::SignalCatcher::Run(void*)+246)
#0 pc 0000000000080923 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40)
#0 pc 0000000000039d63 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30)
Type
"HeapTaskDaemon" daemon prio=5 tid=8 WaitingForTaskProcessor
#0 pc 0000000000034018 /apex/com.android.runtime/lib/bionic/libc.so (syscall+28)
#0 pc 0000000000130db3 /apex/com.android.art/lib/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+82)
#0 pc 0000000000218b05 /apex/com.android.art/lib/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+316)
#0 pc 00000000002191f5 /apex/com.android.art/lib/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+48)
at dalvik.system.VMRuntime.runHeapTasks (Native method)
at java.lang.Daemons$HeapTaskDaemon.runInternal (Daemons.java:531)
at java.lang.Daemons$Daemon.run (Daemons.java:139)
at java.lang.Thread.run (Thread.java:923)
**the second one ANR is**
ANR details
Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10000010
cmp=com.packagename/com.google.firebase.iid.FirebaseInstanceIdReceiver (has extras) }
com.google.firebase.iid.FirebaseInstanceIdReceiver
filter_list
Add filter
date_range
Last 30 days
arrow_drop_down
Occurrences
240
Last 30 days
Total occurrences
1.85K
Lifetime
Impacted users
1.52K
Lifetime
Last occurred
2 hours ago
Occurrences of this ANR between Sep 11, 2021 and Oct 11, 2021
Occurrences
Impacted users
By app version
20.aab
By Android version
Android 8.1 (SDK 27)
Android 11 (SDK 30)
Android 6.0 (SDK 23)
Android 10 (SDK 29)
Others
By device
Huawei HUAWEI Y5 lite
Samsung Galaxy A10s
Samsung Galaxy A01 Core
Motorola moto e5 play
Others
Stack trace
Occurrence 1 of 240
ANR
brightness_1
Lenovo Tab M7
brightness_1
Android 9 (SDK 28)
brightness_1
20.aab
brightness_1
89 minutes ago
Stack trace not available
Issue Analytics
- State:
- Created 2 years ago
- Comments:15 (4 by maintainers)
Top Results From Across the Web
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
This ANR looks like a Firebase issue and it indeed is a Firebase issue. The currently latest version firebase-messaging:20.3. 0, still has this ......
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 >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 >Receive messages in an Android app - Firebase - Google
In some situations, FCM may not deliver a message. This occurs when there are too many messages (>100) pending for your app on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Guys, I finally found the root cause of this error!! It’s because MobileAds.initialize() is in MyApplication’s onCreate(). When push notification is received, FirebaseMessagingService class will be called -> MyApplication will also be created. -> MobileAds.initialize() is then executed on the main thread.
If MobileAds.initialize() take too long to complete(especially in slow devices), ANR will happen, while the app is actually in the background!
Official document from Admobs says
Before loading ads, have your app initialize the Mobile Ads SDK by calling MobileAds.initialize() which initializes the SDK and calls back a completion listener once initialization is complete (or after a 30-second timeout). This needs to be done only once, ideally at app launch.
Don’t trust them.
I faced the same problem, tested different libraries for a month. All firebase libraries half a year old work without ANR, but all the latest versions (in particular, performance) produce a lot of ANR