My project is built successfully, but when I run detox test, I get the bellow error at the stage Searching for device matching iPhone <model>. I've changed the iPhone models in my package.json, but the error remains the same.
detox info 21:49:13: server listening on localhost:53476...
detox info 1: Searching for device matching iPhone 7...
1) "before all" hook
0 passing (68ms)
1 failing
1) "before all" hook:
Error: Command failed: applesimutils --list "iPhone 7" --maxResults=1
Unknown command line option --list, try --help!
Unknown command line option --maxResults=1, try --help!
Usage: applesimutils --simulator <simulator name/identifier> --bundle <bundle identifier> --setPermissions "<permission1>, <permission2>, ..."
applesimutils --simulator <simulator name/identifier> --restartSB
Options:
--simulator The simulator identifier or simulator name & operating system version (e.g. "iPhone 7 Plus, OS = 10.3")
--bundle The app bundle identifier
--setPermissions Sets the specified permissions and restarts SpringBoard for the changes to take effect
--restartSB Restarts SpringBoard
--help, -h Prints usage
Available permissions:
calendar=YES|NO
camera=YES|NO
contacts=YES|NO
health=YES|NO
homekit=YES|NO
location=always|inuse|never
medialibrary=YES|NO
microphone=YES|NO
motion=YES|NO
notifications=YES|NO
photos=YES|NO
reminders=YES|NO
siri=YES|NO
For more features, open an issue at https://github.com/wix/AppleSimulatorUtils
Pull-requests are always welcome!
`applesimutils --list "iPhone 7" --maxResults=1` (exited with error code 255)
at callback (node_modules/child-process-promise/lib/index.js:33:27)
at ChildProcess.exithandler (child_process.js:212:5)
at maybeClose (internal/child_process.js:899:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at Pipe._handle.close [as _onclose] (net.js:509:12)
child_process.js:524
throw err;
^
Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts
at checkExecSyncError (child_process.js:481:13)
at Object.execSync (child_process.js:521:13)
at Object.<anonymous> (<my project directory>/node_modules/detox/local-cli/detox-test.js:46:4)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:423:7)
I'm using
detox 5.6.2
react-native: 0.44.0
I have the following in my package.json:
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/<my-app>.app",
"build": "xcodebuild -project ios/<my-app>.xcodeproj -scheme <my-app> -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 6s"
}
}
}
please update applesimutil to latest version!
There has been breaking change in the way we filter and output the device list. Detox should have handled that by showing a more explicit error, suggesting to update applesimtutils, but clearly, it doesn't work.
@rotemmiz yep! That absolutely resolved the issue for me!
And as mentioned in #127, it is a good idea for Detox to produce more transparent errors.
Thank you.
For anyone else like me who had forgotten where applesimutils comes from... it's probably homebrew.
brew update && brew upgrade applesimutils
Most helpful comment
please update applesimutil to latest version!
There has been breaking change in the way we filter and output the device list. Detox should have handled that by showing a more explicit error, suggesting to update applesimtutils, but clearly, it doesn't work.