# Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65"

**URL:** <https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332>\
**Category:** Support\
**Created:** [October 25, 2017, 12:20pm UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332 "2017-10-25T12:20:53Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![Pawan\_Belamkar](https://discuss.appium.io/user_avatar/discuss.appium.io/pawan_belamkar/32/8375_2.png) [@Pawan\_Belamkar](https://discuss.appium.io/u/Pawan_Belamkar)\
**Post date:** [December 8, 2020, 2:14pm UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/21 "2020-12-08T14:14:34Z")

</div>

Could you please let me know how did resolve this issue, same issue i am facing.

---

<div class="post-metadata">

**Author:** ![Prasanth\_Chockalinga](https://discuss.appium.io/user_avatar/discuss.appium.io/prasanth_chockalinga/32/6850_2.png) [@Prasanth\_Chockalinga](https://discuss.appium.io/u/Prasanth_Chockalinga)\
**Post date:** [February 8, 2021, 10:21am UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/22 "2021-02-08T10:21:01Z")

</div>

Thanks it worked . I underwent certificate issue on solving I need to update my team in ‘signings&capability’ for webdriver agent project in xcode. That was missing , after that it was working fine. Thanks.

@venkat4 check your webdriveragent xcode project, mostly that will be issue for you I think

---

<div class="post-metadata">

**Author:** ![Rana](https://discuss.appium.io/user_avatar/discuss.appium.io/rana/32/8822_2.png) [@Rana](https://discuss.appium.io/u/Rana)\
**Post date:** [May 12, 2021, 12:09pm UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/23 "2021-05-12T12:09:59Z")

</div>

Hi karunakar- aim also getting the saem error. Please help if you the solution.

An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message: 2021-05-12 14:07:35.523 xcodebuild[78359:12003961] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 “The folder “WebDriverAgentRunner\_iphoneos14.4-arm64.xctestrun” doesn’t exist.” UserInfo={NSFilePath=/Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products/WebDriverAgentRunner\_iphoneos14.4-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7ff386ca2740 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}} \*\* TEST BUILD FAILED \*\* 2021-05-12 14:07:35.538 xcodebuild[78359:12003835] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult/Staging/2\_Test/Diagnostics/WebDriverAgentRunner-94955281-E571-4AD7-BB4B-A47EABC6B628/WebDriverAgentRunner-D8D80355-9303-4267-BBBC-AA66E240F468/Session-WebDriverAgentRunner-2021-05-12\_140735-YOpZwe.log 2021-05-12 14:07:35.539 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: (BBAF54B9-ABD5-48C4-840C-8256F39825E2) Beginning test session WebDriverAgentRunner-BBAF54B9-ABD5-48C4-840C-8256F39825E2 at 2021-05-12 14:07:35.538 with Xcode 12D4e on target 📱\<DVTiOSDevice (0x7ff387787650), Shoprite’s iPhone, iPhone, 14.4 (18D52), 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525\> { deviceSerialNumber: F71Y6ZSRHG7F identifier: 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525 deviceClass: iPhone deviceName: Shoprite’s iPhone deviceIdentifier: 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525 productVersion: 14.4 buildVersion: 18D52 deviceSoftwareVersion: 14.4 (18D52) deviceArchitecture: arm64 deviceTotalCapacity: 25221414912 deviceAvailableCapacity: 14180786176 deviceIsTransient: NO ignored: NO deviceIsBusy: NO deviceIsPaired: YES deviceIsActivated: YES deviceActivationState: Activated isPasscodeLocked: NO deviceType: \<DVTDeviceType:0x7ff3844faa90 Xcode.DeviceType.iPhone\> supportedDeviceFamilies: ( 1 ) applications: (null) provisioningProfiles: (null) hasInternalSupport: NO hasWritableSystem: NO isSupportedOS: YES bootArgs: (null) nextBootArgs: (null) connected: YES isWirelessEnabled: NO connectionType: direct hostname: Shoprites-iPhone.local. bonjourServiceName: e8:36:17:26:6e:94@fe80::ea36:17ff:fe26:6e94.\_apple-mobdev2.\_tcp.local. activeProxiedDevice: (null) } (14.4 (18D52)) 2021-05-12 14:07:35.653 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: (BBAF54B9-ABD5-48C4-840C-8256F39825E2) Finished requesting crash reports. Continuing with testing. \*\*\* If you believe this error represents a bug, please attach the result bundle at /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult 2021-05-12 14:07:35.677 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: 0.144 elapsed – Testing started completed. 2021-05-12 14:07:35.677 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec – start 2021-05-12 14:07:35.677 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: 0.144 sec, +0.144 sec – end Test session results, code coverage, and logs: /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult Testing failed: Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the Signing & Capabilities editor. WebDriverAgentRunner: WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult. (Underlying Error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying Error: The operation couldn’t be completed. No such file or directory))) \*\* TEST EXECUTE FAILED \*\* Testing started. Make sure you follow the tutorial at [https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md](https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md). Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.

---

<div class="post-metadata">

**Author:** ![Rana](https://discuss.appium.io/user_avatar/discuss.appium.io/rana/32/8822_2.png) [@Rana](https://discuss.appium.io/u/Rana)\
**Post date:** [May 12, 2021, 12:10pm UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/24 "2021-05-12T12:10:36Z")

</div>

Hey pawan, did you get it resolved. Please help.

iam getting the same

An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message: 2021-05-12 14:07:35.523 xcodebuild[78359:12003961] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 “The folder “WebDriverAgentRunner\_iphoneos14.4-arm64.xctestrun” doesn’t exist.” UserInfo={NSFilePath=/Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products/WebDriverAgentRunner\_iphoneos14.4-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7ff386ca2740 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}} \*\* TEST BUILD FAILED \*\* 2021-05-12 14:07:35.538 xcodebuild[78359:12003835] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult/Staging/2\_Test/Diagnostics/WebDriverAgentRunner-94955281-E571-4AD7-BB4B-A47EABC6B628/WebDriverAgentRunner-D8D80355-9303-4267-BBBC-AA66E240F468/Session-WebDriverAgentRunner-2021-05-12\_140735-YOpZwe.log 2021-05-12 14:07:35.539 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: (BBAF54B9-ABD5-48C4-840C-8256F39825E2) Beginning test session WebDriverAgentRunner-BBAF54B9-ABD5-48C4-840C-8256F39825E2 at 2021-05-12 14:07:35.538 with Xcode 12D4e on target 📱\<DVTiOSDevice (0x7ff387787650), Shoprite’s iPhone, iPhone, 14.4 (18D52), 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525\> { deviceSerialNumber: F71Y6ZSRHG7F identifier: 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525 deviceClass: iPhone deviceName: Shoprite’s iPhone deviceIdentifier: 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525 productVersion: 14.4 buildVersion: 18D52 deviceSoftwareVersion: 14.4 (18D52) deviceArchitecture: arm64 deviceTotalCapacity: 25221414912 deviceAvailableCapacity: 14180786176 deviceIsTransient: NO ignored: NO deviceIsBusy: NO deviceIsPaired: YES deviceIsActivated: YES deviceActivationState: Activated isPasscodeLocked: NO deviceType: \<DVTDeviceType:0x7ff3844faa90 Xcode.DeviceType.iPhone\> supportedDeviceFamilies: ( 1 ) applications: (null) provisioningProfiles: (null) hasInternalSupport: NO hasWritableSystem: NO isSupportedOS: YES bootArgs: (null) nextBootArgs: (null) connected: YES isWirelessEnabled: NO connectionType: direct hostname: Shoprites-iPhone.local. bonjourServiceName: e8:36:17:26:6e:94@fe80::ea36:17ff:fe26:6e94.\_apple-mobdev2.\_tcp.local. activeProxiedDevice: (null) } (14.4 (18D52)) 2021-05-12 14:07:35.653 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: (BBAF54B9-ABD5-48C4-840C-8256F39825E2) Finished requesting crash reports. Continuing with testing. \*\*\* If you believe this error represents a bug, please attach the result bundle at /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult 2021-05-12 14:07:35.677 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: 0.144 elapsed – Testing started completed. 2021-05-12 14:07:35.677 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec – start 2021-05-12 14:07:35.677 xcodebuild[78359:12003759] [MT] IDETestOperationsObserverDebug: 0.144 sec, +0.144 sec – end Test session results, code coverage, and logs: /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult Testing failed: Signing for “WebDriverAgentRunner” requires a development team. Select a development team in the Signing & Capabilities editor. WebDriverAgentRunner: WebDriverAgentRunner-Runner.app encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-07-35-+0200.xcresult. (Underlying Error: The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file. The file doesn’t exist. (Underlying Error: The operation couldn’t be completed. No such file or directory))) \*\* TEST EXECUTE FAILED \*\* Testing started. Make sure you follow the tutorial at [https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md](https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md). Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.

---

<div class="post-metadata">

**Author:** ![Rana](https://discuss.appium.io/user_avatar/discuss.appium.io/rana/32/8822_2.png) [@Rana](https://discuss.appium.io/u/Rana)\
**Post date:** [May 12, 2021, 12:17pm UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/25 "2021-05-12T12:17:53Z")

</div>

i am getting this bro…it could be certificate issue as well? what must. i ask the developer?  
An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message: 2021-05-12 14:17:41.905 xcodebuild[78759:12012639] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 “The folder “WebDriverAgentRunner\_iphoneos14.4-arm64.xctestrun” doesn’t exist.” UserInfo={NSFilePath=/Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Build/Products/WebDriverAgentRunner\_iphoneos14.4-arm64.xctestrun, NSUserStringVariant=Folder, NSUnderlyingError=0x7fd411cbe290 {Error Domain=NSPOSIXErrorDomain Code=2 “No such file or directory”}} \*\* TEST BUILD FAILED \*\* 2021-05-12 14:17:41.918 xcodebuild[78759:12012633] IDETestOperationsObserverDebug: Writing diagnostic log for test session to: /Users/dautomation/Library/Developer/Xcode/DerivedData/WebDriverAgent-alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test-WebDriverAgentRunner-2021.05.12\_14-17-41-+0200.xcresult/Staging/2\_Test/Diagnostics/WebDriverAgentRunner-EE13EC9D-8292-453C-8AA9-CDB26278092F/WebDriverAgentRunner-8F6BFC69-CCDA-4A9F-9D3D-95B35459D636/Session-WebDriverAgentRunner-2021-05-12\_141741-EDZyyy.log 2021-05-12 14:17:41.919 xcodebuild[78759:12012566] [MT] IDETestOperationsObserverDebug: (7C7FECA3-7291-4178-8B2C-4303385E0C15) Beginning test session WebDriverAgentRunner-7C7FECA3-7291-4178-8B2C-4303385E0C15 at 2021-05-12 14:17:41.919 with Xcode 12D4e on target 📱\<DVTiOSDevice (0x7fd41247ac50), Shoprite’s iPhone, iPhone, 14.4 (18D52), 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525\> { deviceSerialNumber: F71Y6ZSRHG7F identifier: 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525 deviceClass: iPhone deviceName: Shoprite’s iPhone deviceIdentifier: 36408a21f5fd8a5e8a06f210fcfb6ad4890e8525 productVersion: 14.4 buildVersion: 18D52 deviceSoftwareVersion: 14.4 (18D52) deviceArchitecture: arm64 deviceTotalCapacity: 25221414912 deviceAvailableCapacity: 14177947648 deviceIsTransient: NO ignored: NO deviceIsBusy: NO deviceIsPaired: YES deviceIsActivated: YES deviceActivationState: Activated isPasscodeLocked: NO deviceType: \<DVTDeviceType:0x7fd40fdf4750 Xcode.DeviceType.iPhone\> supportedDeviceFamilies: ( 1 ) applications: (null) provisioningProfiles: (null) hasInternalSupport: NO hasWritableSystem: NO isSupportedOS: YES bootArgs: (null) nextBootArgs: (null) connected: YES isWirelessEnabled: NO connectionType: direct hostname: Shoprites-iPhone.local. bonjourServiceName: e8:36:17:26:6e:94@fe80::ea36:17ff:fe26:6e94.\_apple-mobdev2.\_tcp.local. activeProxiedDevice: (null) } (14.4 (18D52)) 2021-05-12 14:17:42.026 xcodebuild[78759:12012566] [MT] IDETestOperationsObserverDebug: (7C7FECA3-7291-4178-8B2C-4303385E0C15) Finished requesting crash re

---

<div class="post-metadata">

**Author:** ![Baala](https://discuss.appium.io/user_avatar/discuss.appium.io/baala/32/7401_2.png) [@Baala](https://discuss.appium.io/u/Baala)\
**Post date:** [June 23, 2023, 6:04am UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/26 "2023-06-23T06:04:39Z")

</div>

xCode Version 13.4.1 + Appium 1.22 with this version configuration it worked for me. This looks to be compatibility issue need to try out with different xcode and appium versions

---

<div class="post-metadata">

**Author:** ![Boaz\_Lupu](https://discuss.appium.io/user_avatar/discuss.appium.io/boaz_lupu/32/11693_2.png) [@Boaz\_Lupu](https://discuss.appium.io/u/Boaz_Lupu)\
**Post date:** [August 7, 2023, 7:00am UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/27 "2023-08-07T07:00:55Z")

</div>

Hey guys,

I’m new here, I’m using the Appium inspector and appium server (2.0.1), and when trying to load the app using an iPhone 14 Pro simulator I’m getting this error:

“Failed to create session. An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message:”

The thing is, the seems to be installed on the simulator and then Im getting this error

This is my Setup:

 ![image](https://discuss.appium.io/uploads/default/original/2X/e/e16844c78e44ea51d2cfe883b41dbc7d17c89af7.png)

---

<div class="post-metadata">

**Author:** ![Markos](https://discuss.appium.io/user_avatar/discuss.appium.io/markos/32/12060_2.png) [@Markos](https://discuss.appium.io/u/Markos)\
**Post date:** [February 6, 2024, 1:41am UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/28 "2024-02-06T01:41:15Z")

</div>

I am having this problem also. My version of Xcode is…

```auto
% xcrun --version
xcrun version 67.
% xcode-select -v
xcode-select version 2405.

```

Also reading this tip sheet: [https://medium.com/tauk-blog/setup-guide-for-appium-real-ios-device-e35eabbf630e](https://medium.com/tauk-blog/setup-guide-for-appium-real-ios-device-e35eabbf630e)

---

<div class="post-metadata">

**Author:** ![Sergii](https://discuss.appium.io/user_avatar/discuss.appium.io/sergii/32/12594_2.png) [@Sergii](https://discuss.appium.io/u/Sergii)\
**Post date:** [February 26, 2024, 7:48pm UTC](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332/29 "2024-02-26T19:48:41Z")

</div>

try updating appium [How To Upgrade Appium - GeeksforGeeks](https://www.geeksforgeeks.org/how-to-upgrade-appium/)

[Previous page](https://discuss.appium.io/t/unable-to-launch-webdriveragent-because-of-xcodebuild-failure-xcodebuild-failed-with-code-65/19332.md?page=1)
