wix/Detox

adb reverse command not working

chalsjain opened this issue · 0 comments

What happened?

In ADB.js there is a method which is using adb reverse command. This command doesn't work on Android 7 if device is connected via IP. If it is connected via USB then it will work.

async reverse(deviceId, port) {
return this.adbCmd(deviceId, forward tcp:${port} tcp:${port});
}

Actual Behaviour -> ADB reverse will not work on Android 7. (Device - Amazon FireTV 4k) if it is connected via IP.
Expected Behaviour -> Instead of ADB reverse, adb forward can be used which will solve the issue

What was the expected behaviour?

No response

Was it tested on latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Did your test throw out a timeout?

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 19.2.0
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: 14.21.3
Device model: Amazon FireTV 4k
Android version: 7.1.2
Test-runner (select one): jest / other NodeJS

Detox logs

Detox logs

04:38:50.443 detox[3776123] ERROR: [EXEC_FAIL, #16] ""/home/tcoe/android-sdk/platform-tools/adb" -s 192.168.2.222:5555 reverse tcp:42903 tcp:42903" failed with error = ChildProcessError: Command failed: "/home/tcoe/android-sdk/platform-tools/adb" -s 192.168.2.222:5555 reverse tcp:42903 tcp:42903
339adb: error: more than one device/emulator
340 "/home/tcoe/android-sdk/platform-tools/adb" -s [192.168.2.222:5555](http://192.168.2.222:5555/) reverse tcp:42903 tcp:42903 (exited with error code 1) (code=1), stdout and stderr:

04:38:50.445 detox[3776123] ERROR: [EXEC_FAIL, #16] adb: error: more than one device/emulator
345ChildProcessError: Command failed: "/home/tcoe/android-sdk/platform-tools/adb" -s 192.168.2.222:5555 reverse tcp:42903 tcp:42903

Device logs

Device logs
paste your device.log here!

More data, please!

No response