Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65

Hi Guys,
I am getting this log in appium when i am trying to start the session on a real device, Can anyone help me dealing with this please???

Xcode : 8.2.1
Appium : 1.6.4

[Appium] Welcome to Appium v1.6.4-beta
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/kalyanmadamanchi/Desktop/Safety1stBabyMonitor.app",“automationName”:“XCUITest”,“bundleId”:“com.xxxx.xxxx”,“deviceName”:“iPadmini”,“fullReset”:true,“platformName”:“iOS”,“platformVersion”:“10.2”,“showIOSLog”:false,“udid”:“UDID”,“newCommandTimeout”:0}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/kalyanmadamanchi/Desktop/xxxx.app",“automationName”:“XCUITest”,“bundleId”:“com.xxxx.xxxx”,“deviceName”:“iPadmini”,“fullReset”:true,“platformName”:“iOS”,“platformVersion”:“10.2”,“showIOSLog”:false,“udid”:“UDID”,“newCommandTimeout”:0},null,null,null,null]
[Appium] Creating new XCUITestDriver (v2.12.1) session
[Appium] Capabilities:
[Appium] app: ‘/Users/kalyanmadamanchi/Desktop/xxxx.app’
[Appium] automationName: ‘XCUITest’
[Appium] bundleId: ‘com.xxxx.xxxx’
[Appium] deviceName: ‘iPadmini’
[Appium] fullReset: true
[Appium] platformName: ‘iOS’
[Appium] platformVersion: ‘10.2’
[Appium] showIOSLog: false
[Appium] udid: ‘UDID’
[Appium] newCommandTimeout: 0
[XCUITest] XCUITestDriver version: 2.12.1
[BaseDriver] Session created with session id: a1ba6a5f-b9dd-4d10-b6f1-18a280481efb
[XCUITest] Xcode version set to ‘8.2.1’
[XCUITest] iOS SDK Version set to ‘10.2’
[XCUITest] Available devices: UDID
[XCUITest] Creating iDevice object with udid ‘UDID’
[XCUITest] Determining device to run tests on: udid: ‘UDID’, real device: true
[BaseDriver] Using local app ‘/Users/kalyanmadamanchi/Desktop/xxxx.app’
[XCUITest] Checking whether app ‘/Users/kalyanmadamanchi/Desktop/xxxx.app’ is actually present on file system
[XCUITest] App is present
[XCUITest] Reset: running ios real device reset flow
[XCUITest] Reset: fullReset requested. Will try to uninstall the app ‘com.xxxx.xxxx’.
[XCUITest] Reset: removed ‘com.xxxx.xxxx’
[iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[XCUITest] Setting up real device
[XCUITest] Installing ‘/Users/kalyanmadamanchi/Desktop/xxxx.app’ on device with UUID ‘UDID’…
[XCUITest] The app has been installed successfully.
[XCUITest] Using WDA path: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Killing hanging processes
[XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=e8bc0adc02faa6656d7e4965f92fdd6180ce7fbe -configuration Debug’ in directory ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[XCUITest] Log file for xcodebuild test: /Users/kalyanmadamanchi/Library/Developer/Xcode/DerivedData/WebDriverAgent-cvqckynzuuktkogfpkkkgyompmoj/Logs/Test/12487250-A874-49DA-8934-60B33CFD18E9/Session-WebDriverAgentRunner-2017-03-10_173121-Y8eLhc.log
[Xcode] 2017-03-10 17:31:21.811 xcodebuild[18949:426068] Error Domain=NSCocoaErrorDomain Code=260 “The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/Users/kalyanmadamanchi/Library/Developer/Xcode/DerivedData/WebDriverAgent-cvqckynzuuktkogfpkkkgyompmoj/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f9e5a79a7e0 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
[Xcode] 2017-03-10 17:31:21.811 xcodebuild[18949:426068] Error Domain=IDETestOperationsObserverErrorDomain Code=5 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 18947)
[XCUITest] iproxy exited with code ‘null’
[XCUITest] Removing WDA application from device
[XCUITest] Using WDA path: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Killing hanging processes
[XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=e8bc0adc02faa6656d7e4965f92fdd6180ce7fbe -configuration Debug’ in directory ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[XCUITest] Log file for xcodebuild test: /Users/kalyanmadamanchi/Library/Developer/Xcode/DerivedData/WebDriverAgent-cvqckynzuuktkogfpkkkgyompmoj/Logs/Test/67B98063-F7ED-49B6-914B-5D1752487FE3/Session-WebDriverAgentRunner-2017-03-10_173138-spYw1s.log
[Xcode] 2017-03-10 17:31:38.819 xcodebuild[18981:426291] Error Domain=NSCocoaErrorDomain Code=260 “The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/Users/kalyanmadamanchi/Library/Developer/Xcode/DerivedData/WebDriverAgent-cvqckynzuuktkogfpkkkgyompmoj/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7faf9bbf6f40 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
[Xcode] 2017-03-10 17:31:38.819 xcodebuild[18981:426291] Error Domain=IDETestOperationsObserverErrorDomain Code=5 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 18979)
[XCUITest] iproxy exited with code ‘null’
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:337:15)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:337:15)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:337:15)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 43662 ms - 230

@kallichow this is common issue majority of users face while setting up Appium for iOS automation

  1. Go through setup documentation carefully again ( I know it’s long but it’s only one time effort :slight_smile: )
  2. search in appium issues for “Code 65” in case you still face the problem; post re-setup

Hi,
When im trying to install .app in simulator receiving “[info] [XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’” Can you please guide me how to resolve this issue.

Mac OS : 10.13.1
Xcode: 9.1
Appium: 1.7.1

[info] [Appium] Welcome to Appium v1.7.1
[info] [Appium] Non-default server args:
[info] [Appium] port: 4725
[info] [Appium] Appium REST http interface listener started on 0.0.0.0:4725[info] [HTTP] --> GET /wd/hub/sessions {}
[debug] [MJSONWP] Calling AppiumDriver.getSessions() with args: []
[debug] [MJSONWP] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 7 ms - 40 [info] [HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/qaadmin/Documents/app/SeekingArrangementApp.app",“automationName”:“XCUITest”,“deviceName”:“iPhone 8 Plus”,“noReset”:false,“platformName”:“iOS”,“platformVersion”:“11.1”,“showXcodeLog”:true,“udid”:“6303E4FE-6320-4472-8F7F-E8F15C371359”,“useNewWDA”:true,“usePrebuiltWDA”:true,“xcodeOrgId”:“W8 Tech Limited”,“xcodeSigningId”:“iPhone Developer”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/qaadmin/Documents/app/SeekingArrangementApp.app",“automationName”:“XCUITest”,“deviceName”:“iPhone 8 Plus”,“noReset”:false,“platformName”:“iOS”,“platformVersion”:“11.1”,“showXcodeLog”:true,“udid”:“6303E4FE-6320-4472-8F7F-E8F15C371359”,“useNewWDA”:true,“usePrebuiltWDA”:true,“xcodeOrgId”:“W8 Tech Limited”,“xcodeSigningId”:“iPhone Developer”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1511403803304 (10:23:23 GMT+0800 (+08))
[info] [Appium] Creating new XCUITestDriver (v2.51.1) session
[info] [Appium] Capabilities:
[info] [Appium] app: ‘/Users/qaadmin/Documents/app/SeekingArrangementApp.app’
[info] [Appium] automationName: ‘XCUITest’
[info] [Appium] deviceName: ‘iPhone 8 Plus’
[info] [Appium] noReset: false
[info] [Appium] platformName: ‘iOS’
[info] [Appium] platformVersion: ‘11.1’
[info] [Appium] showXcodeLog: true
[info] [Appium] udid: ‘6303E4FE-6320-4472-8F7F-E8F15C371359’
[info] [Appium] useNewWDA: true
[info] [Appium] usePrebuiltWDA: true
[info] [Appium] xcodeOrgId: ‘W8 Tech Limited’
[info] [Appium] xcodeSigningId: ‘iPhone Developer’
[info] [Appium] newCommandTimeout: 0
[info] [Appium] connectHardwareKeyboard: true
[info] [BaseDriver] Session created with session id: 271462ee-801c-433c-9430-43c9e9947b20[debug] [XCUITest] Xcode version set to ‘9.1’
[debug] [XCUITest] iOS SDK Version set to ‘11.1’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1511403805016 (10:23:25 GMT+0800 (+08))[info] [iOSSim] Constructing iOS simulator for Xcode version 9.1 with udid ‘6303E4FE-6320-4472-8F7F-E8F15C371359’
[info] [XCUITest] Determining device to run tests on: udid: ‘6303E4FE-6320-4472-8F7F-E8F15C371359’, real device: false
[info] [BaseDriver] Using local app ‘/Users/qaadmin/Documents/app/SeekingArrangementApp.app’
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1511403806486 (10:23:26 GMT+0800 (+08))
[debug] [XCUITest] Checking whether app ‘/Users/qaadmin/Documents/app/SeekingArrangementApp.app’ is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app ‘/Users/qaadmin/Documents/app/SeekingArrangementApp.app’: ‘com.use2pay.arrangement’
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1511403806488 (10:23:26 GMT+0800 (+08))
[info] [XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1511403806619 (10:23:26 GMT+0800 (+08))[debug] [iOSLog] Starting iOS 11.1 simulator log capture
[debug] [iOSLog] System log path: /Users/qaadmin/Library/Logs/CoreSimulator/6303E4FE-6320-4472-8F7F-E8F15C371359/system.log
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1511403806856 (10:23:26 GMT+0800 (+08))
[info] [XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set[debug] [iOSSim] Setting common Simulator preferences to {“ConnectHardwareKeyboard”:true}
[debug] [iOSSim] Updated shared Simulator preferences at ‘/Users/qaadmin/Library/Preferences/com.apple.iphonesimulator.plist’ with {“ConnectHardwareKeyboard”:true}[debug] [iOSSim] The count of running Simulator UI client instances is 0
[info] [iOSSim] Booting Simulator with UDID 6303E4FE-6320-4472-8F7F-E8F15C371359…[info] [iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 6303E4FE-6320-4472-8F7F-E8F15C371359 -ConnectHardwareKeyboard 1[debug] [iOSSim] The count of running Simulator UI client instances is 1[info] [iOSSim] Simulator with UDID 6303E4FE-6320-4472-8F7F-E8F15C371359 booted in 72 seconds
[debug] [BaseDriver] Event ‘simStarted’ logged at 1511403879137 (10:24:39 GMT+0800 (+08))[debug] [XCUITest] Reset requested. Removing app with id ‘com.use2pay.arrangement’ from the device[debug] [XCUITest] Reset requested. Removing app with id ‘com.use2pay.arrangement’ from the device[debug] [XCUITest] Installing ‘/Users/qaadmin/Documents/app/SeekingArrangementApp.app’ on Simulator with UUID ‘6303E4FE-6320-4472-8F7F-E8F15C371359’…[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event ‘appInstalled’ logged at 1511403925215 (10:25:25 GMT+0800 (+08))
[info] [XCUITest] Using WDA path: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[info] [XCUITest] Using WDA agent: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[debug] [XCUITest] Capability ‘useNewWDA’ set to true, so uninstalling WDA before proceeding
[info] [XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device[debug] [BaseDriver] Event ‘wdaUninstalled’ logged at 1511403927346 (10:25:27 GMT+0800 (+08))
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1511403927348 (10:25:27 GMT+0800 (+08))
[info] [XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing running processes ‘xcodebuild.*6303E4FE-6320-4472-8F7F-E8F15C371359, iproxy 8100, 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner’ for the device 6303E4FE-6320-4472-8F7F-E8F15C371359…[debug] [XCUITest] ‘pgrep -nif xcodebuild.*6303E4FE-6320-4472-8F7F-E8F15C371359’ didn’t detect any matching processes. Return code: 1
[debug] [XCUITest] ‘pgrep -nif iproxy 8100’ didn’t detect any matching processes. Return code: 1
[debug] [XCUITest] ‘pgrep -nif 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner’ didn’t detect any matching processes. Return code: 1
[debug] [XCUITest] Using Xcode 9.1, so fixing WDA codebase[debug] [XCUITest] Beginning test with command ‘xcodebuild test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=6303E4FE-6320-4472-8F7F-E8F15C371359 IPHONEOS_DEPLOYMENT_TARGET=11.1’ in directory ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will be logged. To see xcode logging, use ‘showXcodeLog’ desired capability[info] [Xcode] Build settings from command line:
[info] [Xcode]
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [XCUITest] Log file for xcodebuild test: /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-44E4F8F5-4D0D-40D8-8B1F-76F2250ED31B/WebDriverAgentRunner-0534C2FD-7214-4EBB-8E3A-FB378B771784/Session-WebDriverAgentRunner-2017-11-23_102557-Np7S7a.log
[info] [Xcode] 2017-11-23 10:25:57.690 xcodebuild[56872:907304] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[info] [Xcode] /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-44E4F8F5-4D0D-40D8-8B1F-76F2250ED31B/WebDriverAgentRunner-0534C2FD-7214-4EBB-8E3A-FB378B771784/Session-WebDriverAgentRunner-2017-11-23_102557-Np7S7a.log
[info] [Xcode]
[info] [Xcode] 2017-11-23 10:25:57.690 xcodebuild[56872:906758] [MT] IDETestOperationsObserverDebug: (3B1EDF2E-753B-48E4-98A0-6118E6D23316) Beginning test session WebDriverAgentRunner-3B1EDF2E-753B-48E4-98A0-6118E6D23316 at 2017-11-23 10:25:57.691 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7fe9f4242b60> {
[info] [Xcode] SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode]
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[info] [Xcode] 2017-11-23 10:25:58.025 xcodebuild[56872:906758] Error Domain=IDEFoundationErrorDomain Code=1 “Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app” UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
[info] [Xcode] 2017-11-23 10:25:58.025 xcodebuild[56872:906758] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[info] [Xcode]
[info] [Xcode] 2017-11-23 10:25:58.026 xcodebuild[56872:909617] Connection peer refused channel request for “dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface”; channel canceled <DTXChannel: 0x7fe9f40c8880>
[info] [Xcode]
[info] [Xcode] ** TEST EXECUTE FAILED **
[info] [Xcode]
[info] [Xcode]
[info] [XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[info] [Xcode] Contents of xcodebuild log file ‘/var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-44E4F8F5-4D0D-40D8-8B1F-76F2250ED31B/WebDriverAgentRunner-0534C2FD-7214-4EBB-8E3A-FB378B771784/Session-WebDriverAgentRunner-2017-11-23_102557-Np7S7a.log’:
[info] [Xcode] 10:25:57.691 xcodebuild[56872:906758] Beginning test session WebDriverAgentRunner-3B1EDF2E-753B-48E4-98A0-6118E6D23316 at 2017-11-23 10:25:57.691 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7fe9f4242b60> {
[info] [Xcode] SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode] 10:25:57.691 xcodebuild[56872:906758] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
[info] [Xcode] test-without-building
[info] [Xcode] -project
[info] [Xcode] /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[info] [Xcode] -scheme
[info] [Xcode] WebDriverAgentRunner
[info] [Xcode] -destination
[info] [Xcode] id=6303E4FE-6320-4472-8F7F-E8F15C371359
[info] [Xcode] IPHONEOS_DEPLOYMENT_TARGET=11.1
[info] [Xcode] 10:25:57.691 xcodebuild[56872:906758] Launching with Xcode.IDEFoundation.Launcher.PosixSpawn
[info] [Xcode] 10:25:57.693 xcodebuild[56872:906758] Test standard output and standard error is at /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-44E4F8F5-4D0D-40D8-8B1F-76F2250ED31B/WebDriverAgentRunner-0534C2FD-7214-4EBB-8E3A-FB378B771784/StandardOutputAndStandardError.txt
[info] [Xcode] 10:25:57.694 xcodebuild[56872:906758] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by TestSessionClaim_IDETestRunSession-44E4F8F5-4D0D-40D8-8B1F-76F2250ED31B
[info] [Xcode] 10:25:57.733 xcodebuild[56872:906758] Launch session started.
[info] [Xcode] 10:25:57.743 xcodebuild[56872:906758] Setting up test runner session
[info] [Xcode] 10:25:57.744 xcodebuild[56872:909787] Sim iPhone 8: Unregistering for sim device notification with token 4
[info] [Xcode] 10:25:57.745 xcodebuild[56872:909787] Calling -[SimDevice getenv:error:] for TESTMANAGERD_SIM_SOCK
[info] [Xcode] 10:25:57.747 xcodebuild[56872:909780] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by LaunchSessionClaim_0x7fe9f40c7120
[info] [Xcode] 10:25:57.747 xcodebuild[56872:909787] Sim iPhone 8 has testmanagerd socket at /private/tmp/com.apple.launchd.BBaL3yeGuV/com.apple.testmanagerd.unix-domain.socket
[info] [Xcode] 10:25:57.747 xcodebuild[56872:909787] Validating test connection socket path (/private/tmp/com.apple.launchd.BBaL3yeGuV/com.apple.testmanagerd.unix-domain.socket)
[info] [Xcode] 10:25:57.747 xcodebuild[56872:909787] Constructing transport for test connection socket
[info] [Xcode] 10:25:57.747 xcodebuild[56872:909787] Connected socket 60 to testmanagerd for Sim iPhone 8
[info] [Xcode] 10:25:57.749 xcodebuild[56872:909780] Received connection for test runner session
[info] [Xcode] 10:25:57.749 xcodebuild[56872:909780] Listening for proxy connection request from the test bundle
[info] [Xcode] 10:25:57.750 xcodebuild[56872:906758] Adding console adaptor <IDEConsoleAdaptor: 0x7fe9f42e6be0 ‘target’ stdin: <IDEMasterPtyFileHandle: 0x7fe9f3fad780 MasterFH: <NSConcreteFileHandle: 0x7fe9f3fb4ce0> 49 SlaveFH: <NSConcreteFileHandle: 0x7fe9f3fb4a40> 59> 49 stdout: <IDEMasterPtyFileHandle: 0x7fe9f3fad780 MasterFH: <NSConcreteFileHandle: 0x7fe9f3fb4ce0> 49 SlaveFH: <NSConcreteFileHandle: 0x7fe9f3fb4a40> 59> 49 stderr: (null) 0> for test session 3B1EDF2E-753B-48E4-98A0-6118E6D23316.
[info] [Xcode] 10:25:57.750 xcodebuild[56872:909789] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by LaunchSessionClaim_0x7fe9f40c7120
[info] [Xcode] 10:25:57.750 xcodebuild[56872:909780] Initiating session with identifier: 3B1EDF2E-753B-48E4-98A0-6118E6D23316
[info] [Xcode] 10:25:57.750 xcodebuild[56872:906758] Test runner session acquired connection.
[info] [Xcode] 10:25:57.750 xcodebuild[56872:909789] 6303E4FE-6320-4472-8F7F-E8F15C371359: Registered for sim device notification, got token 5
[info] [Xcode] 10:25:57.750 xcodebuild[56872:906758] Waiting for test process to launch.
[info] [Xcode] 10:25:57.750 xcodebuild[56872:909786] 6303E4FE-6320-4472-8F7F-E8F15C371359: Unregistering for sim device notification with token 5
[info] [Xcode] 10:25:57.751 xcodebuild[56872:906758] Claim LaunchSessionClaim_0x7fe9f40c7120 on simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was relinquished
[info] [Xcode] 10:25:57.751 xcodebuild[56872:906758] Claim LaunchSessionClaim_0x7fe9f40c7120 on simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was relinquished
[info] [Xcode] 10:25:57.752 xcodebuild[56872:906758] Test operation failure: Launch session expired before checking in.
[info] [Xcode] 10:25:57.752 xcodebuild[56872:906758] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=5 “Launch session expired before checking in.” UserInfo={NSLocalizedDescription=Launch session expired before checking in.}
[info] [Xcode]
[debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1511403958058 (10:25:58 GMT+0800 (+08))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: “xcodebuild failed with code 65”.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[info] [XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1511403969380 (10:26:09 GMT+0800 (+08))
[info] [XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing running processes ‘xcodebuild.*6303E4FE-6320-4472-8F7F-E8F15C371359, iproxy 8100, 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner’ for the device 6303E4FE-6320-4472-8F7F-E8F15C371359…[debug] [XCUITest] ‘pgrep -nif iproxy 8100’ didn’t detect any matching processes. Return code: 1
[debug] [XCUITest] ‘pgrep -nif 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner’ didn’t detect any matching processes. Return code: 1
[debug] [XCUITest] Using Xcode 9.1, so fixing WDA codebase
[debug] [XCUITest] Beginning test with command ‘xcodebuild test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=6303E4FE-6320-4472-8F7F-E8F15C371359 IPHONEOS_DEPLOYMENT_TARGET=11.1’ in directory ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will be logged. To see xcode logging, use ‘showXcodeLog’ desired capability[info] [Xcode] Build settings from command line:
[info] [Xcode]
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[info] [Xcode] IPHONEOS_DEPLOYMENT_TARGET = 11.1
[info] [Xcode]
[info] [Xcode] [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [XCUITest] Log file for xcodebuild test: /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-726DC4C3-62AD-46C5-AB25-360ABA197F8A/WebDriverAgentRunner-7C5C97BE-CE58-4E46-A147-07D298876CCC/Session-WebDriverAgentRunner-2017-11-23_102616-qXgXCx.log
[info] [Xcode] 2017-11-23 10:26:16.192 xcodebuild[56887:911540] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[info] [Xcode] /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-726DC4C3-62AD-46C5-AB25-360ABA197F8A/WebDriverAgentRunner-7C5C97BE-CE58-4E46-A147-07D298876CCC/Session-WebDriverAgentRunner-2017-11-23_102616-qXgXCx.log
[info] [Xcode]
[info] [Xcode] 2017-11-23 10:26:16.193 xcodebuild[56887:911105] [MT] IDETestOperationsObserverDebug: (EF3FE0D4-1E00-41D1-AB14-B95736096928) Beginning test session WebDriverAgentRunner-EF3FE0D4-1E00-41D1-AB14-B95736096928 at 2017-11-23 10:26:16.193 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7f9d5a074430> {
[info] [Xcode] SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode] [debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[info] [Xcode] 2017-11-23 10:26:16.516 xcodebuild[56887:911105] Error Domain=IDEFoundationErrorDomain Code=1 “Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app” UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
[info] [Xcode] 2017-11-23 10:26:16.516 xcodebuild[56887:911105] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[info] [Xcode]
[info] [Xcode] 2017-11-23 10:26:16.517 xcodebuild[56887:912122] Connection peer refused channel request for “dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface”; channel canceled <DTXChannel: 0x7f9d5a1e3110>
[info] [Xcode]
[info] [Xcode] ** TEST EXECUTE FAILED **
[info] [Xcode]
[info] [Xcode]
[info] [XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[info] [Xcode] Contents of xcodebuild log file ‘/var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-726DC4C3-62AD-46C5-AB25-360ABA197F8A/WebDriverAgentRunner-7C5C97BE-CE58-4E46-A147-07D298876CCC/Session-WebDriverAgentRunner-2017-11-23_102616-qXgXCx.log’:
[info] [Xcode] 10:26:16.193 xcodebuild[56887:911105] Beginning test session WebDriverAgentRunner-EF3FE0D4-1E00-41D1-AB14-B95736096928 at 2017-11-23 10:26:16.193 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7f9d5a074430> {
[info] [Xcode] SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode] 10:26:16.194 xcodebuild[56887:911105] /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
[info] [Xcode] test-without-building
[info] [Xcode] -project
[info] [Xcode] /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[info] [Xcode] -scheme
[info] [Xcode] WebDriverAgentRunner
[info] [Xcode] -destination
[info] [Xcode] id=6303E4FE-6320-4472-8F7F-E8F15C371359
[info] [Xcode] IPHONEOS_DEPLOYMENT_TARGET=11.1
[info] [Xcode] 10:26:16.194 xcodebuild[56887:911105] Launching with Xcode.IDEFoundation.Launcher.PosixSpawn
[info] [Xcode] 10:26:16.196 xcodebuild[56887:911105] Test standard output and standard error is at /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-726DC4C3-62AD-46C5-AB25-360ABA197F8A/WebDriverAgentRunner-7C5C97BE-CE58-4E46-A147-07D298876CCC/StandardOutputAndStandardError.txt
[info] [Xcode] 10:26:16.197 xcodebuild[56887:911105] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by TestSessionClaim_IDETestRunSession-726DC4C3-62AD-46C5-AB25-360ABA197F8A
[info] [Xcode] 10:26:16.238 xcodebuild[56887:911105] Launch session started.
[info] [Xcode] 10:26:16.252 xcodebuild[56887:911105] Setting up test runner session
[info] [Xcode] 10:26:16.252 xcodebuild[56887:912231] Sim iPhone 8: Unregistering for sim device notification with token 4
[info] [Xcode] 10:26:16.253 xcodebuild[56887:912231] Calling -[SimDevice getenv:error:] for TESTMANAGERD_SIM_SOCK
[info] [Xcode] 10:26:16.253 xcodebuild[56887:912231] Sim iPhone 8 has testmanagerd socket at /private/tmp/com.apple.launchd.BBaL3yeGuV/com.apple.testmanagerd.unix-domain.socket
[info] [Xcode] 10:26:16.253 xcodebuild[56887:912231] Validating test connection socket path (/private/tmp/com.apple.launchd.BBaL3yeGuV/com.apple.testmanagerd.unix-domain.socket)
[info] [Xcode] 10:26:16.254 xcodebuild[56887:912231] Constructing transport for test connection socket
[info] [Xcode] 10:26:16.254 xcodebuild[56887:912231] Connected socket 49 to testmanagerd for Sim iPhone 8
[info] [Xcode] 10:26:16.254 xcodebuild[56887:912223] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by LaunchSessionClaim_0x7f9d5a378100
[info] [Xcode] 10:26:16.255 xcodebuild[56887:912232] Received connection for test runner session
[info] [Xcode] 10:26:16.255 xcodebuild[56887:912232] Listening for proxy connection request from the test bundle

@deepirms2619 can you go through my comment

I found setup documentation needs some updates, let me know if you find it helpful or any info missing in this github issue comment.

I am planning to submit PR for document updates sooner

Thanks for your reply.

I followed the documents which you shared, but still facing same issue. While running the script .app is installing in the simulator, but WebDrvierAgent is not installing in the simulator.
Please find the error logs below and guide me how to resolve the issue. In the following location i’m not able to find “WebDriverAgentRunner-Runner.app”.
Also WebDriverAgent XCode project i can able to Build successfully.

[info] [Xcode] 2017-11-23 10:26:16.516 xcodebuild[56887:911105] Error Domain=IDEFoundationErrorDomain Code=1 “Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app” UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
[info] [Xcode] 2017-11-23 10:26:16.516 xcodebuild[56887:911105] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[info] [Xcode]

Detailed Error Logs:

[info] [Appium] Welcome to Appium v1.7.1
[info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] --> GET /wd/hub/sessions {}
[debug] [MJSONWP] Calling AppiumDriver.getSessions() with args: []
[debug] [MJSONWP] Responding to client with driver.getSessions() result: []
[info] [HTTP] <-- GET /wd/hub/sessions 200 8 ms - 40 [info] [HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/qaadmin/Documents/app/SeekingArrangementApp.app","automationName":"XCUITest","deviceName":"iPhone 8 Plus","noReset":false,"platformName":"iOS","platformVersion":"11.1","showXcodeLog":true,"udid":"6303E4FE-6320-4472-8F7F-E8F15C371359","useNewWDA":true,"usePrebuiltWDA":true,"xcodeOrgId":"W8 Tech Limited","xcodeSigningId":"iPhone Developer","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/qaadmin/Documents/app/SeekingArrangementApp.app","automationName":"XCUITest","deviceName":"iPhone 8 Plus","noReset":false,"platformName":"iOS","platformVersion":"11.1","showXcodeLog":true,"udid":"6303E4FE-6320-4472-8F7F-E8F15C371359","useNewWDA":true,"usePrebuiltWDA":true,"xcodeOrgId":"W8 Tech Limited","xcodeSigningId":"iPhone Developer","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1511430795360 (17:53:15 GMT+0800 (+08))
[info] [Appium] Creating new XCUITestDriver (v2.51.1) session
[info] [Appium] Capabilities:
[info] [Appium]   app: '/Users/qaadmin/Documents/app/SeekingArrangementApp.app'
[info] [Appium]   automationName: 'XCUITest'
[info] [Appium]   deviceName: 'iPhone 8 Plus'
[info] [Appium]   noReset: false
[info] [Appium]   platformName: 'iOS'
[info] [Appium]   platformVersion: '11.1'
[info] [Appium]   showXcodeLog: true
[info] [Appium]   udid: '6303E4FE-6320-4472-8F7F-E8F15C371359'
[info] [Appium]   useNewWDA: true
[info] [Appium]   usePrebuiltWDA: true
[info] [Appium]   xcodeOrgId: 'W8 Tech Limited'
[info] [Appium]   xcodeSigningId: 'iPhone Developer'
[info] [Appium]   newCommandTimeout: 0
[info] [Appium]   connectHardwareKeyboard: true
[info] [BaseDriver] Session created with session id: 2ed4a73a-849b-416f-a19b-0c34abc37994[debug] [XCUITest] Xcode version set to '9.1' 
[debug] [XCUITest] iOS SDK Version set to '11.1'
[debug] [BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1511430795646 (17:53:15 GMT+0800 (+08))[info] [iOSSim] Constructing iOS simulator for Xcode version 9.1 with udid '6303E4FE-6320-4472-8F7F-E8F15C371359'
[info] [XCUITest] Determining device to run tests on: udid: '6303E4FE-6320-4472-8F7F-E8F15C371359', real device: false
[info] [BaseDriver] Using local app '/Users/qaadmin/Documents/app/SeekingArrangementApp.app'
[debug] [BaseDriver] Event 'appConfigured' logged at 1511430796085 (17:53:16 GMT+0800 (+08))
[debug] [XCUITest] Checking whether app '/Users/qaadmin/Documents/app/SeekingArrangementApp.app' is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app '/Users/qaadmin/Documents/app/SeekingArrangementApp.app': 'com.use2pay.arrangement'
[debug] [BaseDriver] Event 'resetStarted' logged at 1511430796089 (17:53:16 GMT+0800 (+08))[info] [XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event 'resetComplete' logged at 1511430796212 (17:53:16 GMT+0800 (+08))
[debug] [iOSLog] Starting iOS 11.1 simulator log capture
[debug] [iOSLog] System log path: /Users/qaadmin/Library/Logs/CoreSimulator/6303E4FE-6320-4472-8F7F-E8F15C371359/system.log
[debug] [BaseDriver] Event 'logCaptureStarted' logged at 1511430796378 (17:53:16 GMT+0800 (+08))
[info] [XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set[debug] [iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":true}
[debug] [iOSSim] Updated shared Simulator preferences at '/Users/qaadmin/Library/Preferences/com.apple.iphonesimulator.plist' with {"ConnectHardwareKeyboard":true}[debug] [iOSSim] The count of running Simulator UI client instances is 0
[info] [iOSSim] Booting Simulator with UDID 6303E4FE-6320-4472-8F7F-E8F15C371359...[info] [iOSSim] Starting Simulator UI with command: open -Fn /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app --args -CurrentDeviceUDID 6303E4FE-6320-4472-8F7F-E8F15C371359 -ConnectHardwareKeyboard 1[debug] [iOSSim] The count of running Simulator UI client instances is 1[info] [iOSSim] Simulator with UDID 6303E4FE-6320-4472-8F7F-E8F15C371359 booted in 38 seconds
[debug] [BaseDriver] Event 'simStarted' logged at 1511430835422 (17:53:55 GMT+0800 (+08))[debug] [XCUITest] Reset requested. Removing app with id 'com.use2pay.arrangement' from the device[debug] [XCUITest] Installing '/Users/qaadmin/Documents/app/SeekingArrangementApp.app' on Simulator with UUID '6303E4FE-6320-4472-8F7F-E8F15C371359'...[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1511430875902 (17:54:35 GMT+0800 (+08))
[info] [XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[info] [XCUITest] Using WDA agent: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] Capability 'useNewWDA' set to true, so uninstalling WDA before proceeding
[info] [XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device[debug] [BaseDriver] Event 'wdaUninstalled' logged at 1511430877608 (17:54:37 GMT+0800 (+08))
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1511430877610 (17:54:37 GMT+0800 (+08))
[info] [XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing running processes 'xcodebuild.*6303E4FE-6320-4472-8F7F-E8F15C371359, iproxy 8100, 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner' for the device 6303E4FE-6320-4472-8F7F-E8F15C371359...
[debug] [XCUITest] 'pgrep -nif xcodebuild.*6303E4FE-6320-4472-8F7F-E8F15C371359' didn't detect any matching processes. Return code: 1[debug] [XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] 'pgrep -nif 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] Using Xcode 9.1, so fixing WDA codebase
[debug] [XCUITest] Beginning test with command 'xcodebuild test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=6303E4FE-6320-4472-8F7F-E8F15C371359 IPHONEOS_DEPLOYMENT_TARGET=11.1' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will be logged. To see xcode logging, use 'showXcodeLog' desired capability[info] [Xcode] Build settings from command line:
[info] [Xcode]     IPHONEOS_DEPLOYMENT_TARGET = 11.1
[info] [Xcode] 
[info] [Xcode] 
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [XCUITest] Log file for xcodebuild test: /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-E8D0CB29-D1C6-4BB8-B0E0-42C44420958A/WebDriverAgentRunner-9A021AD5-32C3-4F27-A445-7DBAB71AE590/Session-WebDriverAgentRunner-2017-11-23_175452-CmJCFg.log
[info] [Xcode] 2017-11-23 17:54:52.137 xcodebuild[75868:1491898]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[info] [Xcode] /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-E8D0CB29-D1C6-4BB8-B0E0-42C44420958A/WebDriverAgentRunner-9A021AD5-32C3-4F27-A445-7DBAB71AE590/Session-WebDriverAgentRunner-2017-11-23_175452-CmJCFg.log
[info] [Xcode] 
[info] [Xcode] 2017-11-23 17:54:52.137 xcodebuild[75868:1491094] [MT] IDETestOperationsObserverDebug: (3D37B388-2C70-4B78-98A9-780BA5341392) Beginning test session WebDriverAgentRunner-3D37B388-2C70-4B78-98A9-780BA5341392 at 2017-11-23 17:54:52.138 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7fabd4fb5350> {
[info] [Xcode] 		SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode] 
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[info] [Xcode] 2017-11-23 17:54:52.437 xcodebuild[75868:1491094] Error Domain=IDEFoundationErrorDomain Code=1 "Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
[info] [Xcode] 
[info] [Xcode] 2017-11-23 17:54:52.437 xcodebuild[75868:1491094] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[info] [Xcode] 
[info] [Xcode] 2017-11-23 17:54:52.438 xcodebuild[75868:1491294] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7fabd5429640>
[info] [Xcode] 
[info] [Xcode] ** TEST EXECUTE FAILED **
[info] [Xcode] 
[info] [Xcode] 
[info] [XCUITest] xcodebuild exited with code '65' and signal 'null'
[info] [Xcode] Contents of xcodebuild log file '/var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-E8D0CB29-D1C6-4BB8-B0E0-42C44420958A/WebDriverAgentRunner-9A021AD5-32C3-4F27-A445-7DBAB71AE590/Session-WebDriverAgentRunner-2017-11-23_175452-CmJCFg.log':
[info] [Xcode] 17:54:52.138 xcodebuild[75868:1491094] Beginning test session WebDriverAgentRunner-3D37B388-2C70-4B78-98A9-780BA5341392 at 2017-11-23 17:54:52.138 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7fabd4fb5350> {
[info] [Xcode] 		SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode] 17:54:52.138 xcodebuild[75868:1491094] 	/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
[info] [Xcode] test-without-building
[info] [Xcode] -project
[info] [Xcode] /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[info] [Xcode] -scheme
[info] [Xcode] WebDriverAgentRunner
[info] [Xcode] -destination
[info] [Xcode] id=6303E4FE-6320-4472-8F7F-E8F15C371359
[info] [Xcode] IPHONEOS_DEPLOYMENT_TARGET=11.1
[info] [Xcode] 17:54:52.138 xcodebuild[75868:1491094] Launching with Xcode.IDEFoundation.Launcher.PosixSpawn
[info] [Xcode] 17:54:52.140 xcodebuild[75868:1491094] Test standard output and standard error is at /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-E8D0CB29-D1C6-4BB8-B0E0-42C44420958A/WebDriverAgentRunner-9A021AD5-32C3-4F27-A445-7DBAB71AE590/StandardOutputAndStandardError.txt
[info] [Xcode] 17:54:52.142 xcodebuild[75868:1491094] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by TestSessionClaim_IDETestRunSession-E8D0CB29-D1C6-4BB8-B0E0-42C44420958A
[info] [Xcode] 17:54:52.155 xcodebuild[75868:1491094] Launch session started.
[info] [Xcode] 17:54:52.157 xcodebuild[75868:1491094] Setting up test runner session
[info] [Xcode] 17:54:52.158 xcodebuild[75868:1492285] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by LaunchSessionClaim_0x7fabd4ed5130
[info] [Xcode] 17:54:52.158 xcodebuild[75868:1491295] Sim iPhone 8: Unregistering for sim device notification with token 4
[info] [Xcode] 17:54:52.158 xcodebuild[75868:1491295] Calling -[SimDevice getenv:error:] for TESTMANAGERD_SIM_SOCK
[info] [Xcode] 17:54:52.159 xcodebuild[75868:1491295] Sim iPhone 8 has testmanagerd socket at /private/tmp/com.apple.launchd.CIO8oNVX75/com.apple.testmanagerd.unix-domain.socket
[info] [Xcode] 17:54:52.159 xcodebuild[75868:1491295] Validating test connection socket path (/private/tmp/com.apple.launchd.CIO8oNVX75/com.apple.testmanagerd.unix-domain.socket)
[info] [Xcode] 17:54:52.159 xcodebuild[75868:1491295] Constructing transport for test connection socket
[info] [Xcode] 17:54:52.159 xcodebuild[75868:1491295] Connected socket 69 to testmanagerd for Sim iPhone 8
[info] [Xcode] 17:54:52.160 xcodebuild[75868:1492288] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by LaunchSessionClaim_0x7fabd4ed5130
[info] [Xcode] 17:54:52.160 xcodebuild[75868:1491094] Adding console adaptor <IDEConsoleAdaptor: 0x7fabd53832b0 'target' stdin: <IDEMasterPtyFileHandle: 0x7fabd508cf20 MasterFH: <NSConcreteFileHandle: 0x7fabd5036e60> 38 SlaveFH: <NSConcreteFileHandle: 0x7fabd5045cd0> 55> 38 stdout: <IDEMasterPtyFileHandle: 0x7fabd508cf20 MasterFH: <NSConcreteFileHandle: 0x7fabd5036e60> 38 SlaveFH: <NSConcreteFileHandle: 0x7fabd5045cd0> 55> 38 stderr: (null) 0> for test session 3D37B388-2C70-4B78-98A9-780BA5341392.
[info] [Xcode] 17:54:52.160 xcodebuild[75868:1492288] 6303E4FE-6320-4472-8F7F-E8F15C371359: Registered for sim device notification, got token 5
[info] [Xcode] 17:54:52.160 xcodebuild[75868:1492289] 6303E4FE-6320-4472-8F7F-E8F15C371359: Unregistering for sim device notification with token 5
[info] [Xcode] 17:54:52.161 xcodebuild[75868:1492284] Received connection for test runner session
[info] [Xcode] 17:54:52.161 xcodebuild[75868:1492284] Listening for proxy connection request from the test bundle
[info] [Xcode] 17:54:52.161 xcodebuild[75868:1492284] Initiating session with identifier: 3D37B388-2C70-4B78-98A9-780BA5341392
[info] [Xcode] 17:54:52.161 xcodebuild[75868:1491094] Claim LaunchSessionClaim_0x7fabd4ed5130 on simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was relinquished
[info] [Xcode] 17:54:52.162 xcodebuild[75868:1491094] Claim LaunchSessionClaim_0x7fabd4ed5130 on simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was relinquished
[info] [Xcode] 17:54:52.162 xcodebuild[75868:1491094] Test runner session acquired connection.
[info] [Xcode] 17:54:52.162 xcodebuild[75868:1491094] Waiting for test process to launch.
[info] [Xcode] 17:54:52.162 xcodebuild[75868:1491094] Test operation failure: Launch session expired before checking in.
[info] [Xcode] 17:54:52.162 xcodebuild[75868:1491094] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Launch session expired before checking in." UserInfo={NSLocalizedDescription=Launch session expired before checking in.}
[info] [Xcode] 
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1511430892493 (17:54:52 GMT+0800 (+08))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65".
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[info] [XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1511430903805 (17:55:03 GMT+0800 (+08))
[info] [XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/usr/local/bin/carthage'
[debug] [XCUITest] Killing running processes 'xcodebuild.*6303E4FE-6320-4472-8F7F-E8F15C371359, iproxy 8100, 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner' for the device 6303E4FE-6320-4472-8F7F-E8F15C371359...
[debug] [XCUITest] 'pgrep -nif xcodebuild.*6303E4FE-6320-4472-8F7F-E8F15C371359' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] 'pgrep -nif 6303E4FE-6320-4472-8F7F-E8F15C371359.*XCTRunner' didn't detect any matching processes. Return code: 1
[debug] [XCUITest] Using Xcode 9.1, so fixing WDA codebase
[debug] [XCUITest] Beginning test with command 'xcodebuild test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=6303E4FE-6320-4472-8F7F-E8F15C371359 IPHONEOS_DEPLOYMENT_TARGET=11.1' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCUITest] Output from xcodebuild will be logged. To see xcode logging, use 'showXcodeLog' desired capability[info] [Xcode] Build settings from command line:
[info] [Xcode]     IPHONEOS_DEPLOYMENT_TARGET = 11.1
[info] [Xcode] 
[info] [Xcode] 
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Log file for xcodebuild test: /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-F23ADBD2-A0C9-47AD-9291-99DD04B93E8A/WebDriverAgentRunner-AFA7FEAD-F8AC-4B48-8845-D8D24215F8CE/Session-WebDriverAgentRunner-2017-11-23_175506-FOGJW4.log
[info] [Xcode] 2017-11-23 17:55:06.440 xcodebuild[75886:1493311]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[info] [Xcode] /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-F23ADBD2-A0C9-47AD-9291-99DD04B93E8A/WebDriverAgentRunner-AFA7FEAD-F8AC-4B48-8845-D8D24215F8CE/Session-WebDriverAgentRunner-2017-11-23_175506-FOGJW4.log
[info] [Xcode] 
[info] [Xcode] 2017-11-23 17:55:06.440 xcodebuild[75886:1493228] [MT] IDETestOperationsObserverDebug: (0D8DEE53-3432-45F6-8B17-FBD68BA8F910) Beginning test session WebDriverAgentRunner-0D8DEE53-3432-45F6-8B17-FBD68BA8F910 at 2017-11-23 17:55:06.441 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7fb3ec254800> {
[info] [Xcode] 		SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode] [info] [Xcode] 2017-11-23 17:55:06.769 xcodebuild[75886:1493228] Error Domain=IDEFoundationErrorDomain Code=1 "Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app" UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Users/qaadmin/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
[info] [Xcode] 2017-11-23 17:55:06.769 xcodebuild[75886:1493228] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[info] [Xcode] 
[info] [Xcode] 2017-11-23 17:55:06.770 xcodebuild[75886:1493310] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled <DTXChannel: 0x7fb3ebf177f0>
[info] [Xcode] 
[info] [Xcode] ** TEST EXECUTE FAILED **
[info] [Xcode] 
[info] [Xcode] 
[info] [XCUITest] xcodebuild exited with code '65' and signal 'null'
[info] [Xcode] Contents of xcodebuild log file '/var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-F23ADBD2-A0C9-47AD-9291-99DD04B93E8A/WebDriverAgentRunner-AFA7FEAD-F8AC-4B48-8845-D8D24215F8CE/Session-WebDriverAgentRunner-2017-11-23_175506-FOGJW4.log':
[info] [Xcode] 17:55:06.441 xcodebuild[75886:1493228] Beginning test session WebDriverAgentRunner-0D8DEE53-3432-45F6-8B17-FBD68BA8F910 at 2017-11-23 17:55:06.441 with Xcode 9B55 on target <DVTiPhoneSimulator: 0x7fb3ec254800> {
[info] [Xcode] 		SimDevice: iPhone 8 (6303E4FE-6320-4472-8F7F-E8F15C371359, iOS 11.1, Booted)
[info] [Xcode] } (11.1 (15B87))
[info] [Xcode] 17:55:06.441 xcodebuild[75886:1493228] 	/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
[info] [Xcode] test-without-building
[info] [Xcode] -project
[info] [Xcode] /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[info] [Xcode] -scheme
[info] [Xcode] WebDriverAgentRunner
[info] [Xcode] -destination
[info] [Xcode] id=6303E4FE-6320-4472-8F7F-E8F15C371359
[info] [Xcode] IPHONEOS_DEPLOYMENT_TARGET=11.1
[info] [Xcode] 17:55:06.441 xcodebuild[75886:1493228] Launching with Xcode.IDEFoundation.Launcher.PosixSpawn
[info] [Xcode] 17:55:06.444 xcodebuild[75886:1493228] Test standard output and standard error is at /var/folders/d3/7p6ndjdx2s59sprtvg8f5gj40000gp/T/com.apple.dt.XCTest/IDETestRunSession-F23ADBD2-A0C9-47AD-9291-99DD04B93E8A/WebDriverAgentRunner-AFA7FEAD-F8AC-4B48-8845-D8D24215F8CE/StandardOutputAndStandardError.txt
[info] [Xcode] 17:55:06.445 xcodebuild[75886:1493228] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by TestSessionClaim_IDETestRunSession-F23ADBD2-A0C9-47AD-9291-99DD04B93E8A
[info] [Xcode] 17:55:06.505 xcodebuild[75886:1493228] Launch session started.
[info] [Xcode] 17:55:06.506 xcodebuild[75886:1493228] Setting up test runner session
[info] [Xcode] 17:55:06.507 xcodebuild[75886:1493570] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by LaunchSessionClaim_0x7fb3ec427bf0
[info] [Xcode] 17:55:06.507 xcodebuild[75886:1493536] Sim iPhone 8: Unregistering for sim device notification with token 4
[info] [Xcode] 17:55:06.507 xcodebuild[75886:1493536] Calling -[SimDevice getenv:error:] for TESTMANAGERD_SIM_SOCK
[info] [Xcode] 17:55:06.509 xcodebuild[75886:1493536] Sim iPhone 8 has testmanagerd socket at /private/tmp/com.apple.launchd.CIO8oNVX75/com.apple.testmanagerd.unix-domain.socket
[info] [Xcode] 17:55:06.509 xcodebuild[75886:1493536] Validating test connection socket path (/private/tmp/com.apple.launchd.CIO8oNVX75/com.apple.testmanagerd.unix-domain.socket)
[info] [Xcode] 17:55:06.509 xcodebuild[75886:1493536] Constructing transport for test connection socket
[info] [Xcode] 17:55:06.509 xcodebuild[75886:1493536] Connected socket 69 to testmanagerd for Sim iPhone 8
[info] [Xcode] 17:55:06.510 xcodebuild[75886:1493571] Simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was claimed by LaunchSessionClaim_0x7fb3ec427bf0
[info] [Xcode] 17:55:06.510 xcodebuild[75886:1493228] Adding console adaptor <IDEConsoleAdaptor: 0x7fb3ebd516e0 'target' stdin: <IDEMasterPtyFileHandle: 0x7fb3ec025000 MasterFH: <NSConcreteFileHandle: 0x7fb3ec0b8610> 38 SlaveFH: <NSConcreteFileHandle: 0x7fb3ebdad1c0> 55> 38 stdout: <IDEMasterPtyFileHandle: 0x7fb3ec025000 MasterFH: <NSConcreteFileHandle: 0x7fb3ec0b8610> 38 SlaveFH: <NSConcreteFileHandle: 0x7fb3ebdad1c0> 55> 38 stderr: (null) 0> for test session 0D8DEE53-3432-45F6-8B17-FBD68BA8F910.
[info] [Xcode] 17:55:06.510 xcodebuild[75886:1493571] 6303E4FE-6320-4472-8F7F-E8F15C371359: Registered for sim device notification, got token 5
[info] [Xcode] 17:55:06.511 xcodebuild[75886:1493536] 6303E4FE-6320-4472-8F7F-E8F15C371359: Unregistering for sim device notification with token 5
[info] [Xcode] 17:55:06.512 xcodebuild[75886:1493569] Received connection for test runner session
[info] [Xcode] 17:55:06.512 xcodebuild[75886:1493569] Listening for proxy connection request from the test bundle
[info] [Xcode] 17:55:06.513 xcodebuild[75886:1493228] Claim LaunchSessionClaim_0x7fb3ec427bf0 on simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was relinquished
[info] [Xcode] 17:55:06.513 xcodebuild[75886:1493228] Claim LaunchSessionClaim_0x7fb3ec427bf0 on simulator 6303E4FE-6320-4472-8F7F-E8F15C371359 was relinquished
[info] [Xcode] 17:55:06.514 xcodebuild[75886:1493569] Initiating session with identifier: 0D8DEE53-3432-45F6-8B17-FBD68BA8F910
[info] [Xcode] 17:55:06.516 xcodebuild[75886:1493228] Test runner session acquired connection.
[info] [Xcode] 17:55:06.516 xcodebuild[75886:1493228] Waiting for test process to launch.
[info] [Xcode] 17:55:06.516 xcodebuild[75886:1493228] Test operation failure: Launch session expired before checking in.
[info] [Xcode] 17:55:06.517 xcodebuild[75886:1493228] _finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Launch session expired before checking in." UserInfo={NSLocalizedDescription=Launch session expired before checking in.}
[info] [Xcode] 
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1511430906798 (17:55:06 GMT+0800 (+08))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65".
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[info] [XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device[error] [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65".
    at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
    at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65".
    at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
    at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[debug] [XCUITest] Not clearing log files. Use `clearSystemFiles` capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[error] [MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65".
    at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
    at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
    at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
    at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
    at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
    at process._tickCallback (internal/process/next_tick.js:103:7)
[info] [HTTP] <-- POST /wd/hub/session 500 122791 ms - 235