5

I've an app in production with over 10k daily users
2% of the sessions are being reported as ANR due:

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

I've checked many sources nobody come with a real solution for that.
this link: https://github.com/firebase/quickstart-android/issues/594 starts with a good talking but as always firebase boys "burn out" and stop answering.

all the reports show something like:

"main" tid=1 Native
"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x73be7718 self=0xeeaf7000
  | sysTid=12027 nice=-4 cgrp=default sched=0/0 handle=0xf2fc54bc
  | state=S schedstat=( 1058569940 1464725264 2305 ) utm=68 stm=37 core=2 HZ=100
  | stack=0xff45f000-0xff461000 stackSize=8MB
  | held mutexes=
  #00  pc 000000000004a154  /system/lib/libc.so (__epoll_pwait+20)
  #01  pc 000000000001b799  /system/lib/libc.so (epoll_pwait+60)
  #02  pc 000000000001b7c9  /system/lib/libc.so (epoll_wait+12)
  #03  pc 0000000000010343  /system/lib/libutils.so (android::Looper::pollInner(int)+118)
  #04  pc 0000000000010235  /system/lib/libutils.so (android::Looper::pollOnce(int, int*, int*, void**)+32)
  #05  pc 00000000000e10ed  /system/lib/libandroid_runtime.so (android::NativeMessageQueue::pollOnce(_JNIEnv*, _jobject*, int)+24)
  #06  pc 00000000001a6aed  /system/framework/arm/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+92)
  at android.os.MessageQueue.nativePollOnce (MessageQueue.java)
  at android.os.MessageQueue.next (MessageQueue.java:325)
  at android.os.Looper.loop (Looper.java:142)
  at android.app.ActivityThread.main (ActivityThread.java:6942)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

I'm really not sure what to do to solve it.

These are my firebase imports

implementation 'com.google.firebase:firebase-storage:19.2.0'
implementation 'com.google.firebase:firebase-database:19.5.0'
implementation 'com.google.firebase:firebase-auth:19.4.0'
implementation 'com.google.firebase:firebase-dynamic-links:19.1.1'
implementation 'com.google.firebase:firebase-messaging:20.3.0'
implementation 'com.google.firebase:firebase-config:19.2.0'
Reaz Murshed
  • 23,691
  • 13
  • 78
  • 98
Rafael Lima
  • 3,079
  • 3
  • 41
  • 105
  • Can you please give us a hit what are the operations that you do when you receive this broadcast? Some code might be helpful. Thank you! – Reaz Murshed Oct 20 '20 at 22:15
  • @ReazMurshed, NOTHING. i dont handle any bradcast receiver in my app, anything that is being done is in the firebase inner app – Rafael Lima Oct 20 '20 at 22:27
  • Did you try setting the notification priority to `high` from your server along with `timeToLive` information inside notification payload? – Reaz Murshed Oct 20 '20 at 22:35
  • @ReazMurshed, i use firebase dashboard to send the messages, and despite changing the notication text i dont change anything else from the default values i guss time to live is 4 weeks the priority i dont know – Rafael Lima Oct 20 '20 at 22:39
  • I have to assume that the priority is `normal` as this is the default when you set some `data` payload. I am referring to this - https://firebase.google.com/docs/cloud-messaging/http-server-ref#downstream-http-messages-json. See the `priority` attribute. – Reaz Murshed Oct 20 '20 at 22:44
  • @ReazMurshed, i never set that attribute so it stays in the default value that according to the text is normal – Rafael Lima Oct 22 '20 at 14:03
  • 1
    @ReazMurshed Did you ever find a solution for this? We've recently updated our app, and are running into the exact same issue. – Pvel Apr 28 '21 at 09:52
  • did you find the solution, I'm also facing the same issue – Talha Chaudhry Mar 22 '23 at 11:08

0 Answers0