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.

Firebase remote config update to 19.2.0 failure with Duplicate class com.google.protobuf.AbstractMessageLite found

See original GitHub issue

[READ] Step 1: Are you in the right place?

Unable to update the firebase remote config dependency to 19.2.0 Seeing the following error Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-javalite-3.11.0.jar (com.google.protobuf:protobuf-javalite:3.11.0) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)

Complete error log : error.txt

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.0.1

  • Firebase Component:Firebase remote config 19.2.0 Following firebase dependencies are used : const val config = “com.google.firebase:firebase-config:19.2.0” const val auth = “com.google.firebase:firebase-auth:19.1.0” const val database = “com.google.firebase:firebase-database:19.2.0” const val storage = “com.google.firebase:firebase-storage:19.1.0” const val mlvision = “com.google.firebase:firebase-ml-vision:18.0.2” const val mlvision_barcode_model = “com.google.firebase:firebase-ml-vision-barcode-model:16.1.1” const val messaging = “com.google.firebase:firebase-messaging:20.1.5” const val fire_store = “com.google.firebase:firebase-firestore:21.5.0” const val crashlytics = “com.google.firebase:firebase-crashlytics:17.0.0” const val crashlytics_gradle = “com.google.firebase:firebase-crashlytics-gradle:2.1.0” const val analytics = “com.google.firebase:firebase-analytics:17.4.2”

  • Component version: _____

[REQUIRED] Step 3: Describe the problem

Seeing the above mentioned error after updating the firebase remote config dependency to 19.2.0

  1. Followed the solution mentioned here : https://stackoverflow.com/questions/62764605/updated-firebase-dependency-and-got-duplicated-protobuf-classes-error : Still seeing the error after updating the dependencies as suggested.

  2. Tried adding the following work around as suggested on some of the threads here configurations { all { exclude(group = "com.google.protobuf", module = "protobuf-javalite") } }

We suspect the following crash is observed with the workaround

Fatal Exception: java.lang.NoSuchMethodError No static method registerDefaultInstance(Ljava/lang/Class;Lcom/google/protobuf/GeneratedMessageLite;)V in class Lcom/google/protobuf/GeneratedMessageLite; or its super classes (declaration of 'com.google.protobuf.GeneratedMessageLite' appears in base.apk!classes7.dex) com.google.firebase.remoteconfig.proto.ConfigPersistence$PersistedConfig.<clinit> (ConfigPersistence.java:813) com.google.firebase.remoteconfig.proto.ConfigPersistence$PersistedConfig.parseFrom (ConfigPersistence.java:402) com.google.firebase.remoteconfig.internal.LegacyConfigsHandler.readPersistedConfig (LegacyConfigsHandler.java:340) com.google.firebase.remoteconfig.internal.LegacyConfigsHandler.getConvertedLegacyConfigs (LegacyConfigsHandler.java:196) com.google.firebase.remoteconfig.internal.LegacyConfigsHandler.saveLegacyConfigsIfNecessary (LegacyConfigsHandler.java:151) com.google.firebase.remoteconfig.RemoteConfigComponent$$Lambda$4.call (RemoteConfigComponent.java:2) com.google.android.gms.tasks.zzz.run (zzz.java:2) java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167) java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641) java.lang.Thread.run (Thread.java:919)

Steps to reproduce:

Just updated the remote config dependency to 19.2.0 None of our dependencies are introducing the protobuf-java dependency

here are the dependencies : deps.txt

Relevant Code:

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
rlazocommented, Aug 26, 2020

Taking a look at https://developer.android.com/jetpack/androidx/releases/security all releases of androidx.security:security-crypto have been either alpha, beta or RC; no stable release yet, e.g. 1.0.0. Depending on a non stable release allows you to get the latest features, but they have an inherent risk. Wikipedia has a nice article with the difference between each type

https://en.wikipedia.org/wiki/Software_release_life_cycle#Stages_of_development

Depending on the RC instead of the beta, as it was before, is less risky, but keep in mind that it’s still not the same as a stable release.

1reaction
rlazocommented, Aug 26, 2020

Try updating androidx.security:security-crypto:1.0.0-beta01 to one of the RC

https://developer.android.com/jetpack/androidx/releases/security

They used to pull protobuf at a dependency, but it’s gone in the RCs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updated firebase dependency and got duplicated protobuf ...
1 exception was raised by workers: java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified ...
Read more >
Propagate Remote Config updates in real time - Firebase
Diagram showing a Remote Config update triggering FCM alerts via Cloud ... Each app instance that should receive realtime Remote Config updates must ......
Read more >
Updated firebase dependency and got duplicated protobuf ...
I'm getting this error after updating one of my firebase SDKs ... RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite ...
Read more >
Conflict issue with com.google.protobuf:protobuf-java and ...
Hello, I am implementing app, but I met conflict library issue. java.lang.RuntimeException: Duplicate class com.google.protobuf.
Read more >
Firebase Remote Config Triggers - Cloud Functions
update event. Event Type, Trigger. remoteconfig.update, Triggered when the remote config template is updated.
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