Skip to content
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's in Google Play Developer Console related to com.google.firebase.cpp.RegistrationIntentService #939

Closed
Vesterix opened this issue Jan 22, 2021 · 12 comments
Assignees
Labels
api: messaging needs-info Need information for the developer type: bug

Comments

@Vesterix
Copy link

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2018.4.29f1
  • Firebase Unity SDK version: 7.0.0
  • Source you installed the SDK: Unity Package Manager)
  • Problematic Firebase Component: Messaging
  • Other Firebase Components in use: Crashlytics, Dynamic Links, Remote Config
  • Additional SDKs you are using: Facebook, AdMob, IronSource, Applovin SDK, Helpshift, OneSignal
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime: IL2CPP

[REQUIRED] Please describe the issue here:

Google Play Developer Console has a lot of ANRs. Most of them happened on Android v7, but not all.

Steps to reproduce:

Unfortunately I don't know exactly how to reproduce it. It's not reproducing on test devices only in users
завантаження

завантаження (1)
Screenshot_5

@Vesterix Vesterix added the new New issue. label Jan 22, 2021
@DellaBitta
Copy link
Contributor

Hi @Vesterix,

We haven't had any other issues reported with the RegistrationIntentService but there was a known issue last week with Cloud Messaging not working properly on Androd due to a backend configuration problem. That issue has now since been resolved.

I'm not sure if your issue is related but could ou check if issues continue to to occur for your users? Thanks!

@DellaBitta DellaBitta added needs-info Need information for the developer and removed new New issue. labels Jan 26, 2021
@google-oss-bot google-oss-bot added the stale Don't have recent activity label Feb 2, 2021
@google-oss-bot
Copy link

Hey @Vesterix. 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!

@Vesterix
Copy link
Author

Vesterix commented Feb 2, 2021

We still continue to receive reports about crashes
image
image
image

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed stale Don't have recent activity needs-info Need information for the developer labels Feb 2, 2021
@chkuang-g
Copy link
Contributor

chkuang-g commented Mar 4, 2021

@Vesterix

Did some digging and here is my understanding for your situation.

Seems like you have ANR for both RegistrationIntentService and MessagingUnityPlayerActivity, which is another class delivered in Unity SDK.

The ANR for MessagingUnityPlayerActivity might be related to #543 and #877. We were using IntentService instead of JobIntentService for MessageForwardingService which is causing some issue with Android O (API level 26+). See this.
And unfortunately MessagingUnityPlayerActivity is using MessageForwardingService. We have implemented a patch, and another patch for the regression. Both should be included in the latest Firebase 7.1.0.
https://firebase.google.com/support/release-notes/unity#fcm_2
https://firebase.google.com/support/release-notes/unity#fcm

The ANR for RegistrationIntentService seems very similar to the problem with MessageForwardingService, and we should upgrade it to JobIntentService as well.

However, your crashes seems to occur only on Android M and N (API 23, 24, 25), which is coincidentally right before Android O. Seems slightly different behavior but I think they are related.

Is there any chance that you can get the stacktrace of either ANR?
Also, I assume you did not configure a custom entry point Activity like documented here, did you?

This seems to be an legit issue. I will mark it as a bug for now.

@chkuang-g chkuang-g added needs-info Need information for the developer type: bug and removed needs-attention Need Googler's attention type: question labels Mar 4, 2021
@chkuang-g chkuang-g changed the title ANR's in Google Play Developer Console ANR's in Google Play Developer Console related to com.google.firebase.cpp.RegistrationIntentService Mar 4, 2021
@Vesterix
Copy link
Author

Vesterix commented Mar 5, 2021

Thanks for your reply. Yes we don't configure a custom entry point Activity. Also we have upgraded version to 7.1.0 and wait for new reports from play console. But with new version we have additional crashes i am not sure that this problem relates to this issue or need create else.

Here is some reports from Crashlytics:
crash_report_4.txt
crash_report_2.txt
crash_report_1.txt
crash_report_3.txt

@google-oss-bot google-oss-bot added needs-attention Need Googler's attention and removed needs-info Need information for the developer labels Mar 5, 2021
@chkuang-g
Copy link
Contributor

chkuang-g commented Mar 6, 2021

Yikes, that line libFirebaseCppApp-7_1_0.Firebase_App_CSharp_StringStringMap_ContainsKey(Firebase_App_CSharp_StringStringMap_ContainsKey looks very concerning to me.

This looks like a different issue. For issue management sake, could you open an new ticket, include your latest configurations and these logs in it?

Also, please do follow up if you still see ANR on either RegistrationIntentService or MessagingUnityPlayerActivity with 7.1.0 in this thread.

Thank you and have a good weekend.

Shawn

@wesclarkemag
Copy link

wesclarkemag commented Mar 24, 2021

Hello. We're also seeing a cluster of these in our ANR and Crash reports via the Google Play Console that just rolled out.

Unity editor version: 2019.4.15f1
Firebase Unity SDK version: 7.1.0
Source you installed the SDK: Unity Package Manager)
Problematic Firebase Component: Messaging
Other Firebase Components in use: Crashlytics, Dynamic Links, Cloud Messaging, Google Analytics for Firebase
Additional SDKs you are using: Facebook, IronSource
Platform you are using the Unity editor on: MacOS, building via CI
Platform you are targeting: Android
Scripting Runtime: IL2CPP

We're also seeing this in conjunction with reports of No Loads from our users. We're not 100% sure if these are related right now, but the timing and devices line up. In our case, this occurs after the splash screen has completed and initialisation begins.

Screenshot 2021-03-24 at 20 56 41

Following is stack trace of a MessagingUnityPlayerActivity not responding event:

Screenshot 2021-03-24 at 21 02 13

We're also getting instances of RegistrationIntentService problem

Screenshot 2021-03-24 at 21 07 50

The following is the stack trace

registrationintent_anr_log.txt

@Vesterix are you still experiencing problems?
@chkuang-g

Thanks

@Vesterix
Copy link
Author

@wesclarkemag We upgraded to 7.1.0 version, but I have not information from publisher about ANR, so it can be fixed or publisher just not informed me yet.

@HosseinPan
Copy link

We have Upgraded to 7.1.0 but still having these ANRs.
Unity editor version: 2019.4.12f1
Firebase Unity SDK version: 7.1.0
Source you installed the SDK: Unity Package Asset
Problematic Firebase Component: Messaging
Other Firebase Components in use: Crashlytics, Analytic, Remote Config
Additional SDKs you are using: Facebook, Appodeal, Appsflyer
Platform you are using the Unity editor on: Windows
Platform you are targeting: Android
Scripting Runtime: IL2CPP
chrome_nloNA2b74D
ANR Logs.txt

@nanddo
Copy link

nanddo commented Apr 21, 2021

Project information

  • Unity editor version: 2019.4.21f1
  • Firebase Unity SDK version: 7.1.0
  • Source you installed the SDK: Unity Package Manager
  • Problematic Firebase Component: Cloud Messaging
  • Other Firebase Components in use: Analytics, Crashlytics, Remote Config
  • Additional SDKs you are using: Facebook, IronSource, DeltaDNA, AdMob, EDM4U, BestHttp Pro, Google Play Games, Kochava, TapJoy, Unity IAP, Unity Local Notifications
  • Platform you are using the Unity editor on: Windows/Mac
  • Platform you are targeting: Android & iOS
  • Scripting Runtime: IL2CPP

Issue here:
We're observing a pretty similar behavior on our side too. Starting on March 22nd, we observed a huge spike on ANRs related to Firebase Cloud Messaging. Since that day, the ANR rate is above bad behavior. The main spike was between March 22nd and 25th. After that, the numbers went down, but always above or too close to the bad behavior. The peers median is consistent with the behavior we're seeing.
Time Series

The problem is affecting only Android 8 and 9 (SDKs 26, 27 and 28). Here's amount of ANRs related to Firebase:

  1. com.google.firebase.MessagingUnityPlayerActivity (39 in the last 7 days)
  2. com.google.firebase.iid.FirebaseInstanceIdReceiver (17 in the last 7 days)
    We also observed that each occurrence is directly related to the push notification times schedule on Firebase Console.
    Android versions

The ANR logs are nearly identical to the ones present in the thread.

Any help or guidance will be much appreciated.

@alexames alexames self-assigned this May 24, 2021
@alexames
Copy link

Hi Vesterix,

Based on the call stacks you've showed us, and after talking with someone on the FCM team to help diagnose this, we suspect that there might be more than one issue causing you issues at the same time.

As chkuang-g mentioned a while back, we've upgraded the RegistrationIntentService to a JobIntentService. Even though this is mainly done to support Android O, we suspect it may also fix the issue you're seeing with the ANRs related to the RegistrationIntentService.

As for the crashes, I'm not convinced it's related. It's a little hard to tell what's going on from the call stack alone though, and without a reproduction case it's hard to debug. If you can find a reproduction case, that would really help us get to the root of the issue.

Try upgrading to the latest version of FCM and seeing if that reduces or eliminates the number or errors you're getting.

@alexames alexames reopened this Jun 15, 2021
@alexames alexames added the needs-info Need information for the developer label Jun 15, 2021
@alexames
Copy link

I'm going to go ahead and close this for now, if you see this still happening after updating your library feel free to reopen it. As I mentioned before, it looks like there may have been a second issue at play here too, so if you still see that as well open a new issue so we can track that separately.

@firebase firebase locked and limited conversation to collaborators Jul 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: messaging needs-info Need information for the developer type: bug
Projects
None yet
Development

No branches or pull requests

8 participants