Unable to launch WebDriverAgent because of xcodebuild failure: spawn EACCES
See original GitHub issueThe problem
Unable to launch WebDriverAgent because of xcodebuild failure: spawn EACCES is thrown when I’m running tests on the appium server installed using npm. However, when I start the appium server from Applications/Appium.app my tests work just fine.
Environment
- Appium version (or git revision) that exhibits the issue: 1.6.5 (both app and cli)
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: macOS 10.12.6
- Node.js version (unless using Appium.app|exe): 5.4.0
- Mobile platform/version under test: ios 10.3.1
- Real device or emulator/simulator: simulator iPhone 7 Plus
- Appium CLI or Appium.app|exe: both
- Xcode version: 8.3.3 (8E3004b)
Details
My installation steps:
brew install carthage
npm install -g appium
npm install -g authorize-ios
sudo authorize-ios
requirements.txt:
Appium-Python-Client==0.24
pytest==3.2.1
selenium==3.3.1
Also, I have automatic code signing in Xcode and Code Signing Identity: iOS Developer
Link to Appium logs
when starting from cli: https://gist.github.com/alexbuicescu/0a090fe5d351fb7fbf5d1eff001bd623 when starting from app: https://gist.github.com/alexbuicescu/daf241ee57d7af6e3a26294f9826c1bd
Code To Reproduce Issue
Start appium server:
appium --webdriveragent-port 8100 -bp 4724 --selendroid-port 8080 --port 4723
Some relevant python code
from appium import webdriver
import os
app = os.path.abspath('ios/build/Build/Products/Debug-iphonesimulator/yourAppNameHere.app')
self.driver = webdriver.Remote(
command_executor='http://127.0.0.1:4723/wd/hub',
desired_capabilities={
'app': app,
'platformName': 'iOS',
'platformVersion': '10.3',
'deviceName': 'iPhone 7 Plus',
'autoAcceptAlerts': True,
'autoGrantPermissions': True,
}
)
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
Unable to launch WebDriverAgent because of xcodebuild failure
An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: ...
Read more >Appium error [resolved] - Unable to launch WebDriverAgent ...
Most of times, if you have setup ios for appium tests, you might get error “Unable to launch WebDriverAgent because of xcodebuild failure: ......
Read more >Unable to launch WebDriverAgent because of xcodebuild failure
Solution that helped me, hope will solve your problem: find out where web-driver-agent was installed on your machine (e.g. ...
Read more >appium-xcuitest-driver - npm
It can cause a Failed to receive any data within the timeout error in appium-ios-device. Please read this issue for more details.
Read more >How to fix this Error: spawn EACCES - Edward Beazer Blog
This error comes up when you don't have full permissions to the project folder. You want to run the chmod command in order...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This happened to me on 2 different machines after upgrading appium versions. The fix I found was to uninstall and reinstall node (and appium then). My node installation is managed by Homebrew if that matters. Posting here in case someone else is affected.
Looks like the problem with the wrong simulator was because I started appium using sudo. And looks like the problem is solved. I tested the following:
This:
And this:
And both of these worked. So my guess is that
sudo chown -R $USER /usr/local
was enough to solve the problem. I’ll close this issue and thank you.