简体   繁体   中英

ANR because of Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE in FirebaseInstanceIdReceiver

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

com.google.firebase.iid.FirebaseInstanceIdReceiver**

in Android 8 ND 8.1 devices

Stack trace from google play console:

"main" prio=5 tid=1 Native
  | group="main" sCount=1 dsCount=0 flags=1 obj=0x73479f50 self=0x79546c0a00
  | sysTid=28427 nice=0 cgrp=default sched=0/0 handle=0x7959c449c8
  | state=S schedstat=( 364660644 78678379 421 ) utm=28 stm=8 core=1 HZ=100
  | stack=0x7fd16fd000-0x7fd16ff000 stackSize=8MB
  | held mutexes=
  #00  pc 000000000007083c  /system/lib64/libc.so (__epoll_pwait+8)
  #01  pc 0000000000020670  /system/lib64/libc.so (epoll_pwait+48)
  #02  pc 00000000000165a4  /system/lib64/libutils.so (_ZN7android6Looper9pollInnerEi+148)
  #03  pc 0000000000016484  /system/lib64/libutils.so (_ZN7android6Looper8pollOnceEiPiS1_PPv+116)
  #04  pc 000000000016053c  /system/lib64/libandroid_runtime.so (???)
  #05  pc 00000000001efb8c  /system/framework/arm64/boot-framework.oat (Java_android_os_MessageQueue_nativePollOnce__JI+140)
  at android.os.MessageQueue.nativePollOnce (Native method)
  at android.os.MessageQueue.next (MessageQueue.java:325)
  at android.os.Looper.loop (Looper.java:142)
  at android.app.ActivityThread.main (ActivityThread.java:6938)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)

I am facing this problem after upgrading to Android Oreo. Is there any solution to this?

We experienced these ANRs a lot too and the only fix that reduced it was this suggestion of updating the dependencies to 21.1.0 that removes the dependency on FirebaseInstanceId which is always part of these crash logs: https://github.com/firebase/firebase-android-sdk/issues/2014#issuecomment-820390156

So, updating these dependencies from

"com.google.firebase:firebase-iid:20.1.1”
"com.google.firebase:firebase-messaging:20.1.2"

to

"com.google.firebase:firebase-iid:21.1.0”
"com.google.firebase:firebase-messaging:21.1.0"

results in: 在此处输入图像描述

Hasn't completely gotten rid of it but I hope it helps some of you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM