Detox: Detox can't seem to connect to the test app(s)!
Did you test using the latest Detox?
- I have tested this issue on the latest Detox release and it still reproduces.
Did your test fail and you’re not sure why?
- I have read the troubleshooting guide and it didn’t help me.
What happened?
I saw all the issues here but anyone help with this problem however can’t be fixed my problem. I can run on iOS platform, but in Android I can’t, and I’m in this problem for many days. Can anyone help me with this, please?
15:12:16.847 detox[54729] B jest --config e2e/jest.config.js 15:12:28.286 detox[54730] i starter.test.js is assigned to AttachedDevice:ZE223HGBVK 15:12:32.122 detox[54730] i An error occurred while waiting for the app to become ready. Waiting for disconnection… error: 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. 15:12:32.123 detox[54730] i The app disconnected. 15:12:32.128 detox[54730] i Splash: should have splash screen 15:12:32.131 detox[54730] i Splash: should have splash screen [FAIL]
15:12:32.144 detox[54730] i Detox can’t seem to connect to the test app(s)!
HINT:
The test app might have crashed prematurely, or has had trouble setting up the connection. Refer to our troubleshooting guide, for full details: https://wix.github.io/Detox/docs/troubleshooting/running-tests#tests-execution-hangs
FAIL e2e/starter.test.js (14.871 s) Splash ✕ should have splash screen (3 ms)
● Splash › should have splash screen
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.
1 | describe('Splash', () => {
2 | beforeAll(async () => {
> 3 | await device.launchApp();
| ^
4 | });
5 |
6 | beforeEach(async () => {
at Object.launchApp (e2e/starter.test.js:3:18)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
at node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:7
at Object.<anonymous> (node_modules/@babel/runtime/helpers/asyncToGenerator.js:14:12)
15:12:39.342 detox[54730] i FirstPage.test.js is assigned to AttachedDevice:ZE223HGBVK 15:12:41.927 detox[54730] i An error occurred while waiting for the app to become ready. Waiting for disconnection… error: 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. 15:12:41.928 detox[54730] i The app disconnected. 15:12:41.932 detox[54730] i FirstPage: should have first screen 15:12:41.933 detox[54730] i FirstPage: should have first screen [FAIL] 15:12:41.934 detox[54730] i FirstPage: should be tap on button first time 15:12:41.935 detox[54730] i FirstPage: should be tap on button first time [FAIL] 15:12:41.937 detox[54730] i FirstPage: should be tap on button Already client 15:12:41.937 detox[54730] i FirstPage: should be tap on button Already client [FAIL]
15:12:41.953 detox[54730] i Detox can’t seem to connect to the test app(s)!
HINT:
The test app might have crashed prematurely, or has had trouble setting up the connection. Refer to our troubleshooting guide, for full details: https://wix.github.io/Detox/docs/troubleshooting/running-tests#tests-execution-hangs
FAIL e2e/FirstPage.test.js (9.8 s) FirstPage ✕ should have first screen ✕ should be tap on button first time (1 ms) ✕ should be tap on button Already client
● FirstPage › should have first screen
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.
3 | describe('FirstPage', () => {
4 | beforeAll(async () => {
> 5 | await device.launchApp();
| ^
6 | });
7 |
8 | beforeEach(async () => {
at Object.launchApp (e2e/FirstPage.test.js:5:18)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
at node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:7
at Object.<anonymous> (node_modules/@babel/runtime/helpers/asyncToGenerator.js:14:12)
● FirstPage › should be tap on button first time
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.
3 | describe('FirstPage', () => {
4 | beforeAll(async () => {
> 5 | await device.launchApp();
| ^
6 | });
7 |
8 | beforeEach(async () => {
at Object.launchApp (e2e/FirstPage.test.js:5:18)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
at node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:7
at Object.<anonymous> (node_modules/@babel/runtime/helpers/asyncToGenerator.js:14:12)
● FirstPage › should be tap on button Already client
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.
3 | describe('FirstPage', () => {
4 | beforeAll(async () => {
> 5 | await device.launchApp();
| ^
6 | });
7 |
8 | beforeEach(async () => {
at Object.launchApp (e2e/FirstPage.test.js:5:18)
at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
at node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:7
at Object.<anonymous> (node_modules/@babel/runtime/helpers/asyncToGenerator.js:14:12)
Test Suites: 2 failed, 2 total Tests: 4 failed, 4 total Snapshots: 0 total Time: 24.722 s Ran all test suites. 15:12:42.067 detox[54729] E Command failed with exit code = 1: jest --config e2e/jest.config.js
What was the expected behaviour?
No response
Help us reproduce this issue!
No response
In what environment did this happen?
Detox version: React Native version: Has Fabric (React Native’s new rendering system) enabled: (yes/no) Node version: Device model: Android version: Test-runner (select one): jest / other
Detox logs
Detox logs
paste logs here!
Device logs
Device logs
paste your device.log here!
More data, please!
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 31 (9 by maintainers)
@GazEdBro is you delete node_module folder before zip?
Hi @gosha212 I have re-run the detox command using this “npx detox test --configuration android e2e/minimal.e2e.js --record-logs all” which I think should be as good as the -l trace? The device log does not have and detox references, but there is a detox log and detox.trace.json which I am attaching.
detox.trace.json detox.log
I appear to have exactly the same issue - so here is my device.log:
DeviceLog.txt
@GazEdBro I can’t start the app without the android folder. You can remove the build folder inside the
androidandandroid/app. This will reduce the size of the zip. If you’re using git, you can rungit clean -fdxin order to clean everything not related to the repoNot really! Still stuck with this issue.
From: nvacheishvili @.> Sent: Saturday, 19 April 2025 12:09 AM To: wix/Detox @.> Cc: Usama Asghar @.>; Mention @.> Subject: Re: [wix/Detox] Detox can’t seem to connect to the test app(s)! (Issue #4753)
Same issue here any update?
— Reply to this email directly, view it on GitHubhttps://github.com/wix/Detox/issues/4753#issuecomment-2816043631, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYQGHVCPBR64XTL26W7RBWD22FEXJAVCNFSM6AAAAAB2TZSR2WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJWGA2DGNRTGE. You are receiving this because you were mentioned.Message ID: @.***>
[https://avatars.githubusercontent.com/u/15612632?s=20&v=4]nvacheishvili left a comment (wix/Detox#4753)https://github.com/wix/Detox/issues/4753#issuecomment-2816043631
Same issue here any update?
— Reply to this email directly, view it on GitHubhttps://github.com/wix/Detox/issues/4753#issuecomment-2816043631, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AYQGHVCPBR64XTL26W7RBWD22FEXJAVCNFSM6AAAAAB2TZSR2WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJWGA2DGNRTGE. You are receiving this because you were mentioned.Message ID: @.***>
Same issue here any update?
Thanks @vauruk for reporting this issue. I am also getting exactly the same issue. Any update?