I am running this command:
detox test -c ios.sim.debug --loglevel verbose
And this is my build configuration:
xcodebuild -workspace ios/PocketGeek.xcworkspace -configuration Debug -scheme PocketGeek -sdk iphonesimulator -derivedDataPath ios/build EXCLUDED_ARCHS=arm64
But my project gets this error:
Detox[53454] INFO: [test.js] DETOX_CONFIGURATION="ios.sim.debug" DETOX_LOGLEVEL="verbose" DETOX_REPORT_SPECS=true DETOX_START_TIMESTAMP=1658788416758 DETOX_USE_CUSTOM_LOGGER=true jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' e2e
detox[53455] DEBUG: [WSS_CREATE] Detox server listening on localhost:64782...
detox[53455] DEBUG: [WSS_CONNECTION, #64783] registered a new connection.
detox[53455] DEBUG: [EXEC_CMD, #0] applesimutils --list --byType "iPhone 12"
detox[53455] DEBUG: [EXEC_CMD, #1] applesimutils --list --byId F947CB36-9A5E-4D82-84FF-26DCED392070 --maxResults 1
detox[53455] DEBUG: [EXEC_CMD, #2] /usr/bin/xcrun simctl terminate F947CB36-9A5E-4D82-84FF-26DCED392070 com.pocketgeek.ios
detox[53455] DEBUG: [EXEC_TRY, #2] Terminating com.pocketgeek.ios...
detox[53455] DEBUG: [EXEC_TRY, #2] Terminating com.pocketgeek.ios...
detox[53455] ERROR: [EXEC_FAIL, #2] "/usr/bin/xcrun simctl terminate F947CB36-9A5E-4D82-84FF-26DCED392070 com.pocketgeek.ios" failed with error = ChildProcessError: Command failed: /usr/bin/xcrun simctl terminate F947CB36-9A5E-4D82-84FF-26DCED392070 com.pocketgeek.ios
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Application termination failed.
FBSSystemService reported failure without an error, possibly because the app is not currently running.
`/usr/bin/xcrun simctl terminate F947CB36-9A5E-4D82-84FF-26DCED392070 com.pocketgeek.ios` (exited with error code 3) (code=3), stdout and stderr:
detox[53455] ERROR: [EXEC_FAIL, #2]
detox[53455] ERROR: [EXEC_FAIL, #2] An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Application termination failed.
FBSSystemService reported failure without an error, possibly because the app is not currently running.
detox[53455] ERROR: Command failed: /usr/bin/xcrun simctl terminate F947CB36-9A5E-4D82-84FF-26DCED392070 com.pocketgeek.ios
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Application termination failed.
FBSSystemService reported failure without an error, possibly because the app is not currently running.
`/usr/bin/xcrun simctl terminate F947CB36-9A5E-4D82-84FF-26DCED392070 com.pocketgeek.ios` (exited with error code 3)
detox[53455] INFO: Example is assigned to undefined
detox[53455] INFO: Example: should have welcome screen
detox[53455] INFO: Example: should have welcome screen [SKIPPED]
detox[53455] INFO: Example: should show hello screen after tap
detox[53455] INFO: Example: should show hello screen after tap [SKIPPED]
detox[53455] INFO: Example: should show world screen after tap
detox[53455] INFO: Example: should show world screen after tap [SKIPPED]
detox[53455] DEBUG: [WSS_CLOSE] Detox server has been closed gracefully
detox[53454] ERROR: [cli.js] Command failed: jest --config e2e/config.json --testNamePattern '^((?!:android:).)*$' e2e
This is my detoxrc.json file in case someone wants to see my current configuration for Detox
{
"testRunner": "jest",
"runnerConfig": "e2e/config.json",
"skipLegacyWorkersInjection": true,
"apps": {
"ios.release": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/PocketGeek.app",
"build": "xcodebuild -workspace ios/PocketGeek.xcworkspace -configuration Release -scheme PocketGeek -sdk iphonesimulator -derivedDataPath ios/build EXCLUDED_ARCHS=arm64"
},
"ios.debug": {
"type": "ios.app",
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/PocketGeek.app",
"build": "xcodebuild -workspace ios/PocketGeek.xcworkspace -configuration Debug -scheme PocketGeek -sdk iphonesimulator -derivedDataPath ios/build EXCLUDED_ARCHS=arm64"
},
"android": {
"type": "android.apk",
"binaryPath": "SPECIFY_PATH_TO_YOUR_APP_BINARY"
}
},
"devices": {
"simulator": {
"type": "ios.simulator",
"device": {
"type": "iPhone 12"
}
},
"emulator": {
"type": "android.emulator",
"device": {
"avdName": "Pixel_3a_API_30_x86"
}
}
},
"configurations": {
"ios.sim.release": {
"device": "simulator",
"app": "ios.release"
},
"ios.sim.debug": {
"device": "simulator",
"app": "ios.debug"
},
"android": {
"device": "emulator",
"app": "android"
}
}
}
We are trying to run detox test and make the simulator to work but it seems nothing seems to work. Any advice if someone has faced this issue?
Thanks