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 have been trying to run detox on WSL 2 but no luck no matter how many solutions I try. I have done my complete setup (java, nodejs, android-studio, yarn, npm, everything needed) in WSL 2. From these, I am able to build both binaryPath and testBinaryPath.
When I try to connect ADB from WSL 2, and when I try the command yarn detox:e2e:android-debug, Detox fails to install / run the test apks.
These are the solutions I have tried:
Pre-req:
Configure PORTS 5555, 5037, 5556 and allow inbound traffic in windows firewall
UBSIPD
Solution 1 - Connect using the PORT 5555
Windows cmd: adb kill-server
Windows cmd: adb start-server
Windows cmd: adb tcpip 5555
WSL2: adb connect <phone_ip>:5555
Error - No Host to Route
Solution 2 - Connect by using the variable ADB_SERVER_SOCKET=tcp:<windows_host_IP>:5037
Windows cmd: adb -a -P 5037 nodaemon server start
Windows cmd: adb devices -> Device gets listed
WSL2: adb devices -> Device gets listed and I can run adb logcat and I can even install the react apk built at binaryPath but the apk generated at testBinaryPath does not get installed.
Error:
adb.exe I 04-28 18:34:17 24176 10752 transport.cpp:1727] fetching keys for transport 19287B2023
adb.exe I 04-28 18:34:17 24176 10752 auth.cpp:468] Calling send_auth_response
adb.exe I 04-28 18:34:17 24176 10752 auth.cpp:435] Calling send_auth_publickey
adb.exe I 04-28 18:34:20 24176 10752 adb.cpp:176] 19287B2023: offline
adb.exe E 04-28 18:37:03 24176 10752 services.cpp:83] failed to connect to socket 'tcp:33999': cannot connect to 127.0.0.1:33999: No connection could be made because the target machine actively refused it. (10061)
adb.exe E 04-28 18:37:08 24176 10752 services.cpp:83] failed to connect to socket 'tcp:33999': cannot connect to 127.0.0.1:33999: No connection could be made because the target machine actively refused it. (10061)
adb.exe E 04-28 18:37:13 24176 10752 services.cpp:83] failed to connect to socket 'tcp:33999': cannot connect to 127.0.0.1:33999: No connection could be made because the target machine actively refused it. (10061)
adb.exe E 04-28 18:37:18 24176 10752 services.cpp:83] failed to connect to socket 'tcp:33999': cannot connect to 127.0.0.1:33999: No connection could be made because the target machine actively refused it. (10061)
adb.exe E 04-28 18:37:23 24176 10752 services.cpp:83] failed to connect to socket 'tcp:33999': cannot connect to 127.0.0.1:33999: No connection could be made because the target machine actively refused it. (10061)
adb.exe E 04-28 18:37:28 24176 10752 services.cpp:83] failed to connect to socket 'tcp:33999': cannot connect to 127.0.0.1:33999: No connection could be made because the target machine actively refused it. (10061)
adb.exe E 04-28 18:37:33 24176 10752 services.cpp:83] failed to connect to socket 'tcp:33999': cannot connect to 127.0.0.1:33999: No connection could be made because the target machine actively refused it. (10061)
Solution 3 - Wi-Fi Debugging
Android: Enable Wi-Fi debugging
WSL2: adb connect <phone_ip>:5556 - This works flawlessly on a Mac but not in WSL2.
What was the expected behaviour?
I just want detox test apk generated at testBinaryPath to run.
Was it tested on latest Detox?
I have tested this issue on the latest Detox release and it still reproduces.
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 repository, read this discussion.
What happened?
I have been trying to run detox on WSL 2 but no luck no matter how many solutions I try. I have done my complete setup (java, nodejs, android-studio, yarn, npm, everything needed) in WSL 2. From these, I am able to build both
binaryPath
andtestBinaryPath
.When I try to connect ADB from WSL 2, and when I try the command yarn detox:e2e:android-debug, Detox fails to install / run the test apks.
These are the solutions I have tried:
Pre-req:
Solution 1 - Connect using the PORT 5555
Windows
cmd: adb kill-server
Windows
cmd: adb start-server
Windows
cmd: adb tcpip 5555
WSL2: adb connect <phone_ip>:5555
Error - No Host to Route
Solution 2 - Connect by using the variable ADB_SERVER_SOCKET=tcp:<windows_host_IP>:5037
Windows cmd:
adb -a -P 5037 nodaemon server start
Windows cmd:
adb devices -> Device gets listed
WSL2: adb devices -> Device gets listed and I can run
adb logca
t and I can even install the react apk built atbinaryPath
but the apk generated attestBinaryPath
does not get installed.Error:
Solution 3 - Wi-Fi Debugging
Android: Enable Wi-Fi debugging
WSL2: adb connect <phone_ip>:5556 - This works flawlessly on a Mac but not in WSL2.
What was the expected behaviour?
I just want detox test apk generated at
testBinaryPath
to run.Was it tested on latest Detox?
Did your test throw out a timeout?
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: The latest 20+
React Native version:
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: v16.20.0
Device model: EDA51
Android version: Android 8.1.0
Test-runner (select one): jest / other : Cucumber
Detox logs
Detox logs
Device logs
Device logs
More data, please!
No response
The text was updated successfully, but these errors were encountered: