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

Hi I am having this issue that when i try to use spy mobile feature on the IOS mobile phone, while installing the app into the phone, the “Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65” error message will jump out

Full Details:
java.util.concurrent.ExecutionException: org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: 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:
. Make sure you follow the tutorial at 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.
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘richard-lum-mac.zii.lan’, ip: ‘192.168.237.97’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.5’, java.version: ‘1.8.0_181’
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: 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:
. Make sure you follow the tutorial at 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.
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:381:37)
at runNextTicks (internal/process/task_queues.js:58:5)
at processImmediate (internal/timers.js:434:9)
Build info: version: ‘unknown’, revision: ‘unknown’, time: ‘unknown’
System info: host: ‘richard-lum-mac.zii.lan’, ip: ‘192.168.237.97’, os.name: ‘Mac OS X’, os.arch: ‘x86_64’, os.version: ‘10.15.5’, java.version: ‘1.8.0_181’
Driver info: driver.version: IOSDriver

I am using MacBook, trial version of Katalon. My Xcode build successfully without error message, auto manage signing is done. I tried all the solution i can find online, i still can’t solve this issue, the last one i found in this website about this issue is at OCT 2019, and without a working solution.

Other information:

  1. MacBook Ver: Catalina 10.15.5
    IOS: Iphone 7 (ver 14.1)
    Katalon Ver: 7.7.2
    Xcode Ver: Version 12.1 (12A7403)

2)xcode won’t install webdriveragent in my phone and show xcodebuild error when i try use xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination ‘id=’ test in terminal (i am putting my UDID inside the bracket)

3)When i try to use Xcode to install the test app in “Device and Simulator”, it will failed with an error message “Unable to install XXX”

4)The app i used is the same version between Mac and IOS, but one is from developer, one is from App Store. I already install the app inside my phone through App Store before running the Katalon.

I can provide more info if needed. Thank anyone for helping.

Hi @dansemacabre0320,

Please follow this instruction video to install WebDriverAgent:

This is the current situation i am in:

Step:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=******** test

Result:
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=bc77bedc1ae1f7b8cfcfcc153f66fc1e9b3ec400 test

2020-10-26 16:04:31.775 xcodebuild[3450:176736] DTDeviceKit: deviceType from bc77bedc1ae1f7b8cfcfcc153f66fc1e9b3ec400 was NULL

2020-10-26 16:04:31.918 xcodebuild[3450:176774] DTDeviceKit: deviceType from bc77bedc1ae1f7b8cfcfcc153f66fc1e9b3ec400 was NULL

2020-10-26 16:04:31.918 xcodebuild[3450:176774] DTDeviceKit: deviceType from bc77bedc1ae1f7b8cfcfcc153f66fc1e9b3ec400 was NULL

note: Using new build system

note: Building targets in parallel

note: Planning build

note: Constructing build description

error: No profiles for ‘com.creative.WebDriverAgent.xctrunner’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘com.creative.WebDriverAgent.xctrunner’. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target ‘WebDriverAgentRunner’ from project ‘WebDriverAgent’)

Test session results, code coverage, and logs:

/var/root/Library/Developer/Xcode/DerivedData/WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu/Logs/Test/Test-WebDriverAgentRunner-2020.10.26_16-04-33-+0800.xcresult

Testing failed:

No profiles for ‘com.creative.WebDriverAgent.xctrunner’ were found: Xcode couldn’t find any iOS App Development provisioning profiles matching ‘com.creative.WebDriverAgent.xctrunner’. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.

Testing cancelled because the build failed.

**** TEST FAILED ****

HI @dansemacabre0320

Did you follow the steps in the above video? Do you have an Apple developer account to build WebDriverAgent?

Same issue when attempting to simulate on my connected iPhone.

Following your video this is what I get