error: xcodebuild failed with code 65
See original GitHub issueThe problem
This problem has been tangled for a long time, but also to try a lot of solutions, but it is no use. See my appium error log:
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up. [Appium] Creating new XCUITestDriver session [Appium] Capabilities: [Appium] deviceName: ‘iPhone 6’ [Appium] unicodeKeyboard: ‘True’ [Appium] udid: ‘a58bdd10033efffd5261d606ec221744c973b6d9’ [Appium] app: ‘/Users/mac/Library/Developer/Xcode/DerivedData/ECLite-dglkdcoapbwyzxeyygdccvctpxxf/Build/Products/Debug-iphoneos/ECLite.app’ [Appium] noReset: ‘True’ [Appium] realDeviceLogger: ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’ [Appium] xcodeConfigFile: ‘/Users/mac/Library/Keychains/Config.xcconfig’ [Appium] resetKeyboard: ‘True’ [Appium] platformVersion: ‘10.1.1’ [Appium] platformName: ‘IOS’ [Appium] AUTOMATION_NAME: ‘XCUITest’ [debug] [XCUITest] XCUITestDriver version: 2.3.0 [BaseDriver] Capability ‘noReset’ changed from string to boolean. This may cause unexpected behavior [BaseDriver] The following capabilities were provided, but are not recognized by appium: unicodeKeyboard, resetKeyboard, AUTOMATION_NAME. [BaseDriver] Session created with session id: df3ea708-de28-4c18-b943-91bb413c58f3 [debug] [XCUITest] Xcode version set to ‘8.1’ [debug] [XCUITest] iOS SDK Version set to ‘10.1’ [debug] [XCUITest] Available devices: a58bdd10033efffd5261d606ec221744c973b6d9 [debug] [XCUITest] Creating iDevice object with udid a58bdd10033efffd5261d606ec221744c973b6d9 [XCUITest] Determining device to run tests on: udid: ‘a58bdd10033efffd5261d606ec221744c973b6d9’, real device: true [BaseDriver] Using local app ‘/Users/mac/Library/Developer/Xcode/DerivedData/ECLite-dglkdcoapbwyzxeyygdccvctpxxf/Build/Products/Debug-iphoneos/ECLite.app’ [debug] [XCUITest] Checking whether app ‘/Users/mac/Library/Developer/Xcode/DerivedData/ECLite-dglkdcoapbwyzxeyygdccvctpxxf/Build/Products/Debug-iphoneos/ECLite.app’ is actually present [debug] [XCUITest] App is present [debug] [ios-app-utils] Getting bundle ID from app ‘/Users/mac/Library/Developer/Xcode/DerivedData/ECLite-dglkdcoapbwyzxeyygdccvctpxxf/Build/Products/Debug-iphoneos/ECLite.app’: ‘com.ec.ECLite’ [debug] [iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog [debug] [iOSLog] Found idevicesyslog: ‘/usr/local/bin/idevicesyslog’ [XCUITest] Setting up real device [debug] [XCUITest] App is already installed. [debug] [XCUITest] Full reset not requested. No need to install. [XCUITest] Using WDA path: ‘/Users/mac/Downloads/appium-1.6.2/node_modules/appium-xcuitest-driver/WebDriverAgent’ [XCUITest] Using WDA agent: ‘/Users/mac/Downloads/appium-1.6.2/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] Using real device logger ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’ [debug] [XCUITest] Using Xcode configuration file: ‘/Users/mac/Library/Keychains/Config.xcconfig’ [debug] [XCUITest] Beginning test with command ‘xcodebuild build test -project /Users/mac/Downloads/appium-1.6.2/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=a58bdd10033efffd5261d606ec221744c973b6d9 -configuration Debug -xcconfig /Users/mac/Library/Keychains/Config.xcconfig’ in directory ‘/Users/mac/Downloads/appium-1.6.2/node_modules/appium-xcuitest-driver/WebDriverAgent’ [XCUITest] Waiting for WebDriverAgent to start on device [debug] [XCUITest] Log file for xcodebuild test: /Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-fgcrwftcmzsjubeiczlnssohwwdo/Logs/Test/866BC9EA-0DE1-4078-BEAC-58FFD7151CEA/Session-WebDriverAgentRunner-2016-12-09_163913-wpdt9v.log [Xcode] 2016-12-09 16:39:14.669 xcodebuild[11528:212498] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-fgcrwftcmzsjubeiczlnssohwwdo/Logs/Test/866BC9EA-0DE1-4078-BEAC-58FFD7151CEA/Session-WebDriverAgentRunner-2016-12-09_163913-wpdt9v.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-fgcrwftcmzsjubeiczlnssohwwdo/Logs/Test/866BC9EA-0DE1-4078-BEAC-58FFD7151CEA/Session-WebDriverAgentRunner-2016-12-09_163913-wpdt9v.log}
[Xcode] Testing failed:
[Xcode] WebDriverAgentLib has conflicting provisioning settings. WebDriverAgentLib is automatically signed, but code signing identity iOS Developer has been manually specified. Set the code signing identity value to “iPhone Developer” in the build settings editor, or switch to manual signing in the project editor. ** 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 sub-processes [XCUITest] Shutting down Logger process (pid 11529) [XCUITest] System log exited with code ‘null’ [debug] [XCUITest] Removing WDA application from device [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 ‘/usr/local/lib/node_modules/deviceconsole/deviceconsole’ [debug] [XCUITest] Using Xcode configuration file: ‘/Users/mac/Library/Keychains/Config.xcconfig’ [debug] [XCUITest] Beginning test with command ‘xcodebuild build test -project /Users/mac/Downloads/appium-1.6.2/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=a58bdd10033efffd5261d606ec221744c973b6d9 -configuration Debug -xcconfig /Users/mac/Library/Keychains/Config.xcconfig’ in directory ‘/Users/mac/Downloads/appium-1.6.2/node_modules/appium-xcuitest-driver/WebDriverAgent’ [XCUITest] Waiting for WebDriverAgent to start on device [debug] [XCUITest] Log file for xcodebuild test: /Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-fgcrwftcmzsjubeiczlnssohwwdo/Logs/Test/6F31FCE8-C16D-426D-A227-C9E349EA222B/Session-WebDriverAgentRunner-2016-12-09_163916-txV7JC.log [Xcode] 2016-12-09 16:39:16.770 xcodebuild[11564:212655] Error Domain=IDETestOperationsObserverErrorDomain Code=3 “Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-fgcrwftcmzsjubeiczlnssohwwdo/Logs/Test/6F31FCE8-C16D-426D-A227-C9E349EA222B/Session-WebDriverAgentRunner-2016-12-09_163916-txV7JC.log” UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/mac/Library/Developer/Xcode/DerivedData/WebDriverAgent-fgcrwftcmzsjubeiczlnssohwwdo/Logs/Test/6F31FCE8-C16D-426D-A227-C9E349EA222B/Session-WebDriverAgentRunner-2016-12-09_163916-txV7JC.log}
[Xcode] Testing failed:
[Xcode] WebDriverAgentLib has conflicting provisioning settings. WebDriverAgentLib is automatically signed, but code signing identity iOS Developer has been manually specified. Set the code signing identity value to “iPhone Developer” in the build settings editor, or switch to manual signing in the project editor. ** TEST FAILED **
The following build commands failed: Check dependencies (1 failure)
[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’ [XCUITest] Error: xcodebuild failed with code 65 at SubProcess.<anonymous> (…/…/lib/webdriveragent.js:332:25) at emitTwo (events.js:106:13) at SubProcess.emit (events.js:191:7) at ChildProcess.<anonymous> (…/…/lib/teen_process.js:197:14) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) Error: xcodebuild failed with code 65 at SubProcess.<anonymous> (…/…/lib/webdriveragent.js:332:25) at emitTwo (events.js:106:13) at SubProcess.emit (events.js:191:7) at ChildProcess.<anonymous> (…/…/lib/teen_process.js:197:14) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) [XCUITest] Shutting down sub-processes [XCUITest] Shutting down Logger process (pid 11565) [XCUITest] System log exited with code ‘null’ [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.<anonymous> (…/…/lib/webdriveragent.js:332:25) at emitTwo (events.js:106:13) at SubProcess.emit (events.js:191:7) at ChildProcess.<anonymous> (…/…/lib/teen_process.js:197:14) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at Process.ChildProcess._handle.onexit (i
Environment
- Appium version (or git revision) that exhibits the issue:
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium:
- Node.js version (unless using Appium.app|exe):
- Mobile platform/version under test:
- Real device or emulator/simulator:
- Appium CLI or Appium.app|exe:
Details
Describe in more detail the problem you have been experiencing, if necessary.
Link to Appium logs
Create a gist which is a paste of your full Appium logs, and link them here. Do not paste your full Appium logs here, as it will make this issue very long and hard to read! If you are reporting a bug, always include Appium logs!
Code To Reproduce Issue [ Good To Have ]
Please remember that, with sample code; it’s easier to reproduce bug and much faster to fix it.
Please git clone https://github.com/appium/sample-code and use one of your favourite languages and sample apps to reproduce issue.
In case a similar scenario is missing in sample-code, please submit a PR with one of the sample apps provided.
And the Code setting:
desired_caps = {} desired_caps['platformName'] = 'IOS' desired_caps['platformVersion'] = '10.1.1' desired_caps['udid'] = 'a58bdd10033efffd5261d606ec221744c973b6d9' desired_caps['deviceName'] = 'iPhone 6' desired_caps['xcodeConfigFile'] = '/Users/mac/Library/Keychains/Config.xcconfig' desired_caps['realDeviceLogger'] = '/usr/local/lib/node_modules/deviceconsole/deviceconsole' desired_caps['noReset'] = 'True' #desired_caps['keychainPath'] = '/Users/mac/Library/Keychains/MyDeveloporChain.p12' #desired_caps['keychainPassword'] = 'aliao12' desired_caps['app'] = PATH('/Users/mac/Library/Developer/Xcode/DerivedData/ECLite-dglkdcoapbwyzxeyygdccvctpxxf/Build/Products/Debug-iphoneos/ECLite.app') desired_caps['AUTOMATION_NAME'] = 'XCUITest' desired_caps['unicodeKeyboard'] = 'True' desired_caps['resetKeyboard'] = 'True' self.driver = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)
I don’t know where the problem
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Appium 1.6.4-beta has been released (to upgrade, run
npm uninstall -g appium && npm install -g appium@beta
). How we connect to devices has been significantly changed, and should be more reliable. Please try it out.There is some documentation here: https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md
I am closing this issue since the details will have changed completely. If you still have problems, please see if there is a similar issue, or else create a new issue with as much information as possible. We are committed to tracking down these elusive problems!
Still experiencing the same problem …
Getting this: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. from where can I get this WebDriverAgentRunner-Runner.app for real device? Appium 1.0.2-betta and Appium v1.6.4 { “deviceName”: “Igor’s iPhone5C”, “udid”: “866ab408080b93c891c8b038755096207b44a2fc”, “automationName”: “XCUITest”, “platformName”: “iOS”, “bundleId”: “Jostle.AppiumTest-jostle.me1”, “platformVersion”: “10.3”, “fullReset”: false, “showXcodeLog”: false, “clearSystemFiles”: false }