Error at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 3.6.1
  • Firebase Component: Performance
  • Component version: com.google.firebase:firebase-perf:19.0.5

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

The problem is shown in crashlytics, can’t reproduce.

Relevant Code:

java.lang.RuntimeException: 
  at android.app.ActivityThread.installProvider (ActivityThread.java:6452)
  at android.app.ActivityThread.installContentProviders (ActivityThread.java:5994)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:5900)
  at android.app.ActivityThread.access$1100 (ActivityThread.java:202)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1665)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loop (Looper.java:198)
  at android.app.ActivityThread.main (ActivityThread.java:6729)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)

Caused by: java.lang.IllegalStateException: 
  at com.google.firebase.iid.FirebaseInstanceId.zzl (FirebaseInstanceId.java:75)
  at com.google.firebase.iid.FirebaseInstanceId.getId (FirebaseInstanceId.java:49)
  at com.google.firebase.inappmessaging.FirebaseInAppMessaging.<init> (FirebaseInAppMessaging.java:81)
  at com.google.firebase.inappmessaging.FirebaseInAppMessaging_Factory.get (FirebaseInAppMessaging_Factory.java:46)
  at com.google.firebase.inappmessaging.FirebaseInAppMessaging_Factory.get (FirebaseInAppMessaging_Factory.java:12)
  at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)
  at com.google.firebase.inappmessaging.internal.injection.components.DaggerAppComponent.providesFirebaseInAppMessaging (DaggerAppComponent.java:186)
  at com.google.firebase.inappmessaging.FirebaseInAppMessagingRegistrar.providesFirebaseInAppMessaging (FirebaseInAppMessagingRegistrar.java:103)
  at com.google.firebase.inappmessaging.FirebaseInAppMessagingRegistrar.access$lambda$0 (FirebaseInAppMessagingRegistrar.java)
  at com.google.firebase.inappmessaging.FirebaseInAppMessagingRegistrar$$Lambda$1.create (FirebaseInAppMessagingRegistrar.java:2)
  at com.google.firebase.components.ComponentRuntime.lambda$new$0 (ComponentRuntime.java:69)
  at com.google.firebase.components.ComponentRuntime$$Lambda$1.get (ComponentRuntime.java:4)
  at com.google.firebase.components.Lazy.get (Lazy.java:53)
  at com.google.firebase.components.ComponentRuntime.initializeEagerComponents (ComponentRuntime.java:158)
  at com.google.firebase.FirebaseApp.initializeAllApis (FirebaseApp.java:563)
  at com.google.firebase.FirebaseApp.initializeApp (FirebaseApp.java:304)
  at com.google.firebase.FirebaseApp.initializeApp (FirebaseApp.java:268)
  at com.google.firebase.FirebaseApp.initializeApp (FirebaseApp.java:253)
  at com.google.firebase.provider.FirebaseInitProvider.onCreate (FirebaseInitProvider.java:51)
  at android.content.ContentProvider.attachInfo (ContentProvider.java:1936)
  at android.content.ContentProvider.attachInfo (ContentProvider.java:1911)
  at com.google.firebase.provider.FirebaseInitProvider.attachInfo (FirebaseInitProvider.java:45)
  at android.app.ActivityThread.installProvider (ActivityThread.java:6447)
  at android.app.ActivityThread.installContentProviders (ActivityThread.java:5994)
  at android.app.ActivityThread.handleBindApplication (ActivityThread.java:5900)
  at android.app.ActivityThread.access$1100 (ActivityThread.java:202)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1665)
  at android.os.Handler.dispatchMessage (Handler.java:107)
  at android.os.Looper.loop (Looper.java:198)
  at android.app.ActivityThread.main (ActivityThread.java:6729)
  at java.lang.reflect.Method.invoke (Method.java)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:493)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)

1 possible answer(s) on “Error at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)

  1. Hello @Belka1000867 , the stacktrace looks similar to the issue in #1339, we expect the fix to be released on March 30th, 2020.

    To confirm whether the issue is due to the same reason: Check whether you are using latest version of Firebase Messaging, it will force Performance Monitoring to use the latest version of InstanceId. Reference: #1339 (comment).

    If the situation described above matches your scenario, The following action to upgrade Firebase dependencies after release will resolve the issue:

    Firebase Messaging v20.2.2
    Firebase InstanceId v20.1.4
    Firebase Installations v16.2.0
    

    Reference: #1339 (comment)