Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when app is using Firebase Performance library. #78

Closed
matale opened this issue May 27, 2023 · 2 comments
Closed

Crash when app is using Firebase Performance library. #78

matale opened this issue May 27, 2023 · 2 comments
Assignees

Comments

@matale
Copy link

matale commented May 27, 2023

Steps to reproduce:

  1. Use firebase performance library
  2. Use Kakao 3.2.3

Observed Results:

  • App crashes when running test with a Firebase perf error, there seems to be some dependency clash maybe?
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 /data/app/~~4sKIYTcsfYQtc9JM7hBNvA==/me.mydomain.myapp.test-Im1U7Kqsm8hvB13qvO5VGA==/base.apk)
at com.google.firebase.perf.v1.ApplicationInfo.<clinit>(ApplicationInfo.java:1085)
at com.google.firebase.perf.v1.ApplicationInfo.newBuilder(ApplicationInfo.java:533)
at com.google.firebase.perf.transport.TransportManager.finishInitialization(TransportManager.java:227)
at com.google.firebase.perf.transport.TransportManager.syncInit(TransportManager.java:221)
at com.google.firebase.perf.transport.TransportManager.$r8$lambda$LuAwHBxy50Yf-ziHqcD54KjEPtk(Unknown Source:0)
at com.google.firebase.perf.transport.TransportManager$$ExternalSyntheticLambda1.run(Unknown Source:2)
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)

This Fix works for me:
Exclude protobuf-lite dependency from Kakao

    androidTestImplementation ("io.github.kakaocup:kakao:3.2.3")
    {
        exclude module: "protobuf-lite"
    }
@matale
Copy link
Author

matale commented May 27, 2023

You may close this just wanted to put it here for others.

@Vacxe Vacxe self-assigned this Jul 3, 2023
@Vacxe
Copy link
Member

Vacxe commented Jul 4, 2023

@matale

+--- androidx.test.espresso:espresso-contrib:3.5.1
...
|    \--- com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:3.1.2
|         +--- com.google.protobuf:protobuf-lite:3.0.1

That dependency going from espresso famework and https://mvnrepository.com/artifact/com.google.protobuf/protobuf-lite with 3.0.1 version. You probably using outdated version 3.0.0 in your project.

@Vacxe Vacxe closed this as completed Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants