iOS app fail on Bootstrapper

Hello guys,

I have a problem with running Appium inspector on my iOS simulator. First I tried my app, but then I tried the ios-test-app and encounter the same problem. It always failing with:
Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”.

The app is installed on the device, but I would like to inspect the app.

This is my capabilities:
{
“platformName”: “iOS”,
“platformVersion”: “11.1”,
“deviceName”: “iPad Air”,
“app”: “/Users/ME/Downloads/TestApp-iphonesimulator.app”,
“automationName”: “XCUITest”,
“orientation”: “LANDSCAPE”
}

I am using xCode 9.1 and Appium 1.7.1

[info] [Appium] Welcome to Appium v1.7.1
[info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] → GET /wd/hub/sessions {}
[debug] [MJSONWP] Calling AppiumDriver.getSessions() with args:
[debug] [MJSONWP] Responding to client with driver.getSessions() result:
[info] [HTTP] ← GET /wd/hub/sessions 200 8 ms - 40 [info] [HTTP] → POST /wd/hub/session {“desiredCapabilities”:{“app”:“/Users/jk185158/Downloads/TestApp-iphonesimulator.app”,“automationName”:“XCUITest”,“deviceName”:“iPad Air”,“orientation”:“LANDSCAPE”,“platformName”:“iOS”,“platformVersion”:“11.1”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:“/Users/jk185158/Downloads/TestApp-iphonesimulator.app”,“automationName”:“XCUITest”,“deviceName”:“iPad Air”,“orientation”:“LANDSCAPE”,“platformName”:“iOS”,“platformVersion”:“11.1”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1510319806069 (14:16:46 GMT+0100 (CET))
[info] [Appium] Creating new XCUITestDriver (v2.51.1) session
[info] [Appium] Capabilities:
[info] [Appium] app: ‘/Users/jk185158/Downloads/TestApp-iphonesimulator.app’
[info] [Appium] automationName: ‘XCUITest’
[info] [Appium] deviceName: ‘iPad Air’
[info] [Appium] orientation: ‘LANDSCAPE’
[info] [Appium] platformName: ‘iOS’
[info] [Appium] platformVersion: ‘11.1’
[info] [Appium] newCommandTimeout: 0
[info] [Appium] connectHardwareKeyboard: true
[info] [BaseDriver] Session created with session id: 7e80b555-9490-4903-8697-4da08df09661[debug] [XCUITest] Xcode version set to ‘9.1’ (tools v9.0.1.0.1.1506734476)
[debug] [XCUITest] iOS SDK Version set to ‘11.1’
[debug] [BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1510319806181 (14:16:46 GMT+0100 (CET))[info] [iOSSim] Constructing iOS simulator for Xcode version 9.1 with udid ‘8E14E766-561C-4C83-84BE-CF654A1B1C0E’
[info] [XCUITest] Determining device to run tests on: udid: ‘8E14E766-561C-4C83-84BE-CF654A1B1C0E’, real device: false
[info] [BaseDriver] Using local app ‘/Users/jk185158/Downloads/TestApp-iphonesimulator.app’
[debug] [BaseDriver] Event ‘appConfigured’ logged at 1510319806663 (14:16:46 GMT+0100 (CET))
[debug] [XCUITest] Checking whether app ‘/Users/jk185158/Downloads/TestApp-iphonesimulator.app’ is actually present on file system
[debug] [XCUITest] App is present
[debug] [iOS] Getting bundle ID from app ‘/Users/jk185158/Downloads/TestApp-iphonesimulator.app’: ‘io.appium.TestApp’
[debug] [BaseDriver] Event ‘resetStarted’ logged at 1510319806667 (14:16:46 GMT+0100 (CET))[info] [XCUITest] Not scrubbing third party app in anticipation of uninstall
[debug] [BaseDriver] Event ‘resetComplete’ logged at 1510319806999 (14:16:46 GMT+0100 (CET))[debug] [iOSLog] Starting iOS 11.1 simulator log capture
[debug] [iOSLog] System log path: /Users/jk185158/Library/Logs/CoreSimulator/8E14E766-561C-4C83-84BE-CF654A1B1C0E/system.log
[debug] [BaseDriver] Event ‘logCaptureStarted’ logged at 1510319807275 (14:16:47 GMT+0100 (CET))
[info] [XCUITest] Setting up simulator
[debug] [iOS] No reason to set locale
[debug] [iOS] No iOS / app preferences to set[debug] [iOSSim] Setting preferences of 8E14E766-561C-4C83-84BE-CF654A1B1C0E Simulator to {“SimulatorWindowOrientation”:“LandscapeLeft”,“SimulatorWindowRotationAngle”:90}
[debug] [iOSSim] Setting common Simulator preferences to {“ConnectHardwareKeyboard”:true}
[debug] [iOSSim] Updated shared Simulator preferences at ‘/Users/jk185158/Library/Preferences/com.apple.iphonesimulator.plist’ with {“DevicePreferences”:{“8E14E766-561C-4C83-84BE-CF654A1B1C0E”:{“SimulatorWindowOrientation”:“LandscapeLeft”,“SimulatorWindowRotationAngle”:90}},“ConnectHardwareKeyboard”:true}[debug] [iOSSim] The count of running Simulator UI client instances is 1
[info] [iOSSim] Both Simulator with UDID 8E14E766-561C-4C83-84BE-CF654A1B1C0E and the UI client are currently running
[debug] [BaseDriver] Event ‘simStarted’ logged at 1510319808091 (14:16:48 GMT+0100 (CET))[debug] [XCUITest] Reset requested. Removing app with id ‘io.appium.TestApp’ from the device[debug] [XCUITest] Installing ‘/Users/jk185158/Downloads/TestApp-iphonesimulator.app’ on Simulator with UUID ‘8E14E766-561C-4C83-84BE-CF654A1B1C0E’…[debug] [XCUITest] The app has been installed successfully.
[debug] [BaseDriver] Event ‘appInstalled’ logged at 1510319811405 (14:16:51 GMT+0100 (CET))
[info] [XCUITest] Using WDA path: ‘/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[info] [XCUITest] Using WDA agent: ‘/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[debug] [XCUITest] Capability ‘useNewWDA’ set to false, so trying to reuse currently running WDA instance at ‘http://localhost:8100/
[debug] [JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body[error] [XCUITest] e[1mFetching dependencies
[error] [XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[error] [XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[error] [XCUITest] “Failed to write to /private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=642 “You can’t save the file “iOS” because the volume is read only.” UserInfo={NSFilePath=/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7fc26fc303f0 {Error Domain=NSPOSIXErrorDomain Code=30 “Read-only file system”}}”
[error] [XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[error] [XCUITest] Failed to check out repository into /private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer: Could not create working directory (Error Domain=NSCocoaErrorDomain Code=642 “You can’t save the file “RoutingHTTPServer” because the volume is read only.” UserInfo={NSFilePath=/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7fc26fe508b0 {Error Domain=NSPOSIXErrorDomain Code=30 “Read-only file system”}})
[debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1510319815302 (14:16:55 GMT+0100 (CET))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[info] [XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device[debug] [BaseDriver] Event ‘wdaStartAttempted’ logged at 1510319826501 (14:17:06 GMT+0100 (CET))
[info] [XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[debug] [XCUITest] Running WebDriverAgent bootstrap script to install dependencies[error] [XCUITest] e[1mFetching dependencies
[error] [XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[error] [XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[error] [XCUITest] “Failed to write to /private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=642 “You can’t save the file “iOS” because the volume is read only.” UserInfo={NSFilePath=/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7ff66b409960 {Error Domain=NSPOSIXErrorDomain Code=30 “Read-only file system”}}”
[error] [XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[error] [XCUITest] Failed to check out repository into /private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer: Could not create working directory (Error Domain=NSCocoaErrorDomain Code=642 “You can’t save the file “RoutingHTTPServer” because the volume is read only.” UserInfo={NSFilePath=/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7ff66d209130 {Error Domain=NSPOSIXErrorDomain Code=30 “Read-only file system”}})
[debug] [BaseDriver] Event ‘wdaStartFailed’ logged at 1510319827410 (14:17:07 GMT+0100 (CET))
[debug] [XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”.
[debug] [XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[info] [XCUITest] Shutting down sub-processes
[debug] [XCUITest] Removing WDA application from device[error] [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”.
at XCUITestDriver.quitAndUninstall$ (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”.
at XCUITestDriver.quitAndUninstall$ (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[debug] [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[debug] [iOSLog] Stopping iOS log capture
[error] [MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”.
at XCUITestDriver.quitAndUninstall$ (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:381:13)
at tryCatch (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/private/var/folders/ng/wgtpmp3s29d87xsgrk7vwxg4nzjz_t/T/AppTranslocation/1285E3E6-0A6F-4336-AD76-D7993AC4469B/d/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at process._tickCallback (internal/process/next_tick.js:103:7)
[info] [HTTP] ← POST /wd/hub/session 500 32552 ms - 257

Any idea?

There is a chance that carthage is out of date

brew uninstall -g carthage
brew install carthage

Then force the sym links to overwrite the bad link –

brew link --overwrite carthage