firebase-android-sdk: NullPointerException on FirebaseInstallations.registerFidWithServer

Environment

  • Android Studio version: 3.6.3
  • Firebase Component: firebase-analytics, firebase-messaging, firebase-config, firebase-crashlytics -> firebase-installations
  • Component version: firebase-analytics:17.4.3, firebase-messaging:20.2.1, firebase-config:19.1.4, firebase-crashlytics:17.1.0 -> firebase-installations:16.3.2

Description

Crashlytics reported some crashes on some OnePlus 6 devices with Android 10 on 19/07/2020.

Stacktrace

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
       at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer(FirebaseInstallations.java:452)
       at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:331)
       at com.google.firebase.installations.FirebaseInstallations.lambda$doGetId$1(FirebaseInstallations.java:296)
       at com.google.firebase.installations.FirebaseInstallations$$Lambda$3.run(FirebaseInstallations.java:2000)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:919)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 11
  • Comments: 21 (8 by maintainers)

Most upvoted comments

@searchy2 That’s highly likely. Do you or others who are reporting crash clear the shared prefs?

@wugeo0824 We are rolling out a fix this week which should be released either by Friday or Monday next week. Updating to the latest version of FCM releasing this week should fix the issue.

Hi @francescocervone this issue was addressed in #1714 but we haven’t made a release including with the fix yet. I’ll keep this issue updated when the fix is out in a release.

@lucas34 Thank you so much for confirming.

I will go ahead and close this issue. Please feel free to reach out if you continue to see this issue.

Looks like a typo in the release note. 16.3.2 was rollout awhile ago. I’m trying to update to 16.3.3 to see if it fix.

@lucas34 You are right, that’s a typo. Thanks for catching it, we will fix the release notes in a short while. firebase-installations:16.3.3 or firebase-messaging:20.2.4 contain the probable fix.