Describe the bug
After update project to RN 0.59, Detox on v12.3.0 won't work unless targetSdkVersion is set to 27.
To Reproduce
Expected behavior
Tests should run, but they don't
Screenshots


Environment (please complete the following information):
Device and Verbose Detox Logs
BUILD SUCCESSFUL in 1m 46s
885 actionable tasks: 16 executed, 869 up-to-date
/home/rsmelo/Documents/jus/oo-mobile
detox[23624] INFO: [test.js] configuration="android.local.release" loglevel="verbose" artifactsLocation="artifacts/android.local.release.2019-04-16 18-49-33Z" recordLogs="none" takeScreenshots="manual" recordVideos="none" node_modules/.bin/jest --config=e2e/config.json --maxWorkers=1 '--testNamePattern=^((?!:ios:).)*$' e2e
detox[23632] INFO: [DetoxServer.js] server listening on localhost:36901...
detox[23632] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:36901
detox[23632] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=599b6df6-9ce5-4da5-6145-10613046be35
detox[23632] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=599b6df6-9ce5-4da5-6145-10613046be35
detox[23632] DEBUG: [exec.js/EXEC_CMD, #0] /home/rsmelo/Android/Sdk/emulator/emulator -list-avds --verbose
detox[23632] DEBUG: [exec.js/EXEC_CMD, #1] /home/rsmelo/Android/Sdk/platform-tools/adb devices
detox[23632] DEBUG: [exec.js/EXEC_CMD, #2] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "getprop dev.bootcomplete"
detox[23632] DEBUG: [exec.js/EXEC_CMD, #3] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
detox[23632] DEBUG: [exec.js/EXEC_CMD, #4] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "dumpsys power | grep \"^[ ]*m[UW].*=\""
detox[23632] DEBUG: [exec.js/EXEC_CMD, #5] /home/rsmelo/Android/Sdk/build-tools/28.0.3/aapt dump badging "/home/rsmelo/Documents/jus/oo-mobile/android/app/build/outputs/apk/release/app-release.apk" | grep -e "package: name="
detox[23632] DEBUG: [exec.js/EXEC_CMD, #6] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "pm list packages com.jusbrasil.onlineoffice"
detox[23632] DEBUG: [exec.js/EXEC_CMD, #7] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "pm list packages com.jusbrasil.onlineoffice.test"
detox[23632] DEBUG: [exec.js/EXEC_CMD, #8] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 uninstall com.jusbrasil.onlineoffice.test
detox[23632] DEBUG: [exec.js/EXEC_CMD, #9] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 install -r -g -t "/home/rsmelo/Documents/jus/oo-mobile/android/app/build/outputs/apk/release/app-release.apk"
detox[23632] DEBUG: [exec.js/EXEC_CMD, #10] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 install -r -g -t "/home/rsmelo/Documents/jus/oo-mobile/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk"
detox[23632] DEBUG: [exec.js/EXEC_CMD, #11] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "am force-stop com.jusbrasil.onlineoffice"
detox[23632] DEBUG: [exec.js/EXEC_CMD, #12] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "pm list instrumentation"
detox[23632] DEBUG: [exec.js/SPAWN_CMD, #13] [pid=23707] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r "-e detoxServer ws://localhost:36901 -e detoxSessionId 599b6df6-9ce5-4da5-6145-10613046be35" -e debug false com.jusbrasil.onlineoffice.test/androidx.test.runner.AndroidJUnitRunner
detox[23632] DEBUG: [exec.js/EXEC_CMD, #14] /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell "ps | grep \"com\.jusbrasil\.onlineoffice$\""
detox[23632] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=599b6df6-9ce5-4da5-6145-10613046be35)
FAIL e2e/specs/Onboarding/index.spec.js (120.505s)
Onboarding
โ should advance on onboarding screens and close it (7ms)
โ Onboarding โบ should advance on onboarding screens and close it
Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.
at mapper (node_modules/jest-jasmine2/build/queue_runner.js:41:52)
[...]
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 120.818s, estimated 121s
Ran all test suites matching /e2e/i with tests matching "^((?!:ios:).)*$".
detox[23632] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 23707]: /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:36901 -e detoxSessionId 599b6df6-9ce5-4da5-6145-10613046be35 -e debug false com.jusbrasil.onlineoffice.test/androidx.test.runner.AndroidJUnitRunner
detox[23632] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=599b6df6-9ce5-4da5-6145-10613046be35
detox[23632] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 23707]: /home/rsmelo/Android/Sdk/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:36901 -e detoxSessionId 599b6df6-9ce5-4da5-6145-10613046be35 -e debug false com.jusbrasil.onlineoffice.test/androidx.test.runner.AndroidJUnitRunner
detox[23624] ERROR: [cli.js] Error: Command failed: node_modules/.bin/jest --config=e2e/config.json --maxWorkers=1 '--testNamePattern=^((?!:ios:).)*$' e2e
@d4vidi Can you please take a look?
While it's not answered, here's a workaround to anyone who faces this problem:
Before build run this:
sed -i -e 's/targetSdkVersion = 28/targetSdkVersion = 27/g' ./android/build.gradle
After build run this to revert it:
sed -i -e 's/targetSdkVersion = 27/targetSdkVersion = 28/g' ./android/build.gradle
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.
Thank you for your contributions.
Hit the same:
Detox: 12.7.0
React Native: 0.59.4
Node: 10.15.3
Device: Pixel_API_28_x86
OS: Ubuntu 18 (and 16 too)
````
detox[3015] DEBUG: [exec.js/EXEC_CMD, #28] /usr/local/bin/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"com.chapelhq.chapelhill$\""
detox[3015] TRACE: [exec.js/EXEC_SUCCESS, #28] u0_a79 2853 1512 1375196 76912 ep_poll 0 S com.chapelhq.chapelhill
detox[2853] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ deviceId: 'emulator-5554',
bundleId: 'com.chapelhq.chapelhill',
launchArgs:
{ '-e detoxServer': 'ws://localhost:45841',
'-e detoxSessionId': 'da0067a4-8d8a-a308-b8ff-c40a2d1f43ec' },
pid: 2853 })
detox[3015] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[3015] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=da0067a4-8d8a-a308-b8ff-c40a2d1f43ec)
detox[3015] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=da0067a4-8d8a-a308-b8ff-c40a2d1f43ec)
detox[3015] TRACE: [exec.js/SPAWN_STDOUT, #26] INSTRUMENTATION_STATUS: class=com.chapelhq.chapelhill.DetoxTest
INSTRUMENTATION_STATUS: current=1
````
@d4vidi @rotemmiz Please take a look
Just to add I've dropped back to API 23 and that is working.
Does change https://github.com/wix/Detox/blob/3557263d0e6e8329382118e155c9a16ae1bcb0a6/detox/android/build.gradle#L5 this to 28 will help.
I am new to detox, but love to help
I can also confirmthis problem with bitrise config
Detox: 12.0.3
React Native: 0.59.10
Device: Pixel_API_28_x86
OS: Ubuntu 16.04 (not with Mac OS though)
Build Tools: 27.0.3
Edit: 27 works fine. This is important because Google has some limitations for specific SDK'S on some future date
@d4vidi @rotemmiz Please take a look
From what I see, we use SDK 28 in our demo apps, and it runs successfully in CI as well.
https://github.com/wix/Detox/blob/master/examples/demo-react-native/android/app/build.gradle#L9
Well, this issue dates back before the changes in the demo project. Can you please try it with latest detox and report back with both detox log and ADB log if the issue still persists?
Right @rotemmiz but your e2e test suite runs on MacOS as per your .travis.yml configuration (so probably different stack problem) https://github.com/wix/Detox/blob/96f7cc7f5f1ebef6cb25bd5bda21ff1ec89ccc46/.travis.yml#L46
I can confirm 27 works and 28 does not.
Our CI runs on a proprietary Jenkins with macOS and Linux agents. Android runs on Ubuntu.
Please attach logs (detox and logcat) so we can further investigate this.
I haven't been able to get the logcat logs in a consistent way though... removed app info
$ cucumber-js -f json:cucumber-reports/artifacts/report.json --configuration android.emu.release --headless --cleanup --record-logs all --take-screenshots all --artifacts-location cucumber-reports/artifacts/ --loglevel verbose --tags 'not ----
detox[7358] INFO: [DetoxServer.js] server listening on localhost:39989...
detox[7358] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:39989
detox[7358] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=dca97861-32ee-180e-2ce0-9c03ec461d45
detox[7358] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=dca97861-32ee-180e-2ce0-9c03ec461d45
detox[7358] DEBUG: [exec.js/EXEC_CMD, #0] /opt/android-sdk-linux/platform-tools/adb devices
detox[7358] DEBUG: [exec.js/EXEC_SUCCESS, #0] List of devices attached
emulator-5554 device
detox[7358] DEBUG: [exec.js/EXEC_CMD, #1] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
detox[7358] DEBUG: [exec.js/EXEC_CMD, #2] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "dumpsys power | grep \"^[ ]*m[UW].*=\""
detox[7358] DEBUG: [exec.js/EXEC_CMD, #3] /opt/android-sdk-linux/build-tools/29.0.2/aapt dump badging "/bitrise/src/android/app/build/outputs/apk/kang/release/app-kang-release.apk" | grep -e "package: name="
detox[7358] DEBUG: [exec.js/EXEC_CMD, #4] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "pm list packages appname"
detox[7358] DEBUG: [exec.js/EXEC_CMD, #5] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "pm list packages appname"
detox[7358] DEBUG: [exec.js/EXEC_CMD, #6] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 install -r -g -t "/bitrise/src/android/app/build/outputs/apk/appname.apk"
detox[7358] DEBUG: [exec.js/EXEC_CMD, #7] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 install -r -g -t "/bitrise/src/android/app/build/outputs/apk/androidTest/release/appname.apk"
detox[7358] DEBUG: [exec.js/EXEC_CMD, #8] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "am force-stop appname"
detox[7358] DEBUG: [exec.js/EXEC_CMD, #9] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7358] DEBUG: [exec.js/EXEC_CMD, #10] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 reverse tcp:39989 tcp:39989
detox[7358] DEBUG: [exec.js/EXEC_CMD, #11] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "pm list instrumentation"
detox[7358] DEBUG: [exec.js/SPAWN_CMD, #12] [pid=7410] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:39989 -e detoxSessionId dca97861-32ee-180e-2ce0-9c03ec461d45 -e debug ZmFsc2U= appname v.test/androidx.test.runner.AndroidJUnitRunner
detox[7358] DEBUG: [exec.js/EXEC_CMD, #13] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"appname"
detox[7358] ERROR: [exec.js/EXEC_FAIL, #13] "/opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"appname" failed with code = 1, stdout and stderr:
detox[7358] ERROR: [exec.js/EXEC_FAIL, #13]
detox[7358] ERROR: [exec.js/EXEC_FAIL, #13]
detox[7358] DEBUG: [exec.js/EXEC_CMD, #14] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"appname"
detox[7358] DEBUG: [exec.js/SPAWN_CMD, #15] [pid=7429] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 16:38:59.000\" --pid=6152 -f /sdcard/163838480_0.log"
detox[7358] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=dca97861-32ee-180e-2ce0-9c03ec461d45)
detox[7358] DEBUG: [exec.js/EXEC_CMD, #16] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/163838480_0.log
VError: a BeforeAll hook errored, process exiting:---
9: function timed out, ensure the promise resolves within 1200000 milliseconds
at /bitrise/src/node_modules/cucumber/lib/runtime/index.js:68:19
at Generator.next (<anonymous>)
at asyncGeneratorStep (/bitrise/src/node_modules/cucumber/lib/runtime/index.js:26:103)
at _next (/bitrise/src/node_modules/cucumber/lib/runtime/index.js:28:194)
caused by: Error: function timed out, ensure the promise resolves within 1200000 milliseconds
at Timeout._time.default.setTimeout [as _onTimeout] (/bitrise/src/node_modules/cucumber/lib/user_code_runner.js:81:20)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
error Command failed with exit code 1.
It seems to be a crash in java code, but we can't see anything here, it's only in the logcat log.
You can use detox artifacts to record logs, it might be able to catch the error in the process.
@rotemmiz how do I use detox artifacts to do that? thanks!
@raimonkh simply pass in the --record-logs and --take-screenshots args to detox test, see the cli guide for more.
detox[7252] INFO: [DetoxServer.js] server listening on localhost:46649...
detox[7252] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:46649
detox[7252] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a
detox[7252] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a
detox[7252] DEBUG: [exec.js/EXEC_CMD, #0] /opt/android-sdk-linux/platform-tools/adb devices
detox[7252] DEBUG: [exec.js/EXEC_SUCCESS, #0] List of devices attached
emulator-5554 device
detox[7252] DEBUG: [exec.js/EXEC_CMD, #1] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "getprop ro.build.version.sdk"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #2] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "dumpsys power | grep \"^[ ]m[UW].=\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #3] /opt/android-sdk-linux/build-tools/29.0.2/aapt dump badging "/bitrise/src/android/app/build/outputs/apk/DA.apk" | grep -e "package: name="
detox[7252] DEBUG: [exec.js/EXEC_CMD, #4] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "pm list packages app.qadev"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #5] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "pm list packages app.qadev.test"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #6] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 install -r -g -t "/bitrise/src/android/app/build/outputs/apk/DAapk"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #7] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 install -r -g -t "/bitrise/src/android/app/build/outputs/apk/androidTestDA.apk"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #8] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "am force-stop app.qadev"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #9] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #10] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 reverse tcp:46649 tcp:46649
detox[7252] DEBUG: [exec.js/EXEC_CMD, #11] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "pm list instrumentation"
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #12] [pid=7300] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:46649 -e detoxSessionId feed1b81-5ac2-470b-9e53-b9b80e25b24a -e debug ZmFsc2U= app.qadev.test/androidx.test.runner.AndroidJUnitRunner
detox[7252] DEBUG: [exec.js/EXEC_CMD, #13] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"app.qadev$\""
detox[7252] ERROR: [exec.js/EXEC_FAIL, #13] "/opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"app.qadev$\""" failed with code = 1, stdout and stderr:
detox[7252] ERROR: [exec.js/EXEC_FAIL, #13]
detox[7252] ERROR: [exec.js/EXEC_FAIL, #13]
detox[7252] DEBUG: [exec.js/EXEC_CMD, #14] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"app.qadev$\""
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #15] [pid=7310] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:08:12.000\" --pid=5702 -f /sdcard/15752546_0.log"
detox[7252] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a)
detox[7252] DEBUG: [exec.js/EXEC_CMD, #16] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_0.log
detox[7252] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a
detox[7252] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a
detox[7252] DEBUG: [exec.js/EXEC_CMD, #17] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #18] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "ps | grep \"appp.qadev$\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #19] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7310]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:08:12.000" --pid=5702 -f /sdcard/15752546_0.log
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #20] [pid=7407] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:08:36.000\" --pid=5702 -f /sdcard/15752546_0.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #21] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_1.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #22] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_0.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #23] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7407]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:08:36.000" --pid=5702 -f /sdcard/15752546_0.log
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #24] [pid=7431] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:08:37.000\" --pid=5702 -f /sdcard/15752546_2.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #25] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_2.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #26] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_3.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #27] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7431]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:08:37.000" --pid=5702 -f /sdcard/15752546_2.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #28] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_2.log" "cucumber-reports/artifacts/โ Open search/process.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #29] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_2.log\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #30] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_0.log" "cucumber-reports/artifacts/emulator-5554 2019-09-12 15-09-31Z.startup.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #31] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_0.log\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #32] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_1.png" "cucumber-reports/artifacts/โ Open search/beforeEach.png"
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #33] [pid=7545] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:09:30.000\" --pid=5702 -f /sdcard/15752546_4.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #34] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_5.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #35] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_1.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #36] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_3.png" "cucumber-reports/artifacts/โ Open search/afterEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #37] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_3.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #38] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_4.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #39] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_6.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #40] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7545]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:09:30.000" --pid=5702 -f /sdcard/15752546_4.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #41] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_4.log" "cucumber-reports/artifacts/โ Multiple searches/process.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #42] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_4.log\""
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #43] [pid=7599] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:10:12.000\" --pid=5702 -f /sdcard/15752546_7.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #44] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_8.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #45] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_5.png" "cucumber-reports/artifacts/โ Multiple searches/beforeEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #46] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_5.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #47] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_6.png" "cucumber-reports/artifacts/โ Multiple searches/afterEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #48] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_6.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #49] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_7.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #50] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_9.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #51] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7599]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:10:12.000" --pid=5702 -f /sdcard/15752546_7.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #52] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_7.log" "cucumber-reports/artifacts/โ Simple onboarding/process.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #53] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_7.log\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #54] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_8.png" "cucumber-reports/artifacts/โ Simple onboarding/beforeEach.png"
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #55] [pid=7714] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:10:57.000\" --pid=5702 -f /sdcard/15752546_10.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #56] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_11.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #57] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_8.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #58] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_9.png" "cucumber-reports/artifacts/โ Simple onboarding/afterEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #59] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_9.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #60] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_10.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #61] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_12.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #62] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7714]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:10:57.000" --pid=5702 -f /sdcard/15752546_10.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #63] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_10.log" "cucumber-reports/artifacts/โ See welcome page or onboarding page/process.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #64] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_10.log\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #65] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_11.png" "cucumber-reports/artifacts/โ See welcome page or onboarding page/beforeEach.png"
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #66] [pid=7755] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:11:13.000\" --pid=5702 -f /sdcard/15752546_13.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #67] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_14.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #68] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_11.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #69] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_12.png" "cucumber-reports/artifacts/โ See welcome page or onboarding page/afterEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #70] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_12.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #71] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_13.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #72] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_15.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #73] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7755]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:11:13.000" --pid=5702 -f /sdcard/15752546_13.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #74] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_13.log" "cucumber-reports/artifacts/โ Trivial run-through chat/process.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #75] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_13.log\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #76] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_14.png" "cucumber-reports/artifacts/โ Trivial run-through chat/beforeEach.png"
detox[7252] DEBUG: [exec.js/SPAWN_CMD, #77] [pid=7881] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "logcat -T \"09-12 15:14:02.000\" --pid=5702 -f /sdcard/15752546_16.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #78] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_17.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #79] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_14.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #80] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_15.png" "cucumber-reports/artifacts/โ Trivial run-through chat/afterEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #81] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_15.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #82] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell du /sdcard/15752546_16.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #83] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "screencap /sdcard/15752546_18.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #84] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "date +\"%m-%d %T.000\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7881]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell logcat -T "09-12 15:14:02.000" --pid=5702 -f /sdcard/15752546_16.log
detox[7252] DEBUG: [exec.js/EXEC_CMD, #85] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_16.log" "cucumber-reports/artifacts/โ Trivial run-through chat/process.log"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #86] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_16.log\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #87] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_17.png" "cucumber-reports/artifacts/โ Trivial run-through chat/beforeEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #88] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_17.png\""
detox[7252] DEBUG: [exec.js/EXEC_CMD, #89] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 pull "/sdcard/15752546_18.png" "cucumber-reports/artifacts/โ Trivial run-through chat/afterEach.png"
detox[7252] DEBUG: [exec.js/EXEC_CMD, #90] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell "rm \"/sdcard/15752546_18.png\""
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7300]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:46649 -e detoxSessionId feed1b81-5ac2-470b-9e53-b9b80e25b24a -e debug ZmFsc2U= app.qadev.test/androidx.test.runner.AndroidJUnitRunner
detox[7252] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a
detox[7252] DEBUG: [exec.js/KILL] sending SIGINT to [pid = 7300]: /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 shell am instrument -w -r -e detoxServer ws://localhost:46649 -e detoxSessionId feed1b81-5ac2-470b-9e53-b9b80e25b24a -e debug ZmFsc2U= app.qadev.test/androidx.test.runner.AndroidJUnitRunner
detox[7252] DEBUG: [exec.js/EXEC_CMD, #91] /opt/android-sdk-linux/platform-tools/adb -s emulator-5554 reverse --remove tcp:46649
detox[7252] DEBUG: [DetoxServer.js/DISCONNECT] role=testee, sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a
detox[7252] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=tester not connected, cannot fw action (sessionId=feed1b81-5ac2-470b-9e53-b9b80e25b24a)
detox[7252] DEBUG: [DetoxServer.js/WS_CLOSE] Detox server connections terminated gracefully
I got two logs this is the one that is not son
Is there any ETA for this to be resolved on SDKs >= 28? We wanted to add automation to our app and this is a dealbreaker.
Suggestions about enabling cleartext from the docs didn't work for us.
@hwo411 what we do is we downgrade sdk during test to run detox
@d4vidi Pls take a look
@raimonkh could you please report this again (as in #1651) using the latest Detox and according to our Android issue template?
@hwo411 same, or we would not be able to help...
In any case, my best answer for this atm is as described in #1964, but I can't commit to any timelines I'm afraid.
Most helpful comment
While it's not answered, here's a workaround to anyone who faces this problem:
Before build run this:
sed -i -e 's/targetSdkVersion = 28/targetSdkVersion = 27/g' ./android/build.gradleAfter build run this to revert it:
sed -i -e 's/targetSdkVersion = 27/targetSdkVersion = 28/g' ./android/build.gradle