Skip to content

[Bug] ANR with Notification #1321

@jgerdoganakgun

Description

@jgerdoganakgun

Description

In my Unity project, I am using the Firebase Unity SDK (Analytics, Crashlytics, App, Messaging, and Remote Config). I have observed an ANR reported in the Firebase Console.

Some of the crash reports show no logs, while others include a notification_received log entry together with the current threads.

Device state (from Firebase Crashlytics):
• Background: 92%
• Rooted: 0%
• Proximity sensor: 98%
• Free RAM: 0B

Expected Behavior:
The app should not hang or trigger an ANR when receiving a Firebase Cloud Messaging event or while in background.

Actual Behavior:
• ANR is reported in Firebase Console.
• Often no useful log is attached.
• Occasionally, only a notification_received log with thread information is attached.

Release Distribution Type: https://developers.google.com/unity/archive#firebase
Installation Method: UPM with custom repo that contains .tgz contents

Reproducing the issue

Couldn't reproduce, and I was not able to isolate a scenario with sample code.

Firebase Unity SDK Version

13.1.0

Unity editor version

6000.0.53f1

Installation Method

Unity Package Manager

Problematic Firebase Component(s)

Messaging

Other Firebase Component(s) in use

Remote Config

Additional SDKs you are using

Applovin 8.3.1

Targeted Platform(s)

Android

Unity editor platform

Mac

Scripting Runtime

IL2CPP

Release Distribution Type

Open-source from this repo

Relevant Log Output

Triggered ANR, Unknown root cause

          main (native):tid=1 systid=28774 
#00 pc 0x9ef58 libc.so (__epoll_pwait + 20) (BuildId: e5ac3826f29eccb686494090360db63b)
#01 pc 0x6ee05 libc.so (epoll_wait + 16) (BuildId: e5ac3826f29eccb686494090360db63b)
#02 pc 0x1049f libutils.so (android::Looper::pollInner + 126) (BuildId: 8b2beef89031d2927b32fb7b6e5da388)
#03 pc 0x103c7 libutils.so (android::Looper::pollOnce + 58) (BuildId: 8b2beef89031d2927b32fb7b6e5da388)
#04 pc 0xeedc7 libandroid_runtime.so (android::android_os_MessageQueue_nativePollOnce + 24) (BuildId: 7405dcfc37a07d689ac2b9e18cd73825)
       at android.os.MessageQueue.nativePollOnce(Native method)
       at android.os.MessageQueue.next(MessageQueue.java:335)
       at android.os.Looper.loopOnce(Looper.java:161)
       at android.os.Looper.loop(Looper.java:288)
       at android.app.ActivityThread.main(ActivityThread.java:8061)
       at java.lang.reflect.Method.invoke(Native method)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:703)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions