Detox: Impossible to run tests on Android

Created on 10 Jul 2020  ·  9Comments  ·  Source: wix/Detox

Describe the bug
I followed the getting started guide to the letter, and everything works fine on iOS.
On android, when I don't get an error because it does not find the binary, I get the following error:
Error: No instrumentation runner found on device emulator-18378 for package my.package.test
Any idea?

To Reproduce
Just follow the getting started guide for Android

Expected behavior
The tests would run

Device and Verbose Detox Logs
I use the AOSP emulator as instructed in the getting started guide.
Error: No instrumentation runner found on device emulator-18378 for package [my.package].test at ADB.getInstrumentationRunner ([project_path]/node_modules/detox/src/devices/drivers/android/exec/ADB.js:257:13) at processTicksAndRejections (internal/process/task_queues.js:97:5) at Instrumentation.launch ([project_path]/node_modules/detox/src/devices/drivers/android/tools/Instrumentation.js:19:24) at MonitoredInstrumentation.launch ([project_path]/node_modules/detox/src/devices/drivers/android/tools/MonitoredInstrumentation.js:18:5) at EmulatorDriver._launchInstrumentationProcess ([project_path]/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:239:5) at EmulatorDriver._launchApp ([project_path]/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:220:7) at EmulatorDriver.launchApp ([project_path]/node_modules/detox/src/devices/drivers/android/AndroidDriver.js:82:5) at Device.launchApp ([project_path]/node_modules/detox/src/devices/Device.js:63:23) at Detox._doInit ([project_path]/node_modules/detox/src/Detox.js:180:7) detox[87615] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=b7abe73b-95ae-48d4-221b-433b405bded2)

Environment (please complete the following information):

  • Detox: 17.1.1
  • React Native: 0.62.2
  • Node: 14.4.0
  • Device: Pixel_API_28_AOSP
  • OS: Android
  • Test-runner: jest
triagbug android

Most helpful comment

We are also seeing App has not responded to the network requests below: issues on Azure devops in some of our tests. Without a clear sign what exactly causes this error.

All 9 comments

@Sin- Could you please rerun with --loglevel trace and attach the complete log, configuration?

Of course, here it is:

detox[91584] INFO:  [test.js] configuration="android.emu.debug" loglevel="verbose" reportSpecs=true readOnlyEmu=false useCustomLogger=true forceAdbInstall=false DETOX_START_TIMESTAMP=1594820530981 node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:ios:).)*$' --maxWorkers 1 e2e
detox[91585] INFO:  [DetoxServer.js] server listening on localhost:57042...
detox[91585] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:57042
detox[91585] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=7722e33d-538e-7011-5bd4-8d966a3f2fa1
detox[91585] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=7722e33d-538e-7011-5bd4-8d966a3f2fa1
detox[91585] DEBUG: [exec.js/EXEC_CMD, #0] "/Users/tom/Library/Android/sdk/emulator/emulator" -list-avds --verbose
detox[91585] DEBUG: [exec.js/EXEC_CMD, #1] "/Users/tom/Library/Android/sdk/emulator/emulator" -version
detox[91585] DEBUG: [EmulatorVersionResolver.js/EMU_BIN_VERSION_DETECT] Detected emulator binary version { major: 30, minor: 0, patch: 12 }
detox[91585] DEBUG: [EmulatorDriver.js/ALLOCATE_DEVICE] Trying to allocate a device based on Pixel_API_28_AOSP
detox[91585] DEBUG: [exec.js/EXEC_CMD, #2] "/Users/tom/Library/Android/sdk/platform-tools/adb"  devices
detox[91585] DEBUG: [exec.js/EXEC_SUCCESS, #2] List of devices attached
9WVDU19328000234        device


detox[91585] DEBUG: [EmulatorDriver.js/ALLOCATE_DEVICE] Settled on emulator-16226
detox[91585] DEBUG: [EmulatorLauncher.js/SPAWN_CMD] /Users/tom/Library/Android/sdk/emulator/emulator -verbose -no-audio -no-boot-anim -port 16226 @Pixel_API_28_AOSP
detox[91585] DEBUG: [EmulatorLauncher.js/SPAWN_SUCCESS] emulator: autoconfig: -skin 1080x1920
emulator: autoconfig: -skindir (null)
emulator: autoconfig: -kernel /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//kernel-ranchu
emulator: Target arch = 'x86_64'
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//ramdisk.img
emulator: Using initial system image: /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//system.img
emulator: Using initial vendor image: /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//vendor.img
emulator: autoconfig: -data /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/userdata-qemu.img
emulator: autoconfig: -initdata /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/userdata.img
emulator: autoconfig: -cache /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/cache.img
emulator: Increasing RAM size to 1536MB
emulator: VM heap size 0MB is below hardware specified minimum of 384MB,setting it to that value
emulator: System image is read only
emulator: Found 1 DNS servers: 192.168.1.1
emulator: found magic skin width=1080 height=1920 bpp=16

emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.cmdline' = 'androidboot.logcat=v:* androidboot.consolepipe=qemu_pipe,pipe:logcat'
emulator: Adding boot property: 'qemu.logcat' = 'start'
emulator: Requested console port 16226: Inferring adb port 16227.
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: HAXM version 7.5.1 (4) is installed and usable.
emulator: GPU emulation enabled using 'host' mode
emulator: Initializing hardware OpenGLES emulation support
emulator: VERBOSE: MultiDisplay.cpp:308: create display 0
emulator: VERBOSE: MultiDisplay.cpp:398: setDisplayPose 0 x 0 y 0 w 1080 h 1920 dpi 0
emulator: VERBOSE: load_config.cpp:242: Verified boot params were not found.
emulator: Found 1 DNS servers: 192.168.1.1
Content of hardware configuration file:
  hw.cpu.arch = x86_64
  hw.cpu.ncore = 2
  hw.ramSize = 1536
  hw.screen = multi-touch
  hw.mainKeys = false
  hw.trackBall = false
  hw.keyboard = false
  hw.keyboard.lid = false
  hw.keyboard.charmap = qwerty2
  hw.dPad = false
  hw.rotaryInput = false
  hw.gsmModem = true
  hw.gps = true
  hw.battery = true
  hw.accelerometer = true
  hw.gyroscope = true
  hw.audioInput = true
  hw.audioOutput = true
  hw.sdCard = true
  disk.cachePartition = true
  disk.cachePartition.path = /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/cache.img
  disk.cachePartition.size = 66m
  test.quitAfterBootTimeOut = -1
  test.delayAdbTillBootComplete = 0
  test.monitorAdb = 0
  hw.lcd.width = 1080
  hw.lcd.height = 1920
  hw.lcd.depth = 16
  hw.lcd.density = 480
  hw.lcd.backlight = true
  hw.lcd.vsync = 60
  hw.gltransport = pipe
  hw.gltransport.asg.writeBufferSize = 1048576
  hw.gltransport.asg.writeStepSize = 4096
  hw.gltransport.asg.dataRingSize = 32768
  hw.gltransport.drawFlushInterval = 800
  hw.displayRegion.0.1.xOffset = -1
  hw.displayRegion.0.1.yOffset = -1
  hw.displayRegion.0.1.width = 0
  hw.displayRegion.0.1.height = 0
  hw.fold.adjust = false
  hw.display1.width = 0
  hw.display1.height = 0
  hw.display1.density = 0
  hw.display1.xOffset = -1
  hw.display1.yOffset = -1
  hw.display1.flag = 0
  hw.display2.width = 0
  hw.display2.height = 0
  hw.display2.density = 0
  hw.display2.xOffset = -1
  hw.display2.yOffset = -1
  hw.display2.flag = 0
  hw.display3.width = 0
  hw.display3.height = 0
  hw.display3.density = 0
  hw.display3.xOffset = -1
  hw.display3.yOffset = -1
  hw.display3.flag = 0
  hw.gpu.enabled = true
  hw.gpu.mode = host
  hw.initialOrientation = portrait
  hw.camera.back = emulated
  hw.camera.front = none
  vm.heapSize = 384
  hw.sensors.light = true
  hw.sensors.pressure = true
  hw.sensors.humidity = true
  hw.sensors.proximity = true
  hw.sensors.magnetic_field = true
  hw.sensors.magnetic_field_uncalibrated = true
  hw.sensors.gyroscope_uncalibrated = true
  hw.sensors.orientation = true
  hw.sensors.temperature = true
  hw.useext4 = true
  hw.arc = false
  hw.arc.autologin = false
  kernel.path = /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//kernel-ranchu
  kernel.newDeviceNaming = yes
  kernel.supportsYaffs2 = no
  disk.ramdisk.path = /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//ramdisk.img
  disk.systemPartition.initPath = /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//system.img
  disk.systemPartition.size = 2562m
  disk.vendorPartition.initPath = /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//vendor.img
  disk.vendorPartition.size = 800m
  disk.dataPartition.path = /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/userdata-qemu.img
  disk.dataPartition.size = 800m
  disk.encryptionKeyPartition.path = /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/encryptionkey.img
  PlayStore.enabled = false
  avd.name = Pixel_API_28_AOSP
  avd.id = Pixel_API_28_AOSP
  fastboot.forceColdBoot = false
  android.sdk.root = /Users/tom/Library/Android/sdk
  android.avd.home = /Users/tom/.android/avd
.
QEMU options list:
emulator: argv[00] = "/Users/tom/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64"
emulator: argv[01] = "-dns-server"
emulator: argv[02] = "192.168.1.1"
emulator: argv[03] = "-no-audio"
emulator: argv[04] = "-mem-path"
emulator: argv[05] = "/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/snapshots/default_boot/ram.img"
emulator: argv[06] = "-serial"
emulator: argv[07] = "null"
emulator: argv[08] = "-android-ports"
emulator: argv[09] = "16226,16227"
emulator: argv[10] = "-device"
emulator: argv[11] = "goldfish_pstore,addr=0xff018000,size=0x10000,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/data/misc/pstore/pstore.bin"
emulator: argv[12] = "-cpu"
emulator: argv[13] = "android64"
emulator: argv[14] = "-enable-hvf"
emulator: argv[15] = "-smp"
emulator: argv[16] = "cores=2"
emulator: argv[17] = "-m"
emulator: argv[18] = "1536"
emulator: argv[19] = "-lcd-density"
emulator: argv[20] = "480"
emulator: argv[21] = "-nodefaults"
emulator: argv[22] = "-kernel"
emulator: argv[23] = "/Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//kernel-ranchu"
emulator: argv[24] = "-initrd"
emulator: argv[25] = "/Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//ramdisk.img"
emulator: argv[26] = "-drive"
emulator: argv[27] = "if=none,index=0,id=system,if=none,file=/Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//system.img,read-only"
emulator: argv[28] = "-device"
emulator: argv[29] = "virtio-blk-pci,drive=system,modern-pio-notify"
emulator: argv[30] = "-drive"
emulator: argv[31] = "if=none,index=1,id=cache,if=none,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[32] = "-device"
emulator: argv[33] = "virtio-blk-pci,drive=cache,modern-pio-notify"
emulator: argv[34] = "-drive"
emulator: argv[35] = "if=none,index=2,id=userdata,if=none,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[36] = "-device"
emulator: argv[37] = "virtio-blk-pci,drive=userdata,modern-pio-notify"
emulator: argv[38] = "-drive"
emulator: argv[39] = "if=none,index=3,id=encrypt,if=none,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[40] = "-device"
emulator: argv[41] = "virtio-blk-pci,drive=encrypt,modern-pio-notify"
emulator: argv[42] = "-drive"
emulator: argv[43] = "if=none,index=4,id=vendor,if=none,file=/Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//vendor.img,read-only"
emulator: argv[44] = "-device"
emulator: argv[45] = "virtio-blk-pci,drive=vendor,modern-pio-notify"
emulator: argv[46] = "-netdev"
emulator: argv[47] = "user,id=mynet"
emulator: argv[48] = "-device"
emulator: argv[49] = "virtio-net-pci,netdev=mynet"
emulator: argv[50] = "-device"
emulator: argv[51] = "virtio-rng-pci"
emulator: argv[52] = "-show-cursor"
emulator: argv[53] = "-L"
emulator: argv[54] = "/Users/tom/Library/Android/sdk/emulator/lib/pc-bios"
emulator: argv[55] = "-soundhw"
emulator: argv[56] = "hda"
emulator: argv[57] = "-vga"
emulator: argv[58] = "none"
emulator: argv[59] = "-append"
emulator: argv[60] = "qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X0X12X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 android.bootanim=0 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.encrypt=1 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=196608 qemu.uirenderer=skiagl cma=288M@0-4G qemu.wifi=1 mac80211_hwsim.channels=2 androidboot.android_dt_dir=/sys/bus/platform/devices/ANDR0001:00/properties/android/ skip_initramfs rootwait ro init=/init root=/dev/vda1 loop.max_part=7 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=384m"
emulator: argv[61] = "-android-hw"
emulator: argv[62] = "/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/hardware-qemu.ini"
Concatenated QEMU options:
 /Users/tom/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 -dns-server 192.168.1.1 -no-audio -mem-path /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/snapshots/default_boot/ram.img -serial null -android-ports 16226,16227 -device goldfish_pstore,addr=0xff018000,size=0x10000,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/data/misc/pstore/pstore.bin -cpu android64 -enable-hvf -smp cores=2 -m 1536 -lcd-density 480 -nodefaults -kernel /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//kernel-ranchu -initrd /Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//ramdisk.img -drive if=none,index=0,id=system,if=none,file=/Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//system.img,read-only -device virtio-blk-pci,drive=system,modern-pio-notify -drive if=none,index=1,id=cache,if=none,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=cache,modern-pio-notify -drive if=none,index=2,id=userdata,if=none,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=userdata,modern-pio-notify -drive if=none,index=3,id=encrypt,if=none,file=/Users/tom/.android/avd/Pixel_API_28_AOSP.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=encrypt,modern-pio-notify -drive if=none,index=4,id=vendor,if=none,file=/Users/tom/Library/Android/sdk/system-images/android-28/default/x86_64//vendor.img,read-only -device virtio-blk-pci,drive=vendor,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -device virtio-rng-pci -show-cursor -L /Users/tom/Library/Android/sdk/emulator/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X0X12X0 clocksource=pit no-kvmclock android.qemud=1 console=0 android.checkjni=1 android.bootanim=0 qemu.gles=1 qemu.settings.system.screen_off_timeout=2147483647 qemu.encrypt=1 qemu.vsync=60 qemu.gltransport=pipe qemu.gltransport.drawFlushInterval=800 qemu.opengles.version=196608 qemu.uirenderer=skiagl cma=288M@0-4G qemu.wifi=1 mac80211_hwsim.channels=2 androidboot.android_dt_dir=/sys/bus/platform/devices/ANDR0001:00/properties/android/ skip_initramfs rootwait ro init=/init root=/dev/vda1 loop.max_part=7 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=384m' -android-hw /Users/tom/.android/avd/Pixel_API_28_AOSP.avd/hardware-qemu.ini
emulator: Android qemu version 30.0.12.0 (build_id 6466327) (CL:N/A)

emulator: Starting QEMU main loop
emulator: Adding boot property: 'ro.opengles.version' = '196608'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '384m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '480'
emulator: goldfish_events.have-dpad: false
emulator: goldfish_events.have-trackball: false
emulator: goldfish_events.have-camera: true
emulator: goldfish_events.have-keyboard: false
emulator: goldfish_events.have-lidswitch: false
emulator: goldfish_events.have-tabletmode: false
emulator: goldfish_events.have-touch: false
emulator: goldfish_events.have-multitouch: true
emulator: WARNING: Requested adb port (16227) is outside the recommended range [5555,5586]. ADB may not function properly for the emulator. See -help-port for details.
Not using any http proxy
emulator: Adding boot property: 'qemu.timezone' = 'Europe/Paris'
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized

emulator: emulator_window_fb_rotate

emulator: No acpi ini file provided, using default

emulator: Adding boot property: 'qemu.cmdline' = 'androidboot.logcat=v:* androidboot.consolepipe=qemu_pipe,pipe:logcat'
emulator: Adding boot property: 'qemu.logcat' = 'start'
emulator: Adding boot property: 'ro.opengles.version' = '196608'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'back'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '384m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '480'
emulator: Adding boot property: 'qemu.timezone' = 'Europe/Paris'
emulator: VERBOSE: AdbInterface.cpp:385: Found: 3 adb executables
emulator: VERBOSE: AdbInterface.cpp:387: Adb: /Users/tom/Library/Android/sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:387: Adb: /Users/tom/Library/Android/sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:387: Adb: /Users/tom/Library/Android/sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:408: Path:/Users/tom/Library/Android/sdk/platform-tools/adb protocol version: 41
emulator: VERBOSE: AdbInterface.cpp:408: Path:/Users/tom/Library/Android/sdk/platform-tools/adb protocol version: 41
emulator: VERBOSE: AdbInterface.cpp:408: Path:/Users/tom/Library/Android/sdk/platform-tools/adb protocol version: 41
emulator: _hwFingerprint_connect: connect finger print listen is called

Your emulator is out of date, please update by launching Android Studio:
 - Start Android Studio
 - Select menu "Tools > Android > SDK Manager"
 - Click "SDK Tools" tab
 - Check "Android Emulator" checkbox
 - Click "OK"

emulator: onGuestSendCommand: [0x7ffb557c2c20] Adb connected, start proxing data

detox[91585] DEBUG: [exec.js/EXEC_CMD, #3] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "getprop dev.bootcomplete"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #4] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "getprop ro.build.version.sdk"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #5] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "settings put global animator_duration_scale 0"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #6] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "settings put global window_animation_scale 0"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #7] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "settings put global transition_animation_scale 0"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #8] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "dumpsys power | grep \"^[ ]*m[UW].*=\""
detox[91585] DEBUG: [exec.js/EXEC_CMD, #9] "/Users/tom/Library/Android/sdk/build-tools/30.0.0/aapt" dump badging "/Users/tom/Code/GOWOD/v3/android/app/build/outputs/apk/debug/app-debug.apk" | grep -e "package: name="
detox[91585] DEBUG: [exec.js/EXEC_CMD, #10] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "pm list packages eu.gowod.test"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #11] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "pm list packages eu.gowod.test.test"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #12] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "rm -fr /data/local/tmp/detox"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #13] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "mkdir -p /data/local/tmp/detox"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #14] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 push "/Users/tom/Code/GOWOD/v3/android/app/build/outputs/apk/debug/app-debug.apk" "/data/local/tmp/detox/Application.apk"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #15] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "pm install -r -g -t /data/local/tmp/detox/Application.apk"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #16] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 push "/Users/tom/Code/GOWOD/v3/android/app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk" "/data/local/tmp/detox/Test.apk"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #17] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "pm install -r -g -t /data/local/tmp/detox/Test.apk"
detox[91585] DEBUG: [exec.js/EXEC_CMD, #18] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "date +\"%m-%d %T.000\""
detox[91585] DEBUG: [exec.js/EXEC_CMD, #19] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 reverse tcp:57042 tcp:57042
detox[91585] DEBUG: [exec.js/EXEC_CMD, #20] "/Users/tom/Library/Android/sdk/platform-tools/adb" -s emulator-16226 shell "pm list instrumentation"
detox[91585] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=7722e33d-538e-7011-5bd4-8d966a3f2fa1)

detox[91585] WARN:  [Client.js/PENDING_REQUESTS] App has not responded to the network requests below:
  (id = 1) invoke: {"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxAssertion"},"method":"waitForAssertMatcher","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"androidx.test.espresso.Espresso"},"method":"onView","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForTestId","args":["emailAuthButton"]}}]}},{"type":"Invocation","value":{"target":{"type":"Class","value":"com.wix.detox.espresso.DetoxMatcher"},"method":"matcherForSufficientlyVisible","args":[]}},{"type":"Double","value":20}]}

That might be the reason why the test "New user flow should access the signup form" has timed out.

detox[91585] DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=7722e33d-538e-7011-5bd4-8d966a3f2fa1
detox[91585] DEBUG: [DetoxServer.js/WS_CLOSE] Detox server connections terminated gracefully
 FAIL  e2e/newUser.spec.js (129.898s)
  New user flow
    ✕ should access the signup form (119972ms)

  ● New user flow › should access the signup form

    No instrumentation runner found on device emulator-16226 for package eu.gowod.test

      at ADB.getInstrumentationRunner (../node_modules/detox/src/devices/drivers/android/exec/ADB.js:257:13)
      at Instrumentation.launch (../node_modules/detox/src/devices/drivers/android/tools/Instrumentation.js:19:24)
      at MonitoredInstrumentation.launch (../node_modules/detox/src/devices/drivers/android/tools/MonitoredInstrumentation.js:18:5)
      at EmulatorDriver._launchInstrumentationProcess (../node_modules/detox/src/devices/drivers/android/AndroidDriver.js:239:5)
      at EmulatorDriver._launchApp (../node_modules/detox/src/devices/drivers/android/AndroidDriver.js:220:7)
      at EmulatorDriver.launchApp (../node_modules/detox/src/devices/drivers/android/AndroidDriver.js:82:5)
      at Device.launchApp (../node_modules/detox/src/devices/Device.js:63:23)

  ● New user flow › should access the signup form

    : Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 120000ms timeout specified by jest.setTimeout.Error:

       5 | /* global element,by,waitFor */
       6 | describe('New user flow', () => {
    >  7 |   it('should access the signup form', async () => {
         |   ^
       8 |     await waitFor(element(by.id('emailAuthButton')))
       9 |       .toBeVisible()
      10 |       .withTimeout(20000);

      at new Spec (../node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
      at Suite.<anonymous> (newUser.spec.js:7:3)
      at Object.<anonymous> (newUser.spec.js:6:1)

detox[91584] ERROR: [cli.js] Error: Command failed: node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:ios:).)*$' --maxWorkers 1 e2e

We are also seeing App has not responded to the network requests below: issues on Azure devops in some of our tests. Without a clear sign what exactly causes this error.

Any suggestions on this issue?

Ditto - any suggestions?

@Sin- have you tried increasing the per-test timeout from 12000 to say, 30000? Evidently, 120s is a bit short, considering. Refer to usage of jest.setTimeout(), as mentioned in the log.

Secondly, if you have access to the _device_ logs (e.g. by employing detox' --record-logs arguments), please do share them here 🙏🏻

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!

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

Same issue, any resolution ?

@Sin- & all - In order to help with this, I will need to review the _device_ logs and the Detox-configuration for the device in questions (typically under detox>configurations in package.json).
I'm closing this for now, please open with all required info.

Generally speaking, the error suggests that the instrumentation code associated with the tested app isn't available on the device. This can happen for various reason. For example:

  1. testInstrumentationRunner hasn't been properly configured in app/build.gradle.
  2. The test APK hasn't been properly configured in the associated Detox configuration, typically in detox>configurations in package.json.
Was this page helpful?
0 / 5 - 0 ratings