Error saving LOGs and Images - detox [12591] ERROR: [exec.js / EXEC_FAIL, # 6]

1

I'm studying lib detox for automated testing. I can run the tests normally and they pass, but when I add the command --record-logs all it returns me this error. From what I understand is some file that is not being created by my simulator or detox. Anyone have any ideas how to resolve this?

Belowismypackage.js:

{"name": "detox_testes",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "detox-build": "detox build -c ios.sim.debug",
    "detox-test": "detox test -c ios.sim.debug  --record-logs all --loglevel",
    "start-ios": "react-native run-ios --simulator=\"iPhone 7\""
  },
  "dependencies": {
    "detox": "8.1.1",
    "mocha": "5.2.0",
    "react": "16.3.0",
    "react-native": "0.54.0"
  },
  "devDependencies": {
    "babel-jest": "23.6.0",
    "babel-preset-react-native": "4.0.1",
    "jest": "^20.0.4",
    "react-test-renderer": "^16.3.0-alpha.1"
  },
  "jest": {
    "preset": "react-native"
  },
  "detox": {
    "specs": "test/e2e",
    "runner-config": "test/e2e/mocha.opts",
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/detox_testes.app",
        "build": "xcodebuild -project ios/detox_testes.xcodeproj -scheme detox_testes -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
        "type": "ios.simulator",
        "name": "iPhone 7"
      }
    }
  }
}

The complete error:

$ sudo yarn detox-test
Password:
yarn run v1.7.0
$ detox test -c ios.sim.debug  --record-logs all --loglevel
node_modules/.bin/mocha test/e2e --opts test/e2e/mocha.opts --configuration ios.sim.debug --loglevel true     --grep :android: --invert  --record-logs all   --artifacts-location "artifacts/ios.sim.debug.2018-09-12 14-18-15Z" 


detox[12591] INFO:  [DetoxServer.js] server listening on localhost:58516...
detox[12591] ERROR: [exec.js/EXEC_FAIL, #6] "/bin/cat /dev/null >/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out 2>/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/gabriel/Library/Detox/ios/14eec5feca24934359dbce9f5e57b609bcc7c136/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err FBCD6D3B-B451-49F1-965B-C857164CCBE8 org.reactjs.native.example.detox-testes --args -detoxServer ws://localhost:58516 -detoxSessionId 9c8e940d-eb98-302a-4610-717ecb0551ed" failed with code = 1, stdout and stderr:

detox[12591] ERROR: [exec.js/EXEC_FAIL, #6] 
detox[12591] ERROR: [exec.js/EXEC_FAIL, #6] /bin/sh: /Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out: No such file or directory

detox[12591] ERROR: [index.js/DETOX_INIT_ERROR] 
 { ChildProcessError: Command failed: /bin/cat /dev/null >/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out 2>/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/gabriel/Library/Detox/ios/14eec5feca24934359dbce9f5e57b609bcc7c136/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err FBCD6D3B-B451-49F1-965B-C857164CCBE8 org.reactjs.native.example.detox-testes --args -detoxServer ws://localhost:58516 -detoxSessionId 9c8e940d-eb98-302a-4610-717ecb0551ed
/bin/sh: /Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out: No such file or directory
 '/bin/cat /dev/null >/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out 2>/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/gabriel/Library/Detox/ios/14eec5feca24934359dbce9f5e57b609bcc7c136/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err FBCD6D3B-B451-49F1-965B-C857164CCBE8 org.reactjs.native.example.detox-testes --args -detoxServer ws://localhost:58516 -detoxSessionId 9c8e940d-eb98-302a-4610-717ecb0551ed' (exited with error code 1)
    at callback (/Users/gabriel/Desktop/programming/testes/detox_testes/node_modules/child-process-promise/lib/index.js:33:27)
    at ChildProcess.exithandler (child_process.js:282:5)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:557:12)
  name: 'ChildProcessError',
  code: 1,
  childProcess: 
   { ChildProcess: { [Function: ChildProcess] super_: [Object] },
     fork: [Function],
     _forkChild: [Function],
     exec: [Function],
     execFile: [Function],
     spawn: [Function],
     spawnSync: [Function: spawnSync],
     execFileSync: [Function: execFileSync],
     execSync: [Function: execSync] },
  stdout: '',
  stderr: '/bin/sh: /Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out: No such file or directory\n' }
  1) "before all" hook

  0 passing (4s)
  1 failing

  1) "before all" hook:
     ChildProcessError: Command failed: /bin/cat /dev/null >/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out 2>/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/gabriel/Library/Detox/ios/14eec5feca24934359dbce9f5e57b609bcc7c136/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err FBCD6D3B-B451-49F1-965B-C857164CCBE8 org.reactjs.native.example.detox-testes --args -detoxServer ws://localhost:58516 -detoxSessionId 9c8e940d-eb98-302a-4610-717ecb0551ed
/bin/sh: /Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out: No such file or directory
 '/bin/cat /dev/null >/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.out 2>/Users/gabriel/Library/Developer/CoreSimulator/Devices/FBCD6D3B-B451-49F1-965B-C857164CCBE8/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/gabriel/Library/Detox/ios/14eec5feca24934359dbce9f5e57b609bcc7c136/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err FBCD6D3B-B451-49F1-965B-C857164CCBE8 org.reactjs.native.example.detox-testes --args -detoxServer ws://localhost:58516 -detoxSessionId 9c8e940d-eb98-302a-4610-717ecb0551ed' (exited with error code 1)
      at callback (node_modules/child-process-promise/lib/index.js:33:27)
      at ChildProcess.exithandler (child_process.js:282:5)
      at maybeClose (internal/child_process.js:925:16)
      at Socket.stream.socket.on (internal/child_process.js:346:11)
      at Pipe._handle.close [as _onclose] (net.js:557:12)



child_process.js:644
    throw err;
    ^

Error: Command failed: node_modules/.bin/mocha test/e2e --opts test/e2e/mocha.opts --configuration ios.sim.debug --loglevel true     --grep :android: --invert  --record-logs all   --artifacts-location "artifacts/ios.sim.debug.2018-09-12 14-18-15Z" 
    at checkExecSyncError (child_process.js:601:13)
    at Object.execSync (child_process.js:641:13)
    at runMocha (/Users/gabriel/Desktop/programming/testes/detox_testes/node_modules/detox/local-cli/detox-test.js:129:6)
    at run (/Users/gabriel/Desktop/programming/testes/detox_testes/node_modules/detox/local-cli/detox-test.js:82:7)
    at Object.<anonymous> (/Users/gabriel/Desktop/programming/testes/detox_testes/node_modules/detox/local-cli/detox-test.js:217:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    
asked by anonymous 12.09.2018 / 17:45

0 answers