firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.28k stars 578 forks source link

[FirebaseCrashlytics] ANR in FirebaseSessionsRegistrar #6523

Open pritesh-swiggy opened 7 hours ago

pritesh-swiggy commented 7 hours ago

Step 2: Describe your environment

Step 3: Describe the problem

main (runnable): tid=1 systid=16923
at com.google.firebase.sessions.settings.SessionsSettings.<clinit>(SessionsSettings.kt:152)
at com.google.firebase.sessions.FirebaseSessionsRegistrar.getComponents$lambda$3(FirebaseSessionsRegistrar.kt:87)
at com.google.firebase.tracing.ComponentMonitor.lambda$processRegistrar$0(ComponentMonitor.java:38)
at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(ComponentRuntime.java:160)
at com.google.firebase.components.Lazy.get(Lazy.java:53)
at com.google.firebase.components.ComponentContainer.get(ComponentContainer.java:48)
at com.google.firebase.components.RestrictedComponentContainer.get(RestrictedComponentContainer.java:105)
at com.google.firebase.sessions.FirebaseSessionsRegistrar.getComponents$lambda$0(FirebaseSessionsRegistrar.kt:52)
at com.google.firebase.tracing.ComponentMonitor.lambda$processRegistrar$0(ComponentMonitor.java:38)
at com.google.firebase.components.ComponentRuntime.lambda$discoverComponents$0(ComponentRuntime.java:160)
at com.google.firebase.components.Lazy.get(Lazy.java:53)
at com.google.firebase.components.ComponentRuntime.doInitializeEagerComponents(ComponentRuntime.java:322)
at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(ComponentRuntime.java:312)
at com.google.firebase.FirebaseApp.initializeAllApis(FirebaseApp.java:607)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:300)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:264)
at com.google.firebase.FirebaseApp.initializeApp(FirebaseApp.java:249)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(FirebaseInitProvider.java:69)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2697)
at android.content.ContentProvider.attachInfo(ContentProvider.java:2667)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(FirebaseInitProvider.java:61)
at android.app.ActivityThread.installProvider(ActivityThread.java:8783)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:8267)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7909)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2647)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:328)
at android.app.ActivityThread.main(ActivityThread.java:9237)
at java.lang.reflect.Method.invoke(Native method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)

Steps to reproduce:

  1. Integrate Firebase Crashlytics SDK into the project.
  2. Launch the application.
  3. Observe the ANR during app initialization.

Relevant Code:

 FirebaseCrashlytics.getInstance().setUserId(userId)
lehcar09 commented 5 hours ago

Hi @pritesh-swiggy, thanks you for reaching out. I tried reproducing the issue, however, I did not encounter any ANR issue. By any chance, are manually initializing the Firebase SDK? Can you share an MCVE? That'll help us to investigate the issue.

Aside from that, are you constantly experiencing this error? Does the issue occur on certain devices and/or android versions? Thanks!