Repository: firebase/firebase-android-sdk

Issue #4345: ANR from crashlytics related to Firebase
Created: 2022-11-19T15:03:51Z
[REQUIRED] Step 2: Describe your environment
Versions:
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'

    implementation 'com.google.firebase:firebase-crashlytics-ktx:18.3.2'
    implementation 'com.google.firebase:firebase-analytics-ktx:21.2.0'

[REQUIRED] Step 3: Describe the problem

We facing this issue for almost 3 months now. But recently the ANR count is insanely high as you can see in the above
From crashlytics:
main (timed waiting):tid=1 systid=19557 
       at jdk.internal.misc.Unsafe.park(Unsafe.java)
       at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1079)
       at java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1369)
       at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:278)
       at com.google.firebase.crashlytics.internal.common.Utils.awaitEvenIfOnMainThread(Utils.java:22)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:94)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsController$1.onUncaughtException(CrashlyticsController.java:94)
       at com.google.firebase.crashlytics.internal.common.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:26)
       at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1073)
       at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
       at java.lang.Thread.dispatchUncaughtException(Thread.java:2306)

Relevant Code:
// TODO(you): code here to reproduce the problem

Duplicate issue #4438: zzee.java line 1 com.google.android.gms.internal.measurement.zzee.zzg
Created: 2022-12-09T07:27:24Z
[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:

For general technical questions, post a question on StackOverflow
with the firebase tag.
For general Firebase discussion, use the firebase-talk
google group.
For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
Firebase support channel.

[REQUIRED] Step 2: Describe your environment

Android Studio version: Android Studio Dolphin | 2021.3.1 Patch 1 (Build #AI-213.7172.25.2113.9123335, built on September 30, 2022)
Firebase Component: com.google.firebase:firebase-analytics-ktx,
Component version: 21.2.0

[REQUIRED] Step 3: Describe the problem
Hi,
we are getting the root blocking ANR issue on the release build, reported on the Firebase Crashlytics Dashboard.
Steps to reproduce: -- unable to reproduce the issue.
Please find the below logs and other details.
main (runnable):tid=1 systid=31432 
       at com.google.android.gms.internal.measurement.zzee.zzg(zzee.java:1)
       at com.google.firebase.analytics.connector.AnalyticsConnectorImpl.getInstance(AnalyticsConnectorImpl.java:12)
       at com.google.firebase.analytics.connector.internal.AnalyticsConnectorRegistrar.lambda$getComponents$0(AnalyticsConnectorRegistrar.java:4)
       at com.google.firebase.analytics.connector.internal.zzb.create(zzb.java)
       at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0$com-google-firebase-components-ComponentRuntime(ComponentRuntime.java:132)
       at com.google.firebase.components.ComponentRuntime$$ExternalSyntheticLambda1.get(ComponentRuntime.java:1132)
       at com.google.firebase.components.Lazy.get(Lazy.java:53)
       at com.google.firebase.components.ComponentRuntime.doInitializeEagerComponents(ComponentRuntime.java:291)
       at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(ComponentRuntime.java:281)
       at com.google.firebase.FirebaseApp.initializeAllApis(FirebaseApp.java:594)
       at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:305)
       at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:269)
       at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:254)
       at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:51)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2388)
       at android.content.ContentProvider.attachInfo(ContentProvider.java:2358)
       at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:45)
       at android.app.ActivityThread.installProvider(ActivityThread.java:7841)
       at android.app.ActivityThread.installContentProviders(ActivityThread.java:7371)
       at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7279)
       at android.app.ActivityThread.access$1700(ActivityThread.java:299)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2184)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:264)
       at android.app.ActivityThread.main(ActivityThread.java:8312)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

Closing comment (2023-02-06T09:32:48Z): Hi @mohanK22, sorry for the long wait. May I know which Firebase Crashlytics version are you using? Upon our investigation, it seems that the issue might be related to #4345. This is currently being worked out, so let's leave this issue open for now and see if this gets resolved once the fix for Crashlytics is out.