-
Notifications
You must be signed in to change notification settings - Fork 577
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
ANR Broadcast of Intent { act=com.google.android.c2dm.intent.RECEIVE cmp=package_name/com.google.firebase.iid.FirebaseInstanceIdReceiver } #3990
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Hi @rkfteam, thanks for reporting. Could you remove the package Upon checking the release notes for Cloud Messaging version 23.0.7:
So it might help to use the latest sdk version, let me know if this works. Thanks. |
@argzdev, thanks for the info. BUT: your most recent Unity Firebase Messaging 9.4.0 plugin still has the dependency
|
Thanks for the extra details, @rkfteam. I thought this was an Android project. If this is the dependency from Firebase Messaging 9.4.0 plugin in Unity, then there's nothing we can do about that. I do see that the version |
@argzdev, Yes, this is a Unity project. But it uses the same android dependencies like com.google.firebase:firebase-xxx. |
@rkfteam, I'm pertaining to the Firebase Messaging 9.4.0 plugin in Unity when I mentioned "nothing we can do about that" since this is already bundled together. As for the version of If we check the release notes for Cloud Messaging version 23.0.7:
Using the latest SDK version 23.0.7 should at least be able to lower down your ANRs. |
@argzdev, Okay, I understand about the plugin. What about the firebase libraries? Can you help identify the cause and find a solution? Will updating FCM to version 23.0.7 solve this issue? Did any research? Or is it just general advice: “Upgrade to the latest version available”? |
@rkfteam, usually we do give the general advice to update to the latest available version (this is to avoid bugs that are already resolved). However, this case is different since the release notes for FCM version 23.0.7 states that there has been a change in how message broadcasts are being handled within the service. - "Message broadcasts now finish immediately after binding to the service. This change should reduce the chance of ANRs." This should be a good sign that it'll be able to help reduce ANRs at a certain amount. As for identifying the exact cause of ANRs, these are caused by many factors including fcm related or non-fcm related issues. As a result even the provided stack trace don't contain enough information for us to diagnose forward. If a comprehensive bug report or logcat could be provided that would super helpful, then we can probably justify an engineer's time to dig into this issue deeper. As for now, let's keep this issue open in case some of our engineers might have an idea how to resolve this. Feel free to add extra information or details that you might find helpful. Thanks! |
@argzdev ,
What additional information do you need from our side? Don't hesitate, we'll provide whatever else you need. We want to get rid of or at least reduce the number of ANRs. Below I have provided more recent stack traces:
So issue automatically closes after 5 days 😞 |
I appreciate the stack traces, but these only look somewhat the same as the previous stack traces. Unfortunately, these don't really help us diagnose this any further.
I'm setting the thread to needs-info, to follow up on you after you use the latest SDK version. I'm assuming it'll take you a few days to know whether using the latest version helps. About the issue closing, if there's new information or update, we can always reopen it. |
Probably because instead of com.google.firebase:firebase-id the dependency is com.google.firebase:firebase-id-interop Regarding the link provided by ld2006203:
In the link provided by ld2006203 suggests to start the receiver in another process. How good and safe is this solution? |
现在最新的firebase unity版本上依然有这个库com.google.firebase:firebase-iid:21.1.0,这个我们可以删掉吗@gsakakihara |
@rkfteam 你们删掉com.google.firebase:firebase-iid:21.1.0 后还有ANR吗? |
@rkfteam, sorry I'm out of ideas at this point. We'll reply back on this post once we have updates. As for the said link, it looks like an experimental way to reduce ANR, so I'm not sure if this will help with your issue or not. That said, please do take precaution with this setup. @DarkYuanJs, yes, you may remove |
Our users also facing this weird ANR. We have a native app and Firebase BoM 29.2.0.
Maybe |
Hello everyone. For the past few months I have been suffering from this ANR as well. It has been said that the crash rate and ANR rate have a negative impact on the Play Store ranking factors, but the following article states that further penalties will be imposed. This is a very critical issue and I hope it will be fixed soon. |
@1008k isolating the FCM process and moving the processing in ApplicationClass to ActivityClass improved in my case. |
@caichuangcai Oh, I tried it and it seems so. |
@1008k in your case, when application received a firebase message, it will show the notification or not? |
@caichuangcai yes. A notification will appear and tapping it will launch the app. |
I'm using v29.0.0 and observing the same anr reports. Firebase team should investigate this issue further as it is there from a long time now. |
@usmanrana07 Please file a new issue unless you are seeing the exact same stack traces as the original issue. ANRs can have a lot of different causes and adding potentially unrelated reports makes it more difficult to keep track of everything. But first, I'm assuming you mean BoM v29.0.0? If so, that does not include the version of firebase-messaging that contains the ANR fix. Can you try to update to a recent version that includes the fix (at least firebase-messaging v23.0.7 or BoM v30.3.2, though you may want to wait for the upcoming release that should include #4327)? @rkfteam Following up on #3990 (comment), do you have any answers or more information on those questions? |
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 @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. This article may be helpful: |
[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:
with the firebase tag.
google group.
of the above categories, reach out to the personalized
Firebase support channel.
[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:
The text was updated successfully, but these errors were encountered: