KakaoCup / Kakao

Nice and simple DSL for Espresso in Kotlin

Home Page:https://kakaocup.github.io/Kakao/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when app is using Firebase Performance library.

matale opened this issue · comments

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"
    }

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

@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.