Detox: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected
Describe the bug
I have Detox tests successfully being built and running on an iOS Simulator. I have Detox successfully building for Android, but when attempting to run the tests, I see the app launch and then error because the DetoxServer is unable to forward. The test shows it is unassigned
.
To Reproduce
- [ X] I have tested this issue on the latest Detox release and it still reproduces
Running the following command:
yarn run detox test -c android.emu.release --loglevel trace
Environment (please complete the following information):
- Detox: ^14.5.1
- React Native: 0.60.5
- Node: ^8.3 || >=10.*
- Device: emulator-15018 device
- OS: API 28
Device and Verbose Detox Logs
detox[70981] DEBUG: [exec.js/EXEC_CMD, #17] /Users/mvd/Library/Android/sdk/platform-tools/adb -s emulator-15018 shell "ps | grep \"com\.app_name\.app$\""
detox[70981] TRACE: [exec.js/EXEC_SUCCESS, #17] u0_a106 29575 1934 1452728 123920 0 0 S com.app_name.app
detox[29575] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ deviceId: 'emulator-15018',
bundleId: 'com.app_name.app',
launchArgs:
{ detoxServer: 'ws://localhost:50780',
detoxSessionId: 'beebae37-5672-7400-eb92-e9f14ad9b594' },
pid: 29575 })
detox[70981] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[70981] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=beebae37-5672-7400-eb92-e9f14ad9b594)
detox[70981] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=beebae37-5672-7400-eb92-e9f14ad9b594)
A test to validate the Login page assigned to undefined
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 12
- Comments: 19 (1 by maintainers)
@fancychimp I tried a lot of things, but I think what fixed it for me was setting android/build.gradle with this:
and then using an emulator on sdk/api 27.
The solution mentioned here: https://github.com/wix/Detox/issues/1743#issuecomment-573647070 solved the issue for me.
@Imtiyaazg Same for me.
I’m experiencing the same issue in debug mode.
targetSdkVersion = 27
does not work for me. App launches but never kicks off the tests. I have a whole suite running for iOS without any issues.