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

4.9k Views Asked by At

I'm new to ios appium and trying to use appium for app testing which i did not have the source code nor ios developer account, the app is downloaded from crashlytics.

I've tried to modify the certificate for webdriveragent with my personal account but failed. And i saw the document from appium that i should able to use appium with only "app" or "bundleid" capability so i tried to remove the "app" then got another err. Please advise, thank you in advance.

My capabilities set as below

capabilities['platformName'] = 'iOS'
capabilities['automationName'] = 'XCUITest'
capabilities['platformVersion'] = '11.4'
capabilities['deviceName'] = 'iPhone X'
capabilities['udid'] = 'my phone'
capabilities['bindleId'] = 'app.bundleId'
capabilities['app'] = '/pathtomyapp'

Appium log output

selenium.common.exceptions.WebDriverException 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".

If I remove the "app" from capablities then I get following error

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: The desired capabilities must include either an app or a bundleId for iOS

2

There are 2 best solutions below

1
On

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

a very comprehensive tutorial how to deal with your problem, you are missing

desired_caps['xcodeOrgId'] = 'YOURDEVID'
desired_caps['xcodeSigningId'] = "iPhone Developer"
0
On

I believe that this error normally happens because the wda is in the wrong directory. Which version of appium is this? If it's above 1.7.2 then you'll need to add the capabilities usePrebuiltWDA set to true and derivedDataPath set to the path of the derived data folder of the wda.

https://github.com/appium/appium-xcuitest-driver/blob/master/README.md

Hth

James