question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to launch WebDriverAgent because of xcodebuild failure: spawn EACCES

See original GitHub issue

The 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:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
jamesvanhorncommented, Sep 6, 2017

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.

1reaction
0x2539commented, Sep 5, 2017

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:

  1. This:

    sudo chown -R $USER /usr/local
    sudo npm install -g appium
    appium --webdriveragent-port 8100 -bp 4724 --selendroid-port 8080 --port 4723
    
  2. And this:

    sudo chown -R $USER /usr/local
    npm install -g appium  # notice the missing of sudo here
    appium --webdriveragent-port 8100 -bp 4724 --selendroid-port 8080 --port 4723
    

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found