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

App can't launch with proguard-android-optimize.txt, but works with proguard-android.txt #4586

Open
1 task done
bryansoftdev opened this issue Sep 20, 2024 · 0 comments
Open
1 task done

Comments

@bryansoftdev
Copy link

bryansoftdev commented Sep 20, 2024

What happened?

Hi, when using the default ProGuard rules file (proguard-android-optimize.txt), I receive the following error

 Failed to run application on the device

    HINT: Most likely, your tests have timed out and called detox.cleanup() while it was waiting for "ready" message (over WebSocket) from the instrumentation process.

    > 21 |   await device.launchApp(launchArgs);

Here's my build.gradle release config. It works with proguard-android.txt, but not with proguard-android-optimize.txt

release {
            signingConfig signingConfigs.release
            minifyEnabled true
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            proguardFile "${rootProject.projectDir}/../node_modules/detox/android/detox/proguard-rules-app.pro"

            firebaseCrashlytics {
                mappingFileUploadEnabled true
            }
        }

I'm wondering if this problem is specific to my environment. Is anyone able to get it working with the optimize version?

Perhaps a warning could be added to the Android guide so people know to use proguard-android.txt.

Was it tested on latest Detox?

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

In what environment did this happen?

Detox version: ^20.25.5
React Native version: 0.75.2
Node version: v20.17.0
Android version: 34
Test-runner (select one): jest

@bryansoftdev bryansoftdev changed the title Default ProGuard rules file breaks Detox App can't launch with proguard-android-optimize.txt, but works with proguard-android.txt Sep 20, 2024
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