wix / Detox

Gray box end-to-end testing and automation framework for mobile apps
https://wix.github.io/Detox/
MIT License
11.15k stars 1.92k forks source link

DetoxRuntimeError: Failed to run application on the device on Android #2042

Closed ManAnRuck closed 4 years ago

ManAnRuck commented 4 years ago

Describe the bug

with github actions I get very often the same issue. 1 test works great 3 others are failing. it looks like the emulator is running (I see the completed progress bar of the bundler ./index.js) but then I get the following error messages:

2020-05-06T15:52:20.7250140Z Loading dependency graph, done.
2020-05-06T15:54:12.4560040Z detox[8903] ERROR: [exec.js/EXEC_FAIL, #29] ""/Users/runner/android-sdk/platform-tools/adb" -s emulator-17542 shell "ps | grep \"de\.democracydeutschland\.app\.internal$\""" failed with code = 1, stdout and stderr:
2020-05-06T15:54:12.4560460Z 
2020-05-06T15:54:12.4560900Z detox[8903] ERROR: [exec.js/EXEC_FAIL, #29] 
2020-05-06T15:54:12.4561230Z detox[8903] ERROR: [exec.js/EXEC_FAIL, #29] 
2020-05-06T15:54:15.1112660Z detox[8903] ERROR: [exec.js/EXEC_FAIL, #30] ""/Users/runner/android-sdk/platform-tools/adb" -s emulator-17542 shell "ps | grep \"de\.democracydeutschland\.app\.internal$\""" failed with code = 1, stdout and stderr:
2020-05-06T15:54:15.1114830Z 
2020-05-06T15:54:15.1115460Z detox[8903] ERROR: [exec.js/EXEC_FAIL, #30] 
2020-05-06T15:54:15.1115910Z detox[8903] ERROR: [exec.js/EXEC_FAIL, #30] 
2020-05-06T15:55:25.6101620Z  BUNDLE  [android, dev] ./index.js â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“â–“ 100.0% (1709/1709), done.
2020-05-06T15:55:25.6102350Z 
2020-05-06T15:55:29.7432860Z detox[8903] ERROR: [DetoxExportWrapper.js/DETOX_INIT_ERROR] 
2020-05-06T15:55:29.7534490Z  DetoxRuntimeError: Failed to run application on the device
2020-05-06T15:55:29.7634660Z 
2020-05-06T15:55:29.7736620Z 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.
2020-05-06T15:55:29.7767360Z     at EmulatorDriver._getInstrumentationCrashError (/Users/runner/runners/2.169.1/work/democracy-client/democracy-client/packages/mobile-app/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:170:12)
2020-05-06T15:55:29.7771560Z     at EmulatorDriver.instrumentationCloseListener (/Users/runner/runners/2.169.1/work/democracy-client/democracy-client/packages/mobile-app/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:133:67)
2020-05-06T15:55:29.7852090Z     at EmulatorDriver._terminateInstrumentation (/Users/runner/runners/2.169.1/work/democracy-client/democracy-client/packages/mobile-app/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:161:12)
2020-05-06T15:55:29.7852690Z     at processTicksAndRejections (internal/process/task_queues.js:97:5)
2020-05-06T15:55:29.7884560Z     at ChildProcess.<anonymous> (/Users/runner/runners/2.169.1/work/democracy-client/democracy-client/packages/mobile-app/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:279:7)
2020-05-06T15:55:29.7886340Z detox[8903] INFO:  Verification.test.ts is assigned to emulator-17542 (test)
2020-05-06T15:55:29.7887130Z detox[8903] INFO:  Verification: Szenario 1: Verifizieren via BurgerMenu/Profil
2020-05-06T15:56:24.0239080Z detox[8903] ERROR: [exec.js/EXEC_FAIL, #53] ""/Users/runner/android-sdk/platform-tools/adb" -s emulator-17542 shell "ps | grep \"de\.democracydeutschland\.app\.internal$\""" failed with code = 1, stdout and stderr:

To Reproduce

GitHub Action (trace logs) https://github.com/demokratie-live/democracy-client/runs/650341537?check_suite_focus=true

Device and Verbose Detox Logs

Environment (please complete the following information):

d4vidi commented 4 years ago

@ManAnRuck,

  1. Seems that your app has crashed prematurely -- failed to launch. Naturally, tests can't succeed that way... https://github.com/demokratie-live/democracy-client/runs/650341537?check_suite_focus=true#step:14:508
  2. Please use release builds on CI rather than debug.
support[bot] commented 4 years ago

We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.

Feel free to post your Stack Overflow question here for more visibility. We'll take a look at it.

For issues with Expo apps, it is most likely not an issue with Detox itself, but with the Expo runtime or with incorrect Detox setup. For support on how to use Detox with Expo, you should contact the Expo team or the Expo community.

For more information on bots in this repository, read this discussion.