尝试从排毒7.3.4升级到8.1.1

它似乎是从苹果电视而不是我提供的电话加载的,即使提供了--configuration
package.json:

  "detox": {
    "configurations": {
      "ios.sim.debug": {
        "binaryPath": "member/ios/build/Build/Products/Debug-iphonesimulator/MyApp.app",
        "build": "xcodebuild -workspace member/ios/MyApp.xcworkspace -scheme MyApp -configuration Debug  -sdk iphonesimulator -derivedDataPath member/ios/build",
        "type": "ios.simulator",
        "name": "iPhone 8"
      }
    }
  },

etai $ npm run detox
[email protected]排毒/用户/ etai /代码/数据/手机
NODE_PATH =。排毒测试---artifacts-location ='e2e / screenshots'--record-logs全部

node_modules / .bin / mocha e2e --opts e2e / mocha.opts --configuration ios.sim.debug --grep:android:--invert --record-logs所有--artifacts-location“e2e / screenshots / ios。 sim.debug.2018-07-30 12-55-09Z“

排毒信息:[DetoxServer.js]服务器在本地主机上监听:49455 ...

排毒错误:[exec.js / EXEC_FAIL,#6]“/ usr / bin / xcrun simctl io 368E25FE-3641-48F6-A47C-EA403E68EB85屏幕截图“/ dev / null””失败,代码= 2,stdout和stderr:

排毒错误:[exec.js / EXEC_FAIL,#6]

排毒错误:[exec.js / EXEC_FAIL,#6]处理命令时遇到错误(domain = SimulatorKit.SimDisplayScreenshotWriter.ScreenshotError,代码= 2):

创建图像时出错

排毒错误:[exec.js / EXEC_FAIL,#10]“/ bin / cat / dev / null

/Users/etai/Library/Developer/CoreSimulator/Devices/368E25FE-3641-48F6-A47C-EA403E68EB85/data/tmp/detox.last_launch_app_log.out 2> / Users / etai / Library / Library / Developer / CoreSimulator / Devices / 368E25FE-3641 -48F6-A47C-EA403E68EB85 / data / tmp / detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES =“/ Users / etai / Library / Detox / ios / d01d632fc9620831ab762e463575a0528084a3work / Detox-bind。 = / tmp / detox.last_launch_app_log.out --stderr = / tmp / detox.last_launch_app_log.err 368E25FE-3641-48F6-A47C-EA403E68EB85 com.myapp.MyAppDebug --args -detoxServer ws:// localhost:49455 -detoxSessionId 7a268 -8ece-f34d-a5d3-13ed361a4b57“失败,代码= 1,stdout和stderr:

排毒错误:[exec.js / EXEC_FAIL,#10] com.myapp.MyAppDebug:-1

排毒错误:[exec.js / EXEC_FAIL,#10]处理命令时遇到错误(域= FBSOpenApplicationServiceErrorDomain,代码= 1):
打开“com.myapp.MyAppDebug”的请求失败。
该请求被服务委托(PBProcessManager)拒绝,其原因如下:安全性(“PBD”拒绝打开应用程序的请求的原因:安全性(应用程序'com.myapp.MyAppDebug'在Internet上使用不安全;“)。
底层错误(domain = FBSOpenApplicationErrorDomain,代码= 3):
该操作无法完成。 [PBD]由于以下原因拒绝打开应用程序的请求:安全性(应用程序'com.myapp.MyAppDebug'在Internet上使用不安全;)
[PBD]由于以下原因拒绝打开应用程序的请求:安全性(应用程序'com.myapp.MyAppDebug'在Internet上使用不安全;)
  • 我尝试过的事情:
  • 重新启动计算机(v10.13.6)/ xcode(v9.4.1)/等等。
  • 使用不同的签名证书
  • 使用不同的模拟器
  • --configuration标志

  • 使用--loglevel trace的完整日志
    detox INFO:  [DetoxServer.js] server listening on localhost:49586...
    detox DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:49586
    detox TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"login","params":{"sessionId":"67bd086e-af49-fd61-1de8-242636d659fe","role":"tester"},"messageId":0}
    detox DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=67bd086e-af49-fd61-1de8-242636d659fe
    detox DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=67bd086e-af49-fd61-1de8-242636d659fe
    detox TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"loginSuccess","params":{"sessionId":"67bd086e-af49-fd61-1de8-242636d659fe","role":"tester"},"messageId":0}
    
    detox DEBUG: [exec.js/EXEC_CMD, #0] /usr/bin/xcrun simctl list -j
    detox TRACE: [exec.js/EXEC_SUCCESS, #0] {
      "devicetypes" : [...,
      {
        "state" : "Shutdown",
        "availability" : "(available)",
        "name" : "iPhone 8",
        "udid" : "87D92BC6-686E-4EB3-9F09-E8865A0BE0ED"
      }, ...],
      "runtimes" : [...,     {
      "buildversion" : "15F79",
      "availability" : "(available)",
      "name" : "iOS 11.4",
      "identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-11-4",
      "version" : "11.4"
    }, ...],
    detox DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byType "iPhone 8" --byOS "11.4"
    detox DEBUG: [exec.js/EXEC_TRY, #1] Searching for device matching iPhone 8...
    detox TRACE: [exec.js/EXEC_SUCCESS, #1] [...]
        detox TRACE: [exec.js/EXEC_SUCCESS, #2] Unknown command line option --byId, try --help!
    
    detox DEBUG: [exec.js/EXEC_CMD, #3] xcodebuild -version
    detox TRACE: [exec.js/EXEC_SUCCESS, #3] Xcode 9.4.1
    Build version 9F2000
    
    detox DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl boot 368E25FE-3641-48F6-A47C-EA403E68EB85
    detox DEBUG: [exec.js/EXEC_TRY, #4] Booting device 368E25FE-3641-48F6-A47C-EA403E68EB85
    detox TRACE: [exec.js/EXEC_SUCCESS, #4]
    detox DEBUG: [exec.js/EXEC_CMD, #5] /usr/bin/xcrun simctl bootstatus 368E25FE-3641-48F6-A47C-EA403E68EB85
    detox TRACE: [exec.js/EXEC_SUCCESS, #5] Monitoring boot status for Apple TV (368E25FE-3641-48F6-A47C-EA403E68EB85).
    [2018-07-30 13:14:38 +0000] Status=3, isTerminal=YES, Elapsed=00:02.
        Data Migration Failed
    
    
    detox DEBUG: [exec.js/EXEC_CMD, #6] /usr/bin/xcrun simctl io 368E25FE-3641-48F6-A47C-EA403E68EB85 screenshot "/dev/null"
    detox ERROR: [exec.js/EXEC_FAIL, #6] "/usr/bin/xcrun simctl io 368E25FE-3641-48F6-A47C-EA403E68EB85 screenshot "/dev/null"" failed with code = 2, stdout and stderr:
    
    detox ERROR: [exec.js/EXEC_FAIL, #6]
    detox ERROR: [exec.js/EXEC_FAIL, #6] An error was encountered processing the command (domain=SimulatorKit.SimDisplayScreenshotWriter.ScreenshotError, code=2):
    Error creating the image
    
    detox DEBUG: [exec.js/EXEC_CMD, #7] /usr/bin/xcrun simctl uninstall 368E25FE-3641-48F6-A47C-EA403E68EB85 com.myapp.MyAppDebug
    detox DEBUG: [exec.js/EXEC_TRY, #7] Uninstalling com.myapp.MyAppDebug...
    detox TRACE: [exec.js/EXEC_SUCCESS, #7]
    detox DEBUG: [exec.js/EXEC_SUCCESS, #7] com.myapp.MyAppDebug uninstalled
    detox DEBUG: [exec.js/EXEC_CMD, #8] /usr/bin/xcrun simctl install 368E25FE-3641-48F6-A47C-EA403E68EB85 "/Users/etai/Code/data/mobile/member/ios/build/Build/Products/Debug-iphonesimulator/ApparMember.app"
    detox DEBUG: [exec.js/EXEC_TRY, #8] Installing /Users/etai/Code/data/mobile/member/ios/build/Build/Products/Debug-iphonesimulator/ApparMember.app...
    detox TRACE: [exec.js/EXEC_SUCCESS, #8]
    detox DEBUG: [exec.js/EXEC_SUCCESS, #8] /Users/etai/Code/data/mobile/member/ios/build/Build/Products/Debug-iphonesimulator/ApparMember.app installed
    detox DEBUG: [exec.js/EXEC_CMD, #9] /usr/bin/xcrun simctl terminate 368E25FE-3641-48F6-A47C-EA403E68EB85 com.myapp.MyAppDebug
    detox DEBUG: [exec.js/EXEC_TRY, #9] Terminating com.myapp.MyAppDebug...
    detox TRACE: [exec.js/EXEC_SUCCESS, #9]
    detox DEBUG: [exec.js/EXEC_SUCCESS, #9] com.myapp.MyAppDebug terminated
    detox TRACE: [ArtifactsManager.js/LIFECYCLE] onBeforeLaunchApp { deviceId: '368E25FE-3641-48F6-A47C-EA403E68EB85',
      bundleId: 'com.myapp.MyAppDebug' }
    detox DEBUG: [exec.js/EXEC_CMD, #10] /bin/cat /dev/null >/Users/etai/Library/Developer/CoreSimulator/Devices/368E25FE-3641-48F6-A47C-EA403E68EB85/data/tmp/detox.last_launch_app_log.out 2>/Users/etai/Library/Developer/CoreSimulator/Devices/368E25FE-3641-48F6-A47C-EA403E68EB85/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/etai/Library/Detox/ios/d01d632fc9620831ab762e463575a0528084a3af/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err 368E25FE-3641-48F6-A47C-EA403E68EB85 com.myapp.MyAppDebug --args -detoxServer ws://localhost:49586 -detoxSessionId 67bd086e-af49-fd61-1de8-242636d659fe
    detox DEBUG: [exec.js/EXEC_TRY, #10] Launching com.myapp.MyAppDebug...
    detox ERROR: [exec.js/EXEC_FAIL, #10] "/bin/cat /dev/null >/Users/etai/Library/Developer/CoreSimulator/Devices/368E25FE-3641-48F6-A47C-EA403E68EB85/data/tmp/detox.last_launch_app_log.out 2>/Users/etai/Library/Developer/CoreSimulator/Devices/368E25FE-3641-48F6-A47C-EA403E68EB85/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/etai/Library/Detox/ios/d01d632fc9620831ab762e463575a0528084a3af/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err 368E25FE-3641-48F6-A47C-EA403E68EB85 com.myapp.MyAppDebug --args -detoxServer ws://localhost:49586 -detoxSessionId 67bd086e-af49-fd61-1de8-242636d659fe" failed with code = 1, stdout and stderr:
    
    detox ERROR: [exec.js/EXEC_FAIL, #10] com.myapp.MyAppDebug: -1
    
    detox ERROR: [exec.js/EXEC_FAIL, #10] An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
    The request to open "com.myapp.MyAppDebug" failed.
    The request was denied by service delegate (PBProcessManager) for reason: Security ("PBD] Denying open-application request for reason: Security (App 'com.myapp.MyAppDebug' looks unsafe for use on the internet; <PBApplicationInfo: 0x7fc86e00b1b0; com.myapp.MyAppDebug (App-Debug); sdk: 11.4>").
    Underlying error (domain=FBSOpenApplicationErrorDomain, code=3):
        The operation couldn’t be completed. [PBD] Denying open-application request for reason: Security (App 'com.myapp.MyAppDebug' looks unsafe for use on the internet; <PBApplicationInfo: 0x7fc86e00b1b0; com.myapp.MyAppDebug (App-Debug); sdk: 11.4>)
        [PBD] Denying open-application request for reason: Security (App 'com.myapp.MyAppDebug' looks unsafe for use on the internet; <PBApplicationInfo: 0x7fc86e00b1b0; com.myapp.MyAppDebug (App-Debug); sdk: 11.4>)
    
    detox TRACE: [ArtifactsManager.js/LIFECYCLE] onAfterAll
    detox DEBUG: [DetoxServer.js/DISCONNECT] role=tester, sessionId=67bd086e-af49-fd61-1de8-242636d659fe
    

    最佳答案

    这似乎与https://github.com/wix/detox/issues/853#issuecomment-407375505有关。

    在7.3.3中,名称字段对应于AppleSimUtils --byName标志,现在它仅对应于嵌套的deviceType.name字段,它实际上是deviceType,而不是名称。

    07-25 21:28