Closed rkfteam closed 1 year ago
yes, I mean BoM v29.0.0. I will try the BoM v30.3.2
@OlehHaidaienko I noticed that you are using a version of the BoM before the ANR fix went in. Could you try updating to a newer version (ideally v31.1.1, which contains a fix for a deadlock)? Also, in reference to setting a breakpoint in FirebaseInstanceIdReceiver.onMessageReceive()
, yes, it would be expected to cause an ANR if that was blocked because the broadcast is not finished until that method returns. FirebaseInstanceIdReceiver
normally hands off the message to FirebaseMessagingService
and then returns immediately after that, so we shouldn't see a similar issue normally.
@1008k Were you seeing ANRs for instances using BoM v31.1.0? If so, could you create a new issue and add some of the ANR report stack traces that you saw?
@gsakakihara just to double-check, where in the release notes officially pointed that deadlock is fixed ? (v31.1.1)
It looks like the release notes may not have been published yet, but BoM v31.1.1 includes firebase-messaging v23.1.1, which should have the deadlock fix.
@fdspbsteam Release notes are up: https://firebase.google.com/support/release-notes/android#messaging_v23-1-1
Hey @rkfteam. 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!
Since there haven't been any recent updates here, I am going to close this issue.
@rkfteam 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 @OlehHaidaienko as far as I see in Google Play Console ANRs reports, Firebase BoM v31.1.1 didn't actually fix the issue. Could you share the link to a new issue if the new discussion was started somewhere else?
Most of these ANRs happen when the App is in background, etc. call by firebase broadcast receiver. May be your Appliction.onCreate is slow, or some slow code block on App start, etc, do too much on main thread. You should try to optimize the App start performance.
This article may be helpful: https://medium.com/bumble-tech/how-we-achieved-a-6x-reduction-of-anrs-part-2-fixing-anrs-24fedf9a973f
[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:
[REQUIRED] Step 2: Describe your environment
'com.google.firebase:firebase-common:20.1.0', 'com.google.firebase:firebase-auth:21.0.3', 'com.google.firebase:firebase-analytics:20.1.2', 'com.google.firebase:firebase-crashlytics-ndk:18.2.10', 'com.google.firebase:firebase-iid:21.1.0', 'com.google.firebase:firebase-messaging:23.0.2'
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
We are getting too many ANR errors.
Title: Native method - android.os.MessageQueue.nativePollOnce Subtitle: Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE cmp=package_name/com.google.firebase.iid.FirebaseInstanceIdReceiver }
What happened? How can we make the problem occur? This could be a description, log/console output, etc.
Honestly, we don't have steps, only Google Console:
Stack trace from GP console:
!!! To save you and me time on answers, I have previously read similar issues and prepared answers in advance: Q: Any chance you’re using a custom Application class? A: We use android:name=“androidx.multidex.MultiDexApplication”
We also use advertising SDKs in the application, but we don’t initialize them in onCreate Application.
Relevant Code: