question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash: java.lang.AbstractMethodError in com.google.firebase.installations.remote.FirebaseInstallationServiceClient.readGenerateAuthTokenResponse

See original GitHub issue

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Bumblebee 2021.1.1 Patch 2
  • Firebase Component: Cloud Messaging
  • Component version: 23.0.0

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

We rebuilt our app to remove the android.permission.ACCESS_BACKGROUND_LOCATION permission.

Ever since then, we see the following crash in the Play Console:

java.lang.AbstractMethodError: 
  at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.readGenerateAuthTokenResponse (FirebaseInstallationServiceClient.java:569)
  at com.google.firebase.installations.remote.FirebaseInstallationServiceClient.generateAuthToken (FirebaseInstallationServiceClient.java:421)
  at com.google.firebase.installations.FirebaseInstallations.fetchAuthTokenFromServer (FirebaseInstallations.java:566)
  at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary (FirebaseInstallations.java:390)
  at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2 (FirebaseInstallations.java:377)
  at com.google.firebase.installations.FirebaseInstallations.$r8$lambda$VZq1h0TBcWNH8Y5yY86ujrFFyLo (FirebaseInstallations.java)
  at com.google.firebase.installations.FirebaseInstallations$$InternalSyntheticLambda$0$8f6250a76dc84afdee54bd79d6c6b27858a3db00ee2f9ff4dae9d6825fe4cbe4$0.run$bridge (FirebaseInstallations.java:18)
  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:920)

Across hundreds of different devices/OS versions/etc.

It’s possible that rebuilding the app picked up some updated dependencies somewhere along the way.

No one on our team can reproduce these crashes, across multiple devices/OS versions/etc. Since we can’t get a repro, and the crash is in a Google library, we’re not sure what steps to take next. We’ve just been trying different build tool versions, compile SDKs, etc etc.

We don’t see the crashes in the Play Console pre-launch. We don’t see the crashes on Firebase Test Lab with the following configurations:

Oriole, API Level 31 Pixel 5e, API Level 30 Pixel 4, API Level 29 Pixel 3, API Level 28 Nexus 5, Virtual, API Level 19

Our configuration was (when our app worked without crashes):

Build Tools: 30.0.2 Min SDK: 16 Target SDK: 30 Compile SDK: 30

Dependencies:

com.google.android.gms:play-services-auth:17.+
com.google.firebase:firebase-messaging:20.+

We rebuilt the app with the exact same dependencies etc, but it’s possible something changed in the dependency tree.

We’ve since updated all the dependencies to the latest versions, so our build looks like:

Build Tools: 32.0.0 Min SDK: 19 Target SDK: 30 Compile SDK: 31

Dependencies:

com.google.android.gms:play-services-auth:20.+
com.google.firebase:firebase-messaging:23.+

We still see the crash in Play Console.

Please… help.

Relevant Code:

      FirebaseMessaging.getInstance().getToken().addOnCompleteListener(task -> {
        if (!task.isSuccessful()) {
          return;
        }

        String token = task.getResult();

        registerWithC2DMServer(token);
      });

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
omarkilanicommented, Mar 8, 2022

@argzdev the proguard rules in https://github.com/firebase/firebase-android-sdk/issues/3507#issuecomment-1061372855 seem to have resolved these crashes.

It’s not really clear why they’re needed now, but maybe this is useful information for… someone?

Thanks!

0reactions
argzdevcommented, Mar 8, 2022

Hi @omarkilani, thanks for the updates! I’m sure these details would be useful in the future, and I’m glad you were able to resolve it.

Great catch on the R8, there are also other different Firebase products such as Analytics, Performance which had issues on R8 when fullMode is enabled. I guess this is also one of those cases.

Anyhow, since this issue has been resolved, I’ll close this for now. Feel free to add any extra details! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.AbstractMethodError in Firebase Android ...
The crash is not reproducible by anyone on team and none of the pre-launch test devices exhibit any issue or any mass device...
Read more >
FirebaseInstallationServiceClient AbstractMethodError
Fatal Exception: java.lang.AbstractMethodError: abstract method "W0.j W0.j.C1(int)" at com.google.firebase.installations.remote.
Read more >
Android 5.0.1 crash: java.lang.VerifyError - Google Groups
to Firebase Google Group. Android app compiled with Firebase client libs v9.6.0. I got a few automated crash reports with this stack trace:...
Read more >
Android Question FirebaseAnalytics.Firebase crashing app
FATAL EXCEPTION: main Process: iBrew.cervejaria, PID: 2017 java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.
Read more >
Found crash at com.newrelic.agent.android.instrumentation ...
targetSdkVersion 30. Stack trace: Fatal Exception: java.lang.AbstractMethodError: abstract method “boolean com.google.protobuf.ExtensionSchema.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found