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

No instrumentation runner found on device #2887

Closed kingdark1234 closed 3 years ago

kingdark1234 commented 3 years ago

Step to reproduce

After I run detox build --configuration android.emu.dev.local with config "app":{ "varun.android.dev.local": { "type": "android.apk", "binaryPath": "android/app/build/outputs/apk/dev/release/app-dev-release.apk", "testBinaryPath": "android/app/build/outputs/apk/dev/release/app-dev-release.apk", "build": "npm run build:android:e2e:develop" // my build command in package.json }, }

detox has built my app successfully then I run detox test --configuration android.emu.dev.local --loglevel trace with config "devices": { "simulator": { "type": "ios.simulator", "device": { "type": "iPhone 11" } }, "emulator": { "type": "android.emulator", "device": { "avdName": "Nexus" } } }, "configurations": { "android.emu.dev.local": { "device": "emulator", "app": "varun.android.dev.local" }, }

Then I got an error like this

  ● Example › should have welcome screen

    DetoxRuntimeError: No instrumentation runner found on device emulator-14668 for package com.arv.varun.dev

      3 | describe('Example', () => {
      4 |   beforeAll(async () => {
    > 5 |     await device.launchApp({ newInstance: true });
        |                  ^
      6 |   });
      7 |
      8 |   it('should have welcome screen', async () => {

      at __tests__/firstTest.e2e.ts:5:18
      at step (__tests__/firstTest.e2e.ts:33:23)
      at Object.next (__tests__/firstTest.e2e.ts:14:53)
      at __tests__/firstTest.e2e.ts:8:71
      at __awaiter (__tests__/firstTest.e2e.ts:4:12)
      at __tests__/firstTest.e2e.ts:4:13

  ● Test suite failed to run

    DetoxRuntimeError: Invalid test summary was passed to detox.beforeEach(testSummary)
    Expected to get an object of type: { title: string; fullName: string; status: "running" | "passed" | "failed"; }

    HINT: Maybe you are still using an old undocumented signature detox.beforeEach(string, string, string) in init.js ?
    See the article for the guidance: https://github.com/wix/detox/blob/master/docs/APIRef.TestLifecycle.md
    testSummary was: 

    [Function (anonymous)]

      at DetoxRuntimeErrorComposer.invalidTestSummary (../node_modules/detox/src/errors/DetoxRuntimeErrorComposer.js:20:12)
      at Detox._validateTestSummary (../node_modules/detox/src/Detox.js:238:40)
      at Detox.beforeEach (../node_modules/detox/src/Detox.js:116:10)```

      **Log and file config**

      Log Trance:
detox[1411] INFO:  [test.js] DETOX_CONFIGURATION="android.emu.dev" DETOX_FORCE_ADB_INSTALL=false DETOX_LOGLEVEL="trace" DETOX_READ_ONLY_EMU=false DETOX_REPORT_SPECS=true DETOX_START_TIMESTAMP=1626059696419 DETOX_USE_CUSTOM_LOGGER=true jest --config e2e/config.json --testNamePattern '^((?!:ios:).)*$' --maxWorkers 1 e2e
detox[1414] TRACE: [DETOX_CREATE] created a Detox instance with config:
{"artifactsConfig":{"rootDir":"artifacts/android.emu.dev.2021-07-12 03-14-56Z","plugins":{"log":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"screenshot":{"enabled":true,"shouldTakeAutomaticSnapshots":false,"keepOnlyFailedTestsArtifacts":false},"video":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"instruments":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"timeline":{"enabled":false},"uiHierarchy":{"enabled":false,"keepOnlyFailedTestsArtifacts":false}},"pathBuilder":{"_rootDir":"artifacts/android.emu.dev.2021-07-12 03-14-56Z"}},"appsConfig":{"default":{"type":"android.apk","binaryPath":"android/app/build/outputs/apk/dev/release/app-dev-release.apk","testBinaryPath":"android/app/build/outputs/apk/dev/release/app-dev-release.apk","build":"npm run build:android:develop"}},"behaviorConfig":{"init":{"reinstallApp":true,"exposeGlobals":true},"cleanup":{"shutdownDevice":false},"launchApp":"auto"},"cliConfig":{"configuration":"android.emu.dev","forceAdbInstall":"false","loglevel":"trace","useCustomLogger":"true"},"deviceConfig":{"type":"android.emulator","device":{"avdName":"Nexus"}},"runnerConfig":{"testRunner":"jest","runnerConfig":"e2e/config.json","specs":"e2e"},"sessionConfig":{"autoStart":true,"server":"ws://localhost:49791","sessionId":"f781aa6e-0222-5fbd-9648-be6683b6abd4","debugSynchronization":10000},"errorComposer":{"configurationName":"android.emu.dev","filepath":"/Users/suphawutpitirit/Developer/varun-mobile-app-v2/.detoxrc.json","contents":{"testRunner":"jest","runnerConfig":"e2e/config.json","specs":"e2e","behavior":{"init":{"exposeGlobals":true}},"apps":{"ios":{"type":"ios.app","binaryPath":"SPECIFY_PATH_TO_YOUR_APP_BINARY","build":""},"varun.android.dev":{"type":"android.apk","binaryPath":"android/app/build/outputs/apk/dev/release/app-dev-release.apk","testBinaryPath":"android/app/build/outputs/apk/dev/release/app-dev-release.apk","build":"npm run build:android:develop"},"varun.android.qa":{"type":"android.apk","binaryPath":"android/app/build/outputs/apk/dev/qa/app-qa-release.apk","testBinaryPath":"android/app/build/outputs/apk/dev/qa/app-qa-release.apk","build":"npm run build:android:qa"},"varun.android.prod":{"type":"android.apk","binaryPath":"android/app/build/outputs/apk/prod/release/app-prod-release.apk","testBinaryPath":"android/app/build/outputs/apk/prod/release/app-prod-release.apk","build":"npm run build:android:production"},"varun.android.dev.local":{"type":"android.apk","binaryPath":"android/app/build/outputs/apk/dev/release/app-dev-release.apk","testBinaryPath":"android/app/build/outputs/apk/dev/release/app-dev-release.apk","build":"npm run build:android:e2e:develop"},"varun.android.qa.local":{"type":"android.apk","binaryPath":"android/app/build/outputs/apk/dev/qa/app-qa-release.apk","testBinaryPath":"android/app/build/outputs/apk/dev/qa/app-qa-release.apk","build":"npm run build:android:e2e:qa"},"varun.android.prod.local":{"type":"android.apk","binaryPath":"android/app/build/outputs/apk/prod/release/app-prod-release.apk","testBinaryPath":"android/app/build/outputs/apk/prod/release/app-prod-release.apk","build":"npm run build:android:e2e:production"}},"devices":{"simulator":{"type":"ios.simulator","device":{"type":"iPhone 11"}},"emulator":{"type":"android.emulator","device":{"avdName":"Nexus"}}},"configurations":{"ios":{"device":"simulator","app":"ios"},"android.emu.dev":{"device":"emulator","app":"varun.android.dev"},"android.emu.qa":{"device":"emulator","app":"varun.android.qa"},"android.emu.prod":{"device":"emulator","app":"varun.android.prod"},"android.emu.dev.local":{"device":"emulator","app":"varun.android.dev.local"},"android.emu.qa.local":{"device":"emulator","app":"varun.android.qa.local"},"android.emu.prod.local":{"device":"emulator","app":"varun.android.prod.local"}}},"_extends":false}}
detox[1414] DEBUG: [WSS_CREATE] Detox server listening on localhost:49791...
detox[1414] DEBUG: [WSS_CONNECTION, #49792] registered a new connection.
detox[1414] TRACE: [WS_OPEN] opened web socket to: ws://localhost:49791
detox[1414] TRACE: [WS_SEND] {"type":"login","params":{"sessionId":"f781aa6e-0222-5fbd-9648-be6683b6abd4","role":"tester"},"messageId":0}
detox[1414] TRACE: [WSS_GET_FROM, #49792] {"type":"login","params":{"sessionId":"f781aa6e-0222-5fbd-9648-be6683b6abd4","role":"tester"},"messageId":0}
detox[1414] TRACE: [SESSION_CREATED] created session f781aa6e-0222-5fbd-9648-be6683b6abd4
detox[1414] TRACE: [WSS_SEND_TO, #tester] {"type":"loginSuccess","params":{"testerConnected":true,"appConnected":false},"messageId":0}
detox[1414] TRACE: [SESSION_JOINED] tester joined session f781aa6e-0222-5fbd-9648-be6683b6abd4
detox[1414] TRACE: [WS_MESSAGE] {"type":"loginSuccess","params":{"testerConnected":true,"appConnected":false},"messageId":0}

detox[1414] DEBUG: [EXEC_CMD, #0] "/Users/suphawutpitirit/Library/Android/sdk/emulator/emulator" -list-avds --verbose
detox[1414] TRACE: [EXEC_SUCCESS, #0] Nexus
default

detox[1414] DEBUG: [EXEC_CMD, #1] "/Users/suphawutpitirit/Library/Android/sdk/emulator/emulator" -version 
detox[1414] TRACE: [EXEC_SUCCESS, #1] emulator: WARNING: Crash service did not start

Android emulator version 30.3.5.0 (build_id 7033400) (CL:N/A)
Copyright (C) 2006-2017 The Android Open Source Project and many others.
This program is a derivative of the QEMU CPU emulator (www.qemu.org).

  This software is licensed under the terms of the GNU General Public
  License version 2, as published by the Free Software Foundation, and
  may be copied, distributed, and modified under those terms.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

detox[1414] DEBUG: [EMU_BIN_VERSION_DETECT] Detected emulator binary version { major: 30, minor: 3, patch: 5, toString: [Function: toString] }
detox[1414] DEBUG: [ALLOCATE_DEVICE] Trying to allocate a device based on "Nexus"
detox[1414] DEBUG: [EXEC_CMD, #2] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb"  devices
detox[1414] DEBUG: [EXEC_SUCCESS, #2] List of devices attached

detox[1414] DEBUG: [EXEC_SUCCESS, #2] * daemon not running; starting now at tcp:5037
* daemon started successfully

detox[1414] DEBUG: [ALLOCATE_DEVICE] Settled on emulator-14668
detox[1414] DEBUG: [SPAWN_CMD] /Users/suphawutpitirit/Library/Android/sdk/emulator/emulator -verbose -no-audio -no-boot-anim -port 14668 @Nexus
detox[1414] DEBUG: [SPAWN_SUCCESS] handleCpuAcceleration: feature check for hvf
cannot add library /Users/suphawutpitirit/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libvulkan.dylib: failed
added library /Users/suphawutpitirit/Library/Android/sdk/emulator/lib64/vulkan/libvulkan.dylib
cannot add library /Users/suphawutpitirit/Library/Android/sdk/emulator/qemu/darwin-x86_64/lib64/vulkan/libMoltenVK.dylib: failed
emulator: autoconfig: -skin nexus_6p
emulator: autoconfig: -skindir /Users/suphawutpitirit/Library/Android/sdk/skins/
emulator: autoconfig: -kernel /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//kernel-ranchu-64
emulator: Target arch = 'x86'
emulator: Auto-config: -qemu -cpu qemu32
emulator: Auto-detect: Kernel image requires new device naming scheme.
emulator: Auto-detect: Kernel does not support YAFFS2 partitions.
emulator: autoconfig: -ramdisk /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//ramdisk.img
emulator: Using initial system image: /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//system.img
emulator: Using initial vendor image: /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//vendor.img
emulator: autoconfig: -data /Users/suphawutpitirit/.android/avd/Nexus.avd/userdata-qemu.img
emulator: autoconfig: -initdata /Users/suphawutpitirit/.android/avd/Nexus.avd/userdata.img
emulator: autoconfig: -cache /Users/suphawutpitirit/.android/avd/Nexus.avd/cache.img
emulator: autoconfig: -sdcard /Users/suphawutpitirit/.android/avd/Nexus.avd/sdcard.img
emulator: Physical RAM size: 1536MB

emulator: System image is read only
emulator: Found 1 DNS servers: 192.168.1.1
emulator: trying to load skin file '/Users/suphawutpitirit/Library/Android/sdk/skins//nexus_6p/layout'
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 14668: Inferring adb port 14669.
emulator: CPU Acceleration: working
emulator: CPU Acceleration status: Hypervisor.Framework OS X Version 10.16
emulator: WARNING: Running on a system with less than 6 logical cores. Setting number of virtual cores to 1
emulator: GPU emulation enabled using 'host' mode
emulator: Initializing hardware OpenGLES emulation support
emulator: VERBOSE: MultiDisplay.cpp:325: create display 0
emulator: VERBOSE: MultiDisplay.cpp:414: setDisplayPose 0 x 0 y 0 w 1440 h 2560 dpi 0
emulator: Found 1 DNS servers: 192.168.1.1
Content of hardware configuration file:
  hw.cpu.arch = x86
  hw.cpu.model = qemu32
  hw.cpu.ncore = 1
  hw.ramSize = 1536
  hw.screen = multi-touch
  hw.mainKeys = false
  hw.trackBall = false
  hw.keyboard = true
  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
  hw.sdCard.path = /Users/suphawutpitirit/.android/avd/Nexus.avd/sdcard.img
  disk.cachePartition = true
  disk.cachePartition.path = /Users/suphawutpitirit/.android/avd/Nexus.avd/cache.img
  disk.cachePartition.size = 66m
  test.quitAfterBootTimeOut = -1
  test.delayAdbTillBootComplete = 0
  test.monitorAdb = 0
  hw.lcd.width = 1440
  hw.lcd.height = 2560
  hw.lcd.depth = 16
  hw.lcd.density = 560
  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.displayRegion.0.2.xOffset = -1
  hw.displayRegion.0.2.yOffset = -1
  hw.displayRegion.0.2.width = 0
  hw.displayRegion.0.2.height = 0
  hw.displayRegion.0.3.xOffset = -1
  hw.displayRegion.0.3.yOffset = -1
  hw.displayRegion.0.3.width = 0
  hw.displayRegion.0.3.height = 0
  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 = virtualscene
  hw.camera.front = emulated
  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.sensor.hinge = true
  hw.sensor.hinge.count = 0
  hw.sensor.hinge.type = 0
  hw.sensor.hinge.sub_type = 0
  hw.sensor.hinge.fold_to_displayRegion.0.1_at_posture = 1
  hw.sensor.roll = false
  hw.sensor.roll.count = 0
  hw.sensor.roll.resize_to_displayRegion.0.1_at_posture = 6
  hw.sensor.roll.resize_to_displayRegion.0.2_at_posture = 6
  hw.sensor.roll.resize_to_displayRegion.0.3_at_posture = 6
  hw.sensors.heart_rate = true
  hw.useext4 = true
  hw.arc = false
  hw.arc.autologin = false
  kernel.path = /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//kernel-ranchu-64
  kernel.newDeviceNaming = yes
  kernel.supportsYaffs2 = no
  disk.ramdisk.path = /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//ramdisk.img
  disk.systemPartition.initPath = /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//system.img
  disk.systemPartition.size = 2562m
  disk.vendorPartition.initPath = /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//vendor.img
  disk.vendorPartition.size = 800m
  disk.dataPartition.path = /Users/suphawutpitirit/.android/avd/Nexus.avd/userdata-qemu.img
  disk.dataPartition.size = 800m
  disk.encryptionKeyPartition.path = /Users/suphawutpitirit/.android/avd/Nexus.avd/encryptionkey.img
  PlayStore.enabled = false
  avd.name = Nexus
  avd.id = Nexus
  fastboot.forceColdBoot = false
  android.sdk.root = /Users/suphawutpitirit/Library/Android/sdk
  android.avd.home = /Users/suphawutpitirit/.android/avd
.
QEMU options list:
emulator: argv[00] = "/Users/suphawutpitirit/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] = "-serial"
emulator: argv[05] = "null"
emulator: argv[06] = "-android-ports"
emulator: argv[07] = "14668,14669"
emulator: argv[08] = "-device"
emulator: argv[09] = "goldfish_pstore,addr=0xff018000,size=0x10000,file=/Users/suphawutpitirit/.android/avd/Nexus.avd/data/misc/pstore/pstore.bin"
emulator: argv[10] = "-cpu"
emulator: argv[11] = "android64"
emulator: argv[12] = "-enable-hvf"
emulator: argv[13] = "-smp"
emulator: argv[14] = "cores=2"
emulator: argv[15] = "-m"
emulator: argv[16] = "1536"
emulator: argv[17] = "-lcd-density"
emulator: argv[18] = "560"
emulator: argv[19] = "-nodefaults"
emulator: argv[20] = "-kernel"
emulator: argv[21] = "/Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//kernel-ranchu-64"
emulator: argv[22] = "-initrd"
emulator: argv[23] = "/Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//ramdisk.img"
emulator: argv[24] = "-drive"
emulator: argv[25] = "if=none,index=0,id=system,if=none,file=/Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//system.img,read-only"
emulator: argv[26] = "-device"
emulator: argv[27] = "virtio-blk-pci,drive=system,modern-pio-notify"
emulator: argv[28] = "-drive"
emulator: argv[29] = "if=none,index=1,id=cache,if=none,file=/Users/suphawutpitirit/.android/avd/Nexus.avd/cache.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[30] = "-device"
emulator: argv[31] = "virtio-blk-pci,drive=cache,modern-pio-notify"
emulator: argv[32] = "-drive"
emulator: argv[33] = "if=none,index=2,id=userdata,if=none,file=/Users/suphawutpitirit/.android/avd/Nexus.avd/userdata-qemu.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[34] = "-device"
emulator: argv[35] = "virtio-blk-pci,drive=userdata,modern-pio-notify"
emulator: argv[36] = "-drive"
emulator: argv[37] = "if=none,index=3,id=encrypt,if=none,file=/Users/suphawutpitirit/.android/avd/Nexus.avd/encryptionkey.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[38] = "-device"
emulator: argv[39] = "virtio-blk-pci,drive=encrypt,modern-pio-notify"
emulator: argv[40] = "-drive"
emulator: argv[41] = "if=none,index=4,id=vendor,if=none,file=/Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//vendor.img,read-only"
emulator: argv[42] = "-device"
emulator: argv[43] = "virtio-blk-pci,drive=vendor,modern-pio-notify"
emulator: argv[44] = "-drive"
emulator: argv[45] = "if=none,index=5,id=sdcard,if=none,file=/Users/suphawutpitirit/.android/avd/Nexus.avd/sdcard.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576"
emulator: argv[46] = "-device"
emulator: argv[47] = "virtio-blk-pci,drive=sdcard,modern-pio-notify"
emulator: argv[48] = "-netdev"
emulator: argv[49] = "user,id=mynet"
emulator: argv[50] = "-device"
emulator: argv[51] = "virtio-net-pci,netdev=mynet"
emulator: argv[52] = "-device"
emulator: argv[53] = "virtio-rng-pci"
emulator: argv[54] = "-show-cursor"
emulator: argv[55] = "-L"
emulator: argv[56] = "/Users/suphawutpitirit/Library/Android/sdk/emulator/lib/pc-bios"
emulator: argv[57] = "-soundhw"
emulator: argv[58] = "hda"
emulator: argv[59] = "-vga"
emulator: argv[60] = "none"
emulator: argv[61] = "-append"
emulator: argv[62] = "qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X3X5X0 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=314M@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 loop.max_part=7 dm="1 vroot none ro 1,0 5159992 verity 1 PARTUUID=79C63A0E-0C1B-4EFA-B140-ACC750125C4C PARTUUID=79C63A0E-0C1B-4EFA-B140-ACC750125C4C 4096 4096 644999 644999 sha1 07ed6548cdb185b90d216a9a509ef37146bc908e 12af25bd70dccf1891b5e51eac7fa7d5dad65626 1 ignore_zero_blocks" androidboot.veritymode=enforcing androidboot.verifiedbootstate=orange root=/dev/dm-0 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=384m printk.devkmsg=on"
emulator: argv[63] = "-android-hw"
emulator: argv[64] = "/Users/suphawutpitirit/.android/avd/Nexus.avd/hardware-qemu.ini"
Concatenated QEMU options:
 /Users/suphawutpitirit/Library/Android/sdk/emulator/qemu/darwin-x86_64/qemu-system-x86_64 -dns-server 192.168.1.1 -no-audio -serial null -android-ports 14668,14669 -device goldfish_pstore,addr=0xff018000,size=0x10000,file=/Users/suphawutpitirit/.android/avd/Nexus.avd/data/misc/pstore/pstore.bin -cpu android64 -enable-hvf -smp cores=2 -m 1536 -lcd-density 560 -nodefaults -kernel /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//kernel-ranchu-64 -initrd /Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//ramdisk.img -drive if=none,index=0,id=system,if=none,file=/Users/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//system.img,read-only -device virtio-blk-pci,drive=system,modern-pio-notify -drive if=none,index=1,id=cache,if=none,file=/Users/suphawutpitirit/.android/avd/Nexus.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/suphawutpitirit/.android/avd/Nexus.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,added library /Users/suphawutpitirit/Library/Android/sdk/emulator/lib64/vulkan/libMoltenVK.dylib
id=encrypt,if=none,file=/Users/suphawutpitirit/.android/avd/Nexus.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/suphawutpitirit/Library/Android/sdk/system-images/android-28/google_apis/x86//vendor.img,read-only -device virtio-blk-pci,drive=vendor,modern-pio-notify -drive if=none,index=5,id=sdcard,if=none,file=/Users/suphawutpitirit/.android/avd/Nexus.avd/sdcard.img.qcow2,overlap-check=none,cache=unsafe,l2-cache-size=1048576 -device virtio-blk-pci,drive=sdcard,modern-pio-notify -netdev user,id=mynet -device virtio-net-pci,netdev=mynet -device virtio-rng-pci -show-cursor -L /Users/suphawutpitirit/Library/Android/sdk/emulator/lib/pc-bios -soundhw hda -vga none -append 'qemu=1 no_timer_check androidboot.hardware=ranchu androidboot.serialno=EMULATOR30X3X5X0 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=314M@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 loop.max_part=7 dm="1 vroot none ro 1,0 5159992 verity 1 PARTUUID=79C63A0E-0C1B-4EFA-B140-ACC750125C4C PARTUUID=79C63A0E-0C1B-4EFA-B140-ACC750125C4C 4096 4096 644999 644999 sha1 07ed6548cdb185b90d216a9a509ef37146bc908e 12af25bd70dccf1891b5e51eac7fa7d5dad65626 1 ignore_zero_blocks" androidboot.veritymode=enforcing androidboot.verifiedbootstate=orange root=/dev/dm-0 ramoops.mem_address=0xff018000 ramoops.mem_size=0x10000 memmap=0x10000$0xff018000 qemu.dalvik.vm.heapsize=384m printk.devkmsg=on' -android-hw /Users/suphawutpitirit/.android/avd/Nexus.avd/hardware-qemu.ini
emulator: Android qemu version 30.3.5.0 (build_id 7033400) (CL:N/A)

emulator: Starting QEMU main loop
emulator: Adding boot property: 'ro.opengles.version' = '196608'
emulator: Adding boot property: 'qemu.sf.fake_camera' = 'front'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '384m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '560'
emulator: goldfish_events.have-dpad: false
emulator: goldfish_events.have-trackball: false
emulator: goldfish_events.have-camera: true
emulator: goldfish_events.have-keyboard: true
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 (14669) 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' = 'Asia/Bangkok'
emulator: android_hw_fingerprint_init: fingerprint qemud listen service initialized

emulator: emulator_window_fb_rotate

emulator: No acpi ini file provided, using default

emulator: OpenGL Vendor=[Google (Intel Inc.)]
emulator: OpenGL Renderer=[Android Emulator OpenGL ES Translator (Intel(R) Iris(TM) Plus Graphics 640)]
emulator: OpenGL Version=[OpenGL ES 3.0 (4.1 INTEL-16.4.5)]
emulator: VERBOSE: AdbInterface.cpp:386: Found: 3 adb executables
emulator: VERBOSE: AdbInterface.cpp:388: Adb: /Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:388: Adb: /Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:388: Adb: /Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb
emulator: VERBOSE: AdbInterface.cpp:410: Path:/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb protocol version: 41
emulator: VERBOSE: AdbInterface.cpp:410: Path:/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb protocol version: 41
emulator: VERBOSE: AdbInterface.cpp:410: Path:/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb protocol version: 41
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: 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' = 'front'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '384m'
emulator: Adding boot property: 'qemu.hw.mainkeys' = '0'
emulator: Adding boot property: 'qemu.sf.lcd_density' = '560'
emulator: Adding boot property: 'qemu.timezone' = 'Asia/Bangkok'
emulator: _hwFingerprint_connect: connect finger print listen is called

emulator: OpenGL Vendor=[Google (Intel Inc.)]
emulator: OpenGL Renderer=[Android Emulator OpenGL ES Translator (Intel(R) Iris(TM) Plus Graphics 640)]
emulator: OpenGL Version=[OpenGL ES 3.0 (4.1 INTEL-16.4.5)]
emulator: onGuestSendCommand: [0x7fae93254910] Adb connected, start proxing data

detox[1414] DEBUG: [EXEC_CMD, #3] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "getprop dev.bootcomplete"
detox[1414] TRACE: [EXEC_SUCCESS, #3] 1

detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onBootDevice({ coldBoot: true, deviceId: 'emulator-14668', type: 'Nexus' })
detox[1414] DEBUG: [EXEC_CMD, #4] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "getprop ro.build.version.sdk"
detox[1414] TRACE: [EXEC_SUCCESS, #4] 28

detox[1414] DEBUG: [EXEC_CMD, #5] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "settings put global animator_duration_scale 0"
detox[1414] TRACE: [EXEC_SUCCESS, #5] 
detox[1414] DEBUG: [EXEC_CMD, #6] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "settings put global window_animation_scale 0"
detox[1414] TRACE: [EXEC_SUCCESS, #6] 
detox[1414] DEBUG: [EXEC_CMD, #7] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "settings put global transition_animation_scale 0"
detox[1414] TRACE: [EXEC_SUCCESS, #7] 
detox[1414] DEBUG: [EXEC_CMD, #8] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "dumpsys power | grep \"^[ ]*m[UW].*=\""
detox[1414] TRACE: [EXEC_SUCCESS, #8]   mWakefulness=Awake
  mWakefulnessChanging=false
  mWakeLockSummary=0x0
  mUserActivitySummary=0x1
  mWakeUpWhenPluggedOrUnpluggedConfig=false
  mWakeUpWhenPluggedOrUnpluggedInTheaterModeConfig=false
  mUserActivityTimeoutOverrideFromWindowManager=-1
  mUserInactiveOverrideFromWindowManager=false

detox[1414] DEBUG: [EXEC_CMD, #9] "/Users/suphawutpitirit/Library/Android/sdk/build-tools/30.0.3/aapt" dump badging "/Users/suphawutpitirit/Developer/varun-mobile-app-v2/android/app/build/outputs/apk/dev/release/app-dev-release.apk" | grep -e "package: name="
detox[1414] TRACE: [EXEC_SUCCESS, #9] package: name='com.arv.varun.dev' versionCode='1' versionName='1.0.0' compileSdkVersion='29' compileSdkVersionCodename='10'

detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onBeforeTerminateApp({ deviceId: 'emulator-14668', bundleId: 'com.arv.varun.dev' })
detox[1414] DEBUG: [EXEC_CMD, #10] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "am force-stop com.arv.varun.dev"
detox[1414] TRACE: [EXEC_SUCCESS, #10] 
detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onTerminateApp({ deviceId: 'emulator-14668', bundleId: 'com.arv.varun.dev' })
detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onBeforeUninstallApp({ deviceId: 'emulator-14668', bundleId: 'com.arv.varun.dev' })
detox[1414] DEBUG: [EXEC_CMD, #11] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "pm list packages com.arv.varun.dev"
detox[1414] TRACE: [EXEC_SUCCESS, #11] 
detox[1414] DEBUG: [EXEC_CMD, #12] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "pm list packages com.arv.varun.dev.test"
detox[1414] TRACE: [EXEC_SUCCESS, #12] 
detox[1414] DEBUG: [EXEC_CMD, #13] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "rm -fr /data/local/tmp/detox"
detox[1414] TRACE: [EXEC_SUCCESS, #13] 
detox[1414] DEBUG: [EXEC_CMD, #14] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "mkdir -p /data/local/tmp/detox"
detox[1414] TRACE: [EXEC_SUCCESS, #14] 
detox[1414] DEBUG: [EXEC_CMD, #15] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 push "/Users/suphawutpitirit/Developer/varun-mobile-app-v2/android/app/build/outputs/apk/dev/release/app-dev-release.apk" "/data/local/tmp/detox/Application.apk"
detox[1414] TRACE: [EXEC_SUCCESS, #15] /Users/suphawutpitirit/Developer/varun-mobile-app-v2/android/app/build/outputs/apk/dev/release/app-dev-release.apk: 1 file pushed, 0 skipped. 25.4 MB/s (29172624 bytes in 1.096s)

detox[1414] DEBUG: [EXEC_CMD, #16] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "pm install -r -g -t /data/local/tmp/detox/Application.apk"
detox[1414] TRACE: [EXEC_SUCCESS, #16] Success

detox[1414] DEBUG: [EXEC_CMD, #17] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 push "/Users/suphawutpitirit/Developer/varun-mobile-app-v2/android/app/build/outputs/apk/dev/release/app-dev-release.apk" "/data/local/tmp/detox/Test.apk"
detox[1414] TRACE: [EXEC_SUCCESS, #17] /Users/suphawutpitirit/Developer/varun-mobile-app-v2/android/app/build/outputs/apk/dev/release/app-dev-release.apk: 1 file pushed, 0 skipped. 24.4 MB/s (29172624 bytes in 1.141s)

detox[1414] DEBUG: [EXEC_CMD, #18] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "pm install -r -g -t /data/local/tmp/detox/Test.apk"
detox[1414] TRACE: [EXEC_SUCCESS, #18] Success

ROOT_DESCRIBE_BLOCK[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onRunDescribeStart({ name: 'ROOT_DESCRIBE_BLOCK' })
Example[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onRunDescribeStart({ name: 'Example' })
detox[1414] INFO:  Example is assigned to emulator-14668 (Nexus)
detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onBeforeTerminateApp({ deviceId: 'emulator-14668', bundleId: 'com.arv.varun.dev' })
detox[1414] DEBUG: [EXEC_CMD, #19] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "am force-stop com.arv.varun.dev"
detox[1414] TRACE: [EXEC_SUCCESS, #19] 
detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onTerminateApp({ deviceId: 'emulator-14668', bundleId: 'com.arv.varun.dev' })
detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onBeforeLaunchApp({
  deviceId: 'emulator-14668',
  bundleId: 'com.arv.varun.dev',
  launchArgs: {
    detoxServer: 'ws://localhost:49791',
    detoxSessionId: 'f781aa6e-0222-5fbd-9648-be6683b6abd4'
  }
})
detox[1414] DEBUG: [EXEC_CMD, #20] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "date +\"%m-%d %T.000\""
detox[1414] TRACE: [EXEC_SUCCESS, #20] 07-12 10:18:16.000

detox[1414] DEBUG: [EXEC_CMD, #21] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 reverse tcp:49791 tcp:49791
detox[1414] TRACE: [EXEC_SUCCESS, #21] 
detox[1414] DEBUG: [EXEC_CMD, #22] "/Users/suphawutpitirit/Library/Android/sdk/platform-tools/adb" -s emulator-14668 shell "pm list instrumentation"
detox[1414] TRACE: [EXEC_SUCCESS, #22] instrumentation:org.chromium.webview_shell/.WebViewLayoutTestRunner (target=org.chromium.webview_shell)

detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onHookFailure({
  error: DetoxRuntimeError: No instrumentation runner found on device emulator-14668 for package com.arv.varun.dev
      at /Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/__tests__/firstTest.e2e.ts:5:18
      at step (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/__tests__/firstTest.e2e.ts:33:23)
      at Object.next (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/__tests__/firstTest.e2e.ts:14:53)
      at /Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/__tests__/firstTest.e2e.ts:8:71
      at new Promise (<anonymous>)
      at __awaiter (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/__tests__/firstTest.e2e.ts:4:12)
      at /Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/__tests__/firstTest.e2e.ts:4:13
      at Promise.then.completed (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/utils.js:276:28)
      at new Promise (<anonymous>)
      at callAsyncCircusFn (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/utils.js:216:10)
      at _callCircusHook (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/run.js:175:40)
      at _runTestsForDescribeBlock (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/run.js:45:5)
      at _runTestsForDescribeBlock (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/run.js:57:9)
      at run (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/run.js:25:3),
  hook: 'beforeAll'
})
detox[1414] INFO:  Example: should have welcome screen
detox[1414] INFO:  Example: should have welcome screen [FAIL]
Example[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onRunDescribeFinish({ name: 'Example' })

detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onHookFailure({
  error: TypeError: adapter.afterAll is not a function
      at /Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/setupTests.ts:15:17
      at step (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/setupTests.ts:52:23)
      at Object.next (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/setupTests.ts:33:53)
      at /Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/setupTests.ts:27:71
      at new Promise (<anonymous>)
      at __awaiter (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/setupTests.ts:23:12)
      at /Users/suphawutpitirit/Developer/varun-mobile-app-v2/e2e/setupTests.ts:14:10
      at Promise.then.completed (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/utils.js:276:28)
      at new Promise (<anonymous>)
      at callAsyncCircusFn (/Users/suphawutpitirit/Developer/varun-mobile-app-v2/node_modules/jest-circus/build/utils.js:216:10),
  hook: 'afterAll'
})
ROOT_DESCRIBE_BLOCK[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onRunDescribeFinish({ name: 'ROOT_DESCRIBE_BLOCK' })
detox[1414] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onBeforeCleanup()
detox[1414] DEBUG: [WSS_CLOSE] Detox server has been closed gracefully

SetupFilesAfterEnv:

import { cleanup, device, beforeEach } from 'detox'; import * as adapter from 'detox/runners/jest/adapter';

beforeAll(async () => { await device.launchApp({ newInstance: true }); });

beforeEach(async () => { await adapter.beforeEach(); await device.reloadReactNative(); });

afterAll(async () => { await adapter.afterAll() await cleanup(); });



So what I missing on the configuration I saw on my emu has already install My app with the same package is com.arv.varun.dev but detox has not found the app. Any solution?
kitoymonster commented 3 years ago

Encountered the same issue as well. In android, it only builds successfully but it doesn't install in app when test is ran. I tried to manually install the apk and launch it and it works fine but when the test is ran, it doesn't install it, and when I launch the app when test is running, it just hang up and just shows white page.

No problem running in IOS. I already did the following:

  1. Set the following in build.gradle

    minSdkVersion = 26
    targetSdkVersion = 27
    ext.kotlinVersion = '1.3.72' 
    and added classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
  2. Set in detoxrc

    "android": {
      "type": "android.apk",
      "binaryPath": "android/app/build/outputs/apk/debug/app-debug.apk",
      "build": "cd android ; ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug ; cd -"
    }

Edit 8/25: After a few days of tweaking, reinstalling, following this guide: https://github.com/wix/Detox/blob/master/docs/Introduction.Android.md#6-enable-clear-text-unencrypted-traffic-for-detox, I tried this one. I'm just now sure if theres any effect in doing this.

  1. Clone https://github.com/wix-incubator/DetoxTemplate/
  2. Make sure the sample test is running in android
  3. Change detoxrc and add a new android entry to point to the other app's working binary and testBinary
  4. Run the test from here

Same issue in INSTRUMENTATION but the error is different.

_``` detox[11114] TRACE: [SPAWN_STDOUT, #11151] INSTRUMENTATION_RESULT: shortMsg=Process crashed. INSTRUMENTATION_CODE: 0

detox[11114] DEBUG: [SPAWN_END, #11151] /Library/Android/sdk/platform-tools/adb -s emulator-18698 shell am instrument -w -r -e detoxServer ws://localhost:55559 -e detoxSessionId 7d3f5487-a90a-1cf1-55bd-ca64ff6e4d1e -e debug false com.cardspal.test/android.test.InstrumentationTestRunner finished with code = 0 detox[11114] DEBUG: [EXEC_CMD, #27] "/Library/Android/sdk/platform-tools/adb" -s emulator-18698 reverse --remove tcp:55559 detox[11114] TRACE: [ARTIFACTS_LIFECYCLE] artifactsManager.onHookFailure({ error: 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.

detox[11114] INFO: Example Screen Tests: should type into the text field detox[11114] INFO: Example Screen Tests: should type into the text field [FAIL]

stale[bot] commented 3 years ago

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.

d4vidi commented 3 years ago

@kingdark1234 you've specified your app apk under both binaryPath and testBinaryPath.

"binaryPath": "android/app/build/outputs/apk/dev/release/app-dev-release.apk"
"testBinaryPath": "android/app/build/outputs/apk/dev/release/app-dev-release.apk"

For testBinaryPath, you must use the test apk. For example: android/app/build/outputs/apk/androidTest/dev/release/app-dev-release-androidTest.apk. I think that in your case, you can leave testBinaryPath empty and Detox will infer the right path, for you.

d4vidi commented 3 years ago

@kitoymonster please report through a different issue / stack-overflow 🙏🏻