Unable to launch webdriver agent because of Xcode build failure

debug] [XCUITest] Xcode version set to ‘8.1’
[debug] [XCUITest] iOS SDK Version set to ‘10.1’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1492067113079 (12:35:13 GMT+0530 (IST))
[debug] [XCUITest] Available devices: ae532b52b89deb5c34448310cd92e2d46e53b69f
[debug] [XCUITest] Creating iDevice object with udid ‘ae532b52b89deb5c34448310cd92e2d46e53b69f’
[XCUITest] Determining device to run tests on: udid: ‘ae532b52b89deb5c34448310cd92e2d46e53b69f’, real device: true
[BaseDriver] Using local app ‘//Users//jenkins//Documents//workspace//PocNativeApp//trunk//ProjectAutomation//ipa//MobileBankDev.ipa’
[debug] [BaseDriver] Copying local zip to tmp dir
[debug] [BaseDriver] Unzipping /var/folders/fm/0tcmhr1n3hz36v_f83pkflx40000gq/T/2017313-4847-zksiue.gh8j5g66r/appium-app.zip
[debug] [BaseDriver] Testing zip archive: /var/folders/fm/0tcmhr1n3hz36v_f83pkflx40000gq/T/2017313-4847-zksiue.gh8j5g66r/appium-app.zip
[BaseDriver] Unzipped local app to ‘/var/folders/fm/0tcmhr1n3hz36v_f83pkflx40000gq/T/2017313-4847-zksiue.gh8j5g66r/Payload/MobileBankDev.app’
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1492067116172 (12:35:16 GMT+0530 (IST))
[debug] [XCUITest] Checking whether app ‘/var/folders/fm/0tcmhr1n3hz36v_f83pkflx40000gq/T/2017313-4847-zksiue.gh8j5g66r/Payload/MobileBankDev.app’ is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app ‘/var/folders/fm/0tcmhr1n3hz36v_f83pkflx40000gq/T/2017313-4847-zksiue.gh8j5g66r/Payload/MobileBankDev.app’: ‘se.forex.mobile’
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1492067116181 (12:35:16 GMT+0530 (IST))
[debug] [XCUITest] Reset: running ios real device reset flow
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1492067116182 (12:35:16 GMT+0530 (IST))
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1492067116308 (12:35:16 GMT+0530 (IST))
[XCUITest] Setting up real device
[debug] [XCUITest] Reset requested. Removing app with id ‘se.forex.mobile’ from the device
[debug] [XCUITest] Installing ‘/var/folders/fm/0tcmhr1n3hz36v_f83pkflx40000gq/T/2017313-4847-zksiue.gh8j5g66r/Payload/MobileBankDev.app’ on device with UUID ‘ae532b52b89deb5c34448310cd92e2d46e53b69f’…
[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event ‘appInstalled’ logged at 1492067125093 (12:35:25 GMT+0530 (IST))
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1492067125095 (12:35:25 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=ae532b52b89deb5c34448310cd92e2d46e53b69f -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.0’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[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] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[debug] [XCUITest] Log file for xcodebuild test: /Users/bharatjoshi/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/61A61D44-0ACC-4C4D-B123-B6412D84B58D/Session-WebDriverAgentRunner-2017-04-13_123535-b7ppeg.log
[Xcode] 2017-04-13 12:35:35.039 xcodebuild[4892:48435] Error Domain=NSCocoaErrorDomain Code=260 “The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/Users/bharatjoshi/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fc304541680 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
[Xcode]
[Xcode] 2017-04-13 12:35:35.039 xcodebuild[4892:48435] 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’
[debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1492067135090 (12:35:35 GMT+0530 (IST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 4890)
[debug] [XCUITest] iproxy exited with code ‘null’
[debug] [XCUITest] Removing WDA application from device
[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1492067145340 (12:35:45 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=ae532b52b89deb5c34448310cd92e2d46e53b69f -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.0’ in directory ‘/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[debug] [XCUITest] Output from xcodebuild will not be logged
[debug] [XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[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: /Users/bharatjoshi/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Logs/Test/1686C4DA-E0CA-49E4-A8C7-601A7E6C8835/Session-WebDriverAgentRunner-2017-04-13_123552-L92VNV.log
[Xcode] 2017-04-13 12:35:52.641 xcodebuild[4923:48681] Error Domain=NSCocoaErrorDomain Code=260 “The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file.” UserInfo={NSFilePath=/Users/bharatjoshi/Library/Developer/Xcode/DerivedData/WebDriverAgent-brdadhpuduowllgivnnvuygpwhzy/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fd45e5cf170 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}}
[Xcode]
[Xcode] 2017-04-13 12:35:52.641 xcodebuild[4923:48681] 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’
[debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1492067152654 (12:35:52 GMT+0530 (IST))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down iproxy process (pid 4921)
[debug] [XCUITest] iproxy exited with code ‘null’
[debug] [XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (…/…/lib/driver.js:374:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/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$ (…/…/lib/driver.js:374:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [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$ (…/…/lib/driver.js:374:15)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 50437 ms - 230

Have a look here:
https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md

or
here:

1 Like