Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
henryhong111 opened this issue Apr 14, 2023 · 23 comments

Comments

@henryhong111
Copy link

henryhong111 commented Apr 14, 2023

[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 Electric Eel | 2022.1.1 Patch 1
  • Firebase Component:
  • 'com.google.firebase:firebase-bom:31.1.0',
    'com.google.firebase:firebase-analytics',
    'com.google.firebase:firebase-crashlytics',
    'com.google.firebase:firebase-crashlytics-ndk',
    'com.google.firebase:firebase-messaging',
  • Component version: 23.1.0

[REQUIRED] Step 3: Describe the problem

I getting too many ANR error

android.os.MessageQueue.nativePollOnce
Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE cmp=com.hk.azal.live/com.google.firebase.iid.FirebaseInstanceIdReceiver }

Steps to reproduce:

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

I'm not sure, no steps, only Google Console ,I saw a same issue, but it was closed #3990
I have updated firebase-messaging to 23.1.0, but it still has no effect

"main" tid=1 Native
#00 pc 0x00000000000dea18 /apex/com.android.runtime/lib64/bionic/libc.so (__epoll_pwait+8)
#1 pc 0x000000000001a1f4 /system/lib64/libutils.so (android::Looper::pollInner(int)+180)
#2 pc 0x000000000001a0d8 /system/lib64/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+112)
#3 pc 0x000000000011ae5c /system/lib64/libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce(_JNIEnv*, _jobject*, long, int)+44)
at android.os.MessageQueue.nativePollOnce (Native method)
at android.os.MessageQueue.next (MessageQueue.java:335)
at android.os.Looper.loop (Looper.java:206)
at android.app.ActivityThread.main (ActivityThread.java:8653)
at java.lang.reflect.Method.invoke (Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)

"Signal Catcher" tid=2 Runnable
#00 pc 0x0000000000483028 /apex/com.android.art/lib64/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits >&, int, BacktraceMap*, char const*, art::ArtMethod*, void*, bool)+140)
#1 pc 0x0000000000588888 /apex/com.android.art/lib64/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits >&, bool, BacktraceMap*, bool) const+380)
#2 pc 0x00000000005a56d4 /apex/com.android.art/lib64/libart.so (art::DumpCheckpoint::Run(art::Thread*)+924)
#3 pc 0x000000000059f078 /apex/com.android.art/lib64/libart.so (art::ThreadList::RunCheckpoint(art::Closure*, art::Closure*)+536)
#4 pc 0x000000000059e134 /apex/com.android.art/lib64/libart.so (art::ThreadList::Dump(std::__1::basic_ostream<char, std::__1::char_traits >&, bool)+1928)
#5 pc 0x000000000059d5cc /apex/com.android.art/lib64/libart.so (art::ThreadList::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+776)
#6 pc 0x000000000054ae40 /apex/com.android.art/lib64/libart.so (art::Runtime::DumpForSigQuit(std::__1::basic_ostream<char, std::__1::char_traits >&)+196)
#7 pc 0x000000000056099c /apex/com.android.art/lib64/libart.so (art::SignalCatcher::HandleSigQuit()+1400)
#8 pc 0x000000000055f950 /apex/com.android.art/lib64/libart.so (art::SignalCatcher::Run(void*)+384)
#9 pc 0x00000000000f40c4 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#10 pc 0x000000000008ed10 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Jit thread pool worker thread 0" tid=7 Native
#00 pc 0x0000000000089c8c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
#1 pc 0x000000000019fd34 /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
#2 pc 0x00000000005a7350 /apex/com.android.art/lib64/libart.so (art::ThreadPool::GetTask(art::Thread*)+120)
#3 pc 0x00000000005a66e4 /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Run()+144)
#4 pc 0x00000000005a6190 /apex/com.android.art/lib64/libart.so (art::ThreadPoolWorker::Callback(void*)+192)
#5 pc 0x00000000000f40c4 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#6 pc 0x000000000008ed10 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"HeapTaskDaemon" tid=8 Waiting
#00 pc 0x0000000000089c90 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
#1 pc 0x00000000001a0104 /apex/com.android.art/lib64/libart.so (art::ConditionVariable::TimedWait(art::Thread*, long, int)+172)
#2 pc 0x00000000002d859c /apex/com.android.art/lib64/libart.so (art::gc::TaskProcessor::GetTask(art::Thread*)+516)
#3 pc 0x00000000002d8ed8 /apex/com.android.art/lib64/libart.so (art::gc::TaskProcessor::RunAllTasks(art::Thread*)+92)
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)

"ReferenceQueueDaemon" tid=9 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)

"FinalizerDaemon" tid=10 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)

"FinalizerWatchdogDaemon" tid=11 Timed Waiting
at java.lang.Thread.sleep (Native method)
at java.lang.Thread.sleep (Thread.java:442)
at java.lang.Thread.sleep (Thread.java:358)
at java.lang.Daemons$FinalizerWatchdogDaemon.sleepForNanos (Daemons.java:390)
at java.lang.Daemons$FinalizerWatchdogDaemon.waitForFinalization (Daemons.java:419)
at java.lang.Daemons$FinalizerWatchdogDaemon.runInternal (Daemons.java:325)
at java.lang.Daemons$Daemon.run (Daemons.java:139)
at java.lang.Thread.run (Thread.java:923)

"Binder:16558_1" tid=12 Native
#00 pc 0x00000000000dda54 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
#1 pc 0x0000000000097034 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
#2 pc 0x0000000000053420 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+248)
#3 pc 0x00000000000536f8 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
#4 pc 0x000000000005431c /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+72)
#5 pc 0x000000000007cde0 /system/lib64/libbinder.so (android::PoolThread::threadLoop()+400)
#6 pc 0x000000000001553c /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+320)
#7 pc 0x00000000000a4974 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144)
#8 pc 0x0000000000014db0 /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+408)
#9 pc 0x00000000000f40c4 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#10 pc 0x000000000008ed10 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Binder:16558_2" tid=13 Native
#00 pc 0x00000000000dda54 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4)
#1 pc 0x0000000000097034 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156)
#2 pc 0x0000000000053420 /system/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+248)
#3 pc 0x00000000000536f8 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24)
#4 pc 0x0000000000054348 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+116)
#5 pc 0x000000000007cde0 /system/lib64/libbinder.so (android::PoolThread::threadLoop()+400)
#6 pc 0x000000000001553c /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+320)
#7 pc 0x00000000000a4974 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144)
#8 pc 0x0000000000014db0 /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+408)
#9 pc 0x00000000000f40c4 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#10 pc 0x000000000008ed10 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Binder:16558_3" tid=14 Native
#00 pc 0x0000000000089c8c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
#1 pc 0x000000000019fd34 /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
#2 pc 0x000000000038dfcc /apex/com.android.art/lib64/libart.so (art::JNI::CallBooleanMethodV(_JNIEnv*, _jobject*, _jmethodID*, std::__va_list)+504)
#3 pc 0x000000000009eaa8 /system/lib64/libandroid_runtime.so (_JNIEnv::CallBooleanMethod(_jobject*, _jmethodID*, ...)+124)
#4 pc 0x000000000012cef4 /system/lib64/libandroid_runtime.so (JavaBBinder::onTransact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+160)
#5 pc 0x000000000004a834 /system/lib64/libbinder.so (android::BBinder::transact(unsigned int, android::Parcel const&, android::Parcel*, unsigned int)+232)
#6 pc 0x0000000000053af8 /system/lib64/libbinder.so (android::IPCThreadState::executeCommand(int)+700)
#7 pc 0x0000000000053780 /system/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+160)
#8 pc 0x0000000000054348 /system/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+116)
#9 pc 0x000000000007cde0 /system/lib64/libbinder.so (android::PoolThread::threadLoop()+400)
#10 pc 0x000000000001553c /system/lib64/libutils.so (android::Thread::_threadLoop(void*)+320)
#11 pc 0x00000000000a4974 /system/lib64/libandroid_runtime.so (android::AndroidRuntime::javaThreadShell(void*)+144)
#12 pc 0x0000000000014db0 /system/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+408)
#13 pc 0x00000000000f40c4 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#14 pc 0x000000000008ed10 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Profile Saver" tid=15 Native
#00 pc 0x0000000000089c8c /apex/com.android.runtime/lib64/bionic/libc.so (syscall+28)
#1 pc 0x000000000019fd34 /apex/com.android.art/lib64/libart.so (art::ConditionVariable::WaitHoldingLocks(art::Thread*)+148)
#2 pc 0x0000000000341d9c /apex/com.android.art/lib64/libart.so (art::ProfileSaver::Run()+484)
#3 pc 0x000000000034644c /apex/com.android.art/lib64/libart.so (art::ProfileSaver::RunProfileSaverThread(void*)+180)
#4 pc 0x00000000000f40c4 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64)
#5 pc 0x000000000008ed10 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

"Timer-0" tid=16 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.util.TimerThread.mainLoop (Timer.java:533)
at java.util.TimerThread.run (Timer.java:512)

"cached-pool-1-thread-0" tid=17 Timed Waiting
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)
at com.blankj.utilcode.util.ThreadUtils$UtilsThreadFactory$1.run (ThreadUtils.java)

"ScionFrontendApi" tid=18 Timed Waiting
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)

"GmsDynamite" tid=19 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 com.google.android.gms.dynamite.zza.run (com.google.android.gms:play-services-basement@@18.1.0:2)

"Crashlytics Exception Handler1" 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 com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun (ExecutorUtils.java)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run (BackgroundPriorityRunnable.java:27)
at java.lang.Thread.run (Thread.java:923)

"com.google.firebase.crashlytics.startup1" tid=21 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 com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun (ExecutorUtils.java)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run (BackgroundPriorityRunnable.java:27)
at java.lang.Thread.run (Thread.java:923)

"firebase-installations-executor-١" tid=22 Timed Waiting
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)

"awaitEvenIfOnMainThread task continuation executor1" tid=23 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 com.google.firebase.crashlytics.internal.common.ExecutorUtils$1$1.onRun (ExecutorUtils.java)
at com.google.firebase.crashlytics.internal.common.BackgroundPriorityRunnable.run (BackgroundPriorityRunnable.java:27)
at java.lang.Thread.run (Thread.java:923)

"firebase-installations-executor-٢" tid=24 Timed Waiting
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)

Relevant Code:

// TODO(you): code here to reproduce the problem
@google-oss-bot
Copy link
Contributor

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@argzdev
Copy link
Contributor

argzdev commented Apr 14, 2023

Thanks for reaching out, @henryhong111. Could you answer a few questions for me below:

  1. Do you have any code snippets you can share with us related to firebase-messaging?
  2. Are you running any heavy processing codes in the Application class, specifically in the onCreate? If so, could you try moving it to different parts of your app and see if that works?
  3. Could you try firebase-messaging version 23.1.1, according to the release notes, there was a fix regarding ANRs on that version.

Let me know if any of these help, thanks!

@henryhong111
Copy link
Author

henryhong111 commented Apr 18, 2023

Thanks for reaching out, @henryhong111. Could you answer a few questions for me below:

  1. Do you have any code snippets you can share with us related to firebase-messaging?
  2. Are you running any heavy processing codes in the Application class, specifically in the onCreate? If so, could you try moving it to different parts of your app and see if that works?
  3. Could you try firebase-messaging version 23.1.1, according to the release notes, there was a fix regarding ANRs on that version.

Let me know if any of these help, thanks!
1.This is my code
in MainActivity

 private void initFCM() {
        if (noticeOpen) {
            FirebaseMessaging.getInstance().getToken().addOnCompleteListener(task -> {
                if (!task.isSuccessful()) {
                    Log.w(TAG, "Fetching FCM registration token failed", task.getException());
                    return;
                }
                // Get new FCM registration token
                String token = task.getResult();
                updateFCMToken(token);
            });

            FirebaseMessaging.getInstance().subscribeToTopic("XXXX").addOnCompleteListener(task -> Log.d(TAG, task.isSuccessful() ? "Subscribed" : "Subscribe failed"));
        }
    }

In service


override fun onMessageReceived(message: RemoteMessage) {

        message.notification?.body?.let { body ->
            PushManager.instance.sendNotification(
                this,
                body,
                message.notification?.title,
                message.notification?.imageUrl?.toString()
            )
        }
    }

2.In the onCreate method of the application, I moved heavy tasks to a sub-thread, but it still has no effect.
3.I will try using firebase-messaging version 23.1.1 in the next release, but I am not sure if it will work.

@YuTianTina
Copy link

I have same ANR on firebase-messaging:23.0.5

@Bodrihin
Copy link

I have same ANR. Installed firebase for unity: 10.7.0

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

@argzdev
Copy link
Contributor

argzdev commented Apr 18, 2023

Thanks for confirming, @henryhong111. The fix regarding firebase-messaging version 23.1.1 is with dealing of handling simultaneous messages. Do you perhaps have multiple campaigns setup?

Hi @YuTianTina, please try upgrading to the latest version 23.1.2 and see if that helps.

Hi @Bodrihin, was this issue not present in the previous version of Firebase Unity?

@Bodrihin
Copy link

Hi @Bodrihin, was this issue not present in the previous version of Firebase Unity?

yes, the previous one too

@henryhong111
Copy link
Author

Thanks for confirming, @henryhong111. The fix regarding firebase-messaging version 23.1.1 is with dealing of handling simultaneous messages. Do you perhaps have multiple campaigns setup?

Sorry, I can't understand your question. Could you describe it in detail?

@argzdev
Copy link
Contributor

argzdev commented Apr 19, 2023

Hi @henryhong111, sorry for the confusion. What I meant is do you have many campaigns setup in your Firebase Console dashboard? I think the issue might be due to your campaigns sending out a lot notifications all at once which is causing the issue. However, the update in 23.1.1 should fix this issue. Let me know if updating to that version or a higher version fixes the issue. Thanks.

@google-oss-bot
Copy link
Contributor

Hey @henryhong111. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Contributor

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

@henryhong111 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.

@YuTianTina
Copy link

Thanks for confirming, @henryhong111. The fix regarding firebase-messaging version 23.1.1 is with dealing of handling simultaneous messages. Do you perhaps have multiple campaigns setup?

Hi @YuTianTina, please try upgrading to the latest version 23.1.2 and see if that helps.

Hi @Bodrihin, was this issue not present in the previous version of Firebase Unity?

@argzdev it still not work on '23.1.2', the ANR is still exist

@henryhong111
Copy link
Author

Maybe we need to re-open this issue

@argzdev argzdev reopened this May 25, 2023
@google-oss-bot
Copy link
Contributor

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

@henryhong111 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.

@gsakakihara
Copy link
Contributor

@henryhong111

Is that the complete list of threads during the ANR? I noticed that there don't appear to be any Firebase Messaging threads, which may mean that this is happening before FirebaseMessaging is being initialized. This usually means that the app is not getting to handling the the message broadcast before the ANR timeout. Some issues we have seen are when the app is taking too long during initialization or if the main thread is being occupied by other operations so the broadcast can't be delivered to the receiver until too late.

@its-Chiedu
Copy link

An option to send a bugreport would solve this in no time.

@argzdev
Copy link
Contributor

argzdev commented Sep 4, 2023

Hi @its-Chiedu, that sounds interesting. Can you explain this further how you would like it to work?

@radityagumay
Copy link

i have the same ANR in the com.google.firebase:firebase-bom:30.5.0

@gsakakihara
Copy link
Contributor

@radityagumay Do you have the same stack traces as the original issue?

If so, have you looked at #4894 (comment)? Have you looked into whether your app is taking a long time to initialize (particularly on low end devices where things like file operations may take much longer than expected) or whether the main/UI thread could have too many operations scheduled, so the app doesn't get to handling the broadcast until after the ANR timer has expired?

If not, could you open a separate issue with the new stack traces?

@google-oss-bot
Copy link
Contributor

Hey @henryhong111. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@its-Chiedu
Copy link

Hi @its-Chiedu, that sounds interesting. Can you explain this further how you would like it to work?

I think this might be impossible - I haven't found a way to programmatically send a bug report and not sure if the tombstone is reachable in order to send it on restart.

@google-oss-bot
Copy link
Contributor

Hey @henryhong111. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Contributor

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

@henryhong111 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.

@firebase firebase locked and limited conversation to collaborators Jan 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants