0

I am using webdriver.IO together with Appium to test an iOS hybrid App.

I get the following error before each test when it tries to spin up the iOS App:

Unable to launch WebDriverAgent because of xcodebuild failure: "Command 'Scripts/bootstrap.sh -d' exited with code 1"."

Here are the logs:

[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event 'appInstalled' logged at 1545635044697 (02:04:04 GMT-0500 (Eastern Standard Time))
[XCUITest] Using WDA path: '/Users/MY_USER_NAME/Documents/CODE/ACTIVE/APPIUM/asialgearoid/mine2/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Users/MY_USER_NAME/Documents/CODE/ACTIVE/APPIUM/asialgearoid/mine2/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[debug] [XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[debug] [JSONWP Proxy] Matched '/status' to command name 'getStatus'
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Got an unexpected response: {"errno":"ECONNREFUSED","code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":8100}
[debug] [XCUITest] WDA is not listening at 'http://localhost:8100/'
[debug] [XCUITest] WDA is currently not running. There is nothing to cache
[debug] [XCUITest] Trying to start WebDriverAgent 2 times with 10000ms interval
[debug] [BaseDriver] Event 'wdaStartAttempted' logged at 1545635044905 (02:04:04 GMT-0500 (Eastern Standard Time))
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: '/Users/MY_USER_NAME/Documents/CODE/ACTIVE/APPIUM/asialgearoid/mine2/node_modules/.bin/carthage'
[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] [1mFetching dependencies
[XCUITest] Error: Command "bootstrap" does not exist.
...
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1545635057640 (02:04:17 GMT-0500 (Eastern Standard Time))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "Command 'Scripts/bootstrap.sh -d' exited with code 1".

Any idea of how to solve?


After further digging I found out how to reproduce the error:

$ cd /myTestingProject/node_modules/appium-xcuitest-driver/WebDriverAgent
$ ./Scripts/bootstrap.sh

Output:

Fetching dependencies Error: Command "bootstrap" does not exist.

Gabe
  • 5,997
  • 5
  • 46
  • 92
  • PS. I solved in this way: https://github.com/appium/appium/issues/9344#issuecomment-449702706 – Gabe Dec 24 '18 at 08:33

1 Answers1

0

I do not know if this was your problem at the time of writing, but I had this same issue and looked up the latest update documentation. The file bootstrap.sh has been changed to build.sh

This works for me:

cd /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
./Scripts/build.sh -d

I tested by wiping my simulator so I could test this with a completely clean slate. I ran the above commands, relaunched the simulator, dropped a .app file onto the simulator, and the WebDriverAgent installed completely fine without any manual work opening Xcode.

Psyduck
  • 3
  • 2