How to fix the error Appium “xcodebuild failed with code 65”
One day, you’ll be able to use Appium to execute iOS automation, but one day, something will cause an error on your computer that looks like this.
“WebDriverException: Message: 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”
Check your Xcode first, and see whether you have already signed the condition. then try running again, however, if there is still an issue, I believe the Appium server is responsible for it.
What do you need to do next? The steps below can be followed.
- npm uninstall -g appium
npm uninstall -g appium
2. Using the commands appium -v or which appium, verify that your laptop no longer contains Appium.
appium -v
3. Install new Appium.
npm install -g appium@next
3. Check Appium is ready to use
appium -v
Or
which appium
4. If nothing appears regarding your appium, simply set a local path and use the command.
ln -fs /Users/cto/.npm-global/lib/node_modules/appium/build/lib/main.js /usr/local/bin/appium
chmod +x /usr/local/bin/appium
5. If you need to install appium-doctor also can set local path with this command
sudo ln -s /Users/cto/.npm-global/lib/node_modules/appium-doctor/appium-doctor.js
chmod +x /usr/local/bin/appium-doctor
6. Everything should be alright if you run the command appium -v or which Appium again.
7. Run Appium then try to run inspector
8. Finally, you can run WebdriverAgent
I’m hoping this topic would be helpful to you if you have similar issues to mine. :)