camjan27
camjan27

Reputation: 31

Android simulator can't start the app during running test with Detox

I want to test our app with detox. On IOS it works fine, but it doesn't work yet on Android.

So when I run the detox test the simulator will open, but the app won't be started. In the logs is stated that the build was successful. Besides that when the test have failed, I can open the app on the simulator and everything works. (The tests are not ready started yet, they are in the setup fase when the issue happens)

This is the error message I get:

DetoxRuntimeError: 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. at EmulatorDriver._getInstrumentationCrashError (/Users/corinejanssen/PycharmProjects/de-selfcare/frontend/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:175:12) at EmulatorDriver.instrumentationCloseListener (/Users/corinejanssen/PycharmProjects/de-selfcare/frontend/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:142:67) at EmulatorDriver._terminateInstrumentation (/Users/corinejanssen/PycharmProjects/de-selfcare/frontend/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:166:12) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async ChildProcess. (/Users/corinejanssen/PycharmProjects/de-selfcare/frontend/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:266:7) { name: 'DetoxRuntimeError' }

Versions I use:

Is someone who has this issue and solved it?

Upvotes: 0

Views: 2359

Answers (1)

camjan27
camjan27

Reputation: 31

I solved this issue, by trying a lot of things. I think it was related to a missing dependency in the android/build.gradle.

For the exactness I put all the dependencies we add to this file:

dependencies {
    classpath "com.android.tools.build:gradle:3.4.2"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}

Upvotes: 2

Related Questions