title: Appium - Unable to launch WebDriverAgent because of xcodebuild failure: Scripts/bootstrap.sh code 1
body: <p>I am using webdriver.IO together with Appium to test an iOS hybrid App. </p>
  
  <p>I get the following error before each test when it tries to spin up the iOS App:</p>
  
  <blockquote>
    <p>Unable to launch WebDriverAgent because of xcodebuild failure: "Command 'Scripts/bootstrap.sh -d' exited with code 1"."</p>
  </blockquote>
  
  <p>Here are the logs:</p>
  
  <pre><code>[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".
  </code></pre>
  
  <p><strong>Any idea of how to solve?</strong></p>
  
  <hr>
  
  <p>After further digging I found out how to reproduce the error:</p>
  
  <pre><code>$ cd /myTestingProject/node_modules/appium-xcuitest-driver/WebDriverAgent
  $ ./Scripts/bootstrap.sh
  </code></pre>
  
  <p>Output:</p>
  
  <blockquote>
    <p>Fetching dependencies
    Error: Command "bootstrap" does not exist.</p>
  </blockquote>