Xcode build failed with code 65 in appium

In IOS 10.1 with xcode 8.1 i am getting below error please help me…

HTTP] --> GET /wd/hub/status {}
[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0-beta3”,“revision”:null}}

[HTTP] <-- GET /wd/hub/status 200 98 ms - 89

[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“platformVersion”:“10.1”,“automationName”:“XCUITest”,“bundleId”:“appium.iPad”,“platformName”:“iOS”,“udid”:“XXXXXXXXX”,“deviceName”:“iPad Air”}}

[MJSONWP] Calling AppiumDriver.createSession() with args: [{“platformVersion”:“10.1”,“automationName”:“XCUITest”,“bundleId”:“appium.iPad”,“platformName”:“iOS”,“udid”:“XXXXXXXX”,“deviceName”:“iPad Air”},null,null,null,null,null,null]

[Appium] Creating new XCUITestDriver session

[Appium] Capabilities:

[Appium] platformVersion: ‘10.1’
[Appium] automationName: ‘XCUITest’
[Appium] bundleId: ‘appium.iPad’
[Appium] platformName: ‘iOS’
[Appium] udid: ‘xxxxxxxxxxxx’

[Appium] deviceName: ‘iPad Air’
[Appium] noReset: true

[debug] [XCUITest] XCUITestDriver version: 2.0.34

[BaseDriver] Session created with session id: a2af690b-ca4c-4e16-b260-5a43fd76a38e

[debug] [XCUITest] Xcode version set to ‘8.1’
[debug] [XCUITest] iOS SDK Version set to ‘10.1’

[debug] [XCUITest] Available devices: xxxxxxxxxxxxxxxxx

[debug] [XCUITest] Creating iDevice object with udid xxxxxxxxxxxxxxxx

[XCUITest] Determining device to run tests on: udid: ‘xxxxxxxxxxxxx’, real device: true
[debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’

[XCUITest] Setting up real device

[XCUITest] Using default agent: /Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj
[XCUITest] Using default bootstrap: /Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/WebDriverAgent

[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes

[debug] [XCUITest] Using real device logger ‘idevicesyslog’

[debug] [XCUITest] Beginning test with command ‘/Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=xxxxxxxxxxxxxxxxxx’ in directory ‘/Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/WebDriverAgent’

[XCUITest] Waiting for WebDriverAgent to start on device

[debug] [XCUITest] Log file for xcodebuild test: /Users/usfoods/Library/Developer/Xcode/DerivedData/WebDriverAgent-apyedmlxenwvledhndaahmsdigim/Logs/Test/B6E5D30E-DAE1-434C-B9FA-56944FA37AFE/Session-WebDriverAgentRunner-2016-11-03_110425-ycCEfm.log

[Xcode] 2016-11-03 11:04:28.219 xcodebuild[1365:23882] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/usfoods/Library/Developer/Xcode/DerivedData/WebDriverAgent-apyedmlxenwvledhndaahmsdigim/Logs/Test/B6E5D30E-DAE1-434C-B9FA-56944FA37AFE/Session-WebDriverAgentRunner-2016-11-03_110425-ycCEfm.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/usfoods/Library/Developer/Xcode/DerivedData/WebDriverAgent-apyedmlxenwvledhndaahmsdigim/Logs/Test/B6E5D30E-DAE1-434C-B9FA-56944FA37AFE/Session-WebDriverAgentRunner-2016-11-03_110425-ycCEfm.log}

[Xcode]
Testing failed:

[Xcode] Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the project editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.1’
** TEST FAILED **

The following build commands failed:
Check dependencies
(1 failure)

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[debug] [XCUITest] xcodebuild failure warrants retry. Retrying…
[XCUITest] Shutting down WebDriverAgent

[XCUITest] System log exited with code ‘0’

[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes

[debug] [XCUITest] Using real device logger ‘idevicesyslog’

[debug] [XCUITest] Beginning test with command ‘/Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/bin/run-xcodebuild.sh --project /Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj --scheme WebDriverAgentRunner --destination id=xxxxxxxxxxxxx’ in directory ‘/Applications/MyCustAppium.app/Contents/Resources/node_modules/appium-xcuitest-driver/WebDriverAgent’

[XCUITest] Waiting for WebDriverAgent to start on device

[debug] [XCUITest] Log file for xcodebuild test: /Users/usfoods/Library/Developer/Xcode/DerivedData/WebDriverAgent-apyedmlxenwvledhndaahmsdigim/Logs/Test/577FCFFA-AFF6-405D-9F8C-F2400CC15F0B/Session-WebDriverAgentRunner-2016-11-03_110435-eVqWyJ.log

[Xcode] 2016-11-03 11:04:37.637 xcodebuild[1621:24415] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/usfoods/Library/Developer/Xcode/DerivedData/WebDriverAgent-apyedmlxenwvledhndaahmsdigim/Logs/Test/577FCFFA-AFF6-405D-9F8C-F2400CC15F0B/Session-WebDriverAgentRunner-2016-11-03_110435-eVqWyJ.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/usfoods/Library/Developer/Xcode/DerivedData/WebDriverAgent-apyedmlxenwvledhndaahmsdigim/Logs/Test/577FCFFA-AFF6-405D-9F8C-F2400CC15F0B/Session-WebDriverAgentRunner-2016-11-03_110435-eVqWyJ.log}

[Xcode] Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the project editor.

[Xcode] Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.1’
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.1’

[Xcode]
Testing failed:

[Xcode] Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the project editor.
Code signing is required for product type ‘UI Testing Bundle’ in SDK ‘iOS 10.1’
** TEST FAILED **

The following build commands failed:
Check dependencies
(1 failure)

[XCUITest] Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:294:25)
at emitTwo (events.js:100:13)
at SubProcess.emit (events.js:185:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
[Error: xcodebuild failed with code 65]

[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[XCUITest] Shutting down WebDriverAgent
[XCUITest] System log exited with code ‘0’
[debug] [XCUITest] Reset not set, continuing
[debug] [iOSLog] Stopping iOS log capture

[MJSONWP] Encountered internal error running command: Error: xcodebuild failed with code 65
at SubProcess. (…/…/lib/webdriveragent.js:294:25)
at emitTwo (events.js:100:13)
at SubProcess.emit (events.js:185:7)
at ChildProcess. (lib/teen_process.js:191:14)
at emitTwo (events.js:100:13)
at ChildProcess.emit (events.js:185:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

[HTTP] <-- POST /wd/hub/session 500 36110 ms - 167

[HTTP] --> GET /wd/hub/status {}

[MJSONWP] Calling AppiumDriver.getStatus() with args: []

[MJSONWP] Responding to client with driver.getStatus() result: {“build”:{“version”:“1.6.0-beta3”,“revision”:null}}

[HTTP] <-- GET /wd/hub/status 200 150 ms - 89

1 Like

I got some steps from below link and i followed.

i have done with that. But now the error came like—>

xcode build failed with code 1

Follow the steps in this video for a quick fix:

https://www.youtube.com/watch?v=TprXEKBnfmA