'Detox react-native build success, "Detox can't seem to connect to the test app(s)!" (iOS)
Managed to build successfully, but I suspect I have something wrong with my binaryPath in .detoxrc?
- react-native: 0.64.1
- detox: 18.22.1
.detoxrc.json
{
"testRunner": "jest",
"runnerConfig": "e2e/config.json",
"skipLegacyWorkersInjection": true,
"apps": {
"ios": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/myappname.app",
"build": "xcodebuild -workspace ios/myappname.xcworkspace -configuration Release -scheme myappname id=ED0F3373-A57D-481B-86DA-D87007C00F85 -sdk iphonesimulator"
}
},
"devices": {
"simulator": {
"type": "ios.simulator",
"device": {
"type": "iPhone 12"
}
}
},
"configurations": {
"ios": {
"device": "simulator",
"app": "ios"
}
}
}
config.json
{
"maxWorkers": 1,
"testEnvironment": "./environment",
"testRunner": "jest-circus/runner",
"testTimeout": 5000,
"testNamePattern": "**.spec.js",
"reporters": ["detox/runners/jest/streamlineReporter"],
"verbose": true
}
react-native app running in iOS Simulator. detox test -c ios leads to:
detox[72935] ERROR: [APP_UNREACHABLE] 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://github.com/wix/Detox/blob/master/docs/Troubleshooting.RunningTests.md#tests-execution-hangs
Solution 1:[1]
The same thing happened to me running on M1 Apple Silicon—fixed it by downgrading to 17.14.9
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Henry Ecker |
