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

[Android] Runtime crash cause of com.google.common.util.concurrent obfuscation #4458

Open
2 tasks done
aamagda opened this issue Apr 22, 2024 · 0 comments
Open
2 tasks done

Comments

@aamagda
Copy link

aamagda commented Apr 22, 2024

What happened?

I use release build type with minifyEnabled true and follow official documentation at https://wix.github.io/Detox/docs/guide/proguard-configuration/

The app has crashed, see the details below:

    @Thread main(2):
    java.lang.NoSuchMethodError: No static method getFuture(Landroidx/concurrent/futures/CallbackToFutureAdapter$Resolver;)Lcom/google/common/util/concurrent/ListenableFuture; in class Landroidx/concurrent/futures/CallbackToFutureAdapter; or its super classes (declaration of 'androidx.concurrent.futures.CallbackToFutureAdapter' appears in /data/app/~~6OaKP9qTbxW_59VCDY5GTQ==/ru.profi.x.rn-aDUNh-0jDZGe90FX2tmLog==/base.apk)
    	at androidx.test.core.app.ListFuture.<init>(ListFuture.java:72)
    	at androidx.test.core.app.DeviceCapture$forceRedrawGlobalWindowViews$1.run(DeviceCapture.kt:168)
    	at android.os.Handler.handleCallback(Handler.java:942)
    	at android.os.Handler.dispatchMessage(Handler.java:99)
    	at android.os.Looper.loopOnce(Looper.java:201)
    	at android.os.Looper.loop(Looper.java:288)
    	at android.app.ActivityThread.main(ActivityThread.java:7872)
    	at java.lang.reflect.Method.invoke(Native Method)
    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

What was the expected behaviour?

Adding next rule fixes runtime crash
-keep class com.google.common.util.concurrent.** { *; }

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.20.2
React Native version: 0.72.12
Has Fabric (React Native's new rendering system) enabled: (yes/no) NO
Node version: 20.7.0
Device model: pixel_3
Android version: system-images;android-33;default;arm64-v8a
Test-runner (select one): jest / other

Detox logs

Detox logs
paste logs here!

Device logs

Device logs
paste your device.log here!

More data, please!

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant