You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able to use detox with a pre-started android emulator. However, if I configure detox with "type" of "android.attached", and set --device-name to e.g. emulator-5554, I get the following error:
Could not find 'emulator-5554' on the currently ADB attached devices: '[{"type":"emulator","name":"android-27-480x800-mdpi","adbName":"emulator-5554","port":"5554"}]',
try restarting adb 'adb kill-server && adb start-server'
at AttachedAndroidDriver.findDeviceId (node_modules/detox/src/devices/drivers/AndroidDriver.js:192:15)
Using the avd name for --device-name didn't work. That makes sense, since this option is generally interpreted as adb id within detox.
Using a "type" of android.emulator didn't work either. This is also reasonable - it exists to make detox start an emulator, so shouldn't use a pre-existing one.
If I patch isEmulator() to return false, then detox does work with a pre-started emulator. This is since "name" and "adbName" both get set to the adb id for non-emulators.
(This is for a standard android emulator, not genymotion.)
Could not find 'emulator-5554' on the currently ADB attached devices: '[{"type":"emulator","name":"android-27-480x800-mdpi","adbName":"emulator-5554","port":"5554"}]',
try restarting adb 'adb kill-server && adb start-server'
at AttachedAndroidDriver.findDeviceId (node_modules/detox/src/devices/drivers/AndroidDriver.js:192:15)
The text was updated successfully, but these errors were encountered:
Description
I'd like to be able to use detox with a pre-started android emulator. However, if I configure detox with "type" of "android.attached", and set --device-name to e.g. emulator-5554, I get the following error:
It fails like this since https://github.com/wix/Detox/blob/9.0.4/detox/src/devices/drivers/AttachedAndroidDriver.js is using "name" not "adbName" when calling findDeviceId(). For android emulators, detox sets "name" to the AVD name, not the adb id.
Using the avd name for --device-name didn't work. That makes sense, since this option is generally interpreted as adb id within detox.
Using a "type" of android.emulator didn't work either. This is also reasonable - it exists to make detox start an emulator, so shouldn't use a pre-existing one.
If I patch isEmulator() to return false, then detox does work with a pre-started emulator. This is since "name" and "adbName" both get set to the adb id for non-emulators.
(This is for a standard android emulator, not genymotion.)
Steps to Reproduce
package.json
Detox, Node, Device, Xcode and macOS Versions
Device and verbose Detox logs
The text was updated successfully, but these errors were encountered: