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

[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 17 ms - 40
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/gateway/desktop/IntegrationApp.app",“autoGrantPermissions”:“true”,“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platform”:“ios”,“platformName”:“ios”,“platformVersion”:“10.3”,“udid”:“b84a97b33c516abca11aae5d10db4521bb23ab61”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/gateway/desktop/IntegrationApp.app",“autoGrantPermissions”:“true”,“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platform”:“ios”,“platformName”:“ios”,“platformVersion”:“10.3”,“udid”:“b84a97b33c516abca11aae5d10db4521bb23ab61”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1499678268900 (14:47:48 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] app: ‘/Users/gateway/desktop/IntegrationApp.app’
[Appium] autoGrantPermissions: ‘true’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iphone Simulator’
[Appium] platform: ‘ios’
[Appium] platformName: ‘ios’
[Appium] platformVersion: ‘10.3’
[Appium] udid: ‘b84a97b33c516abca11aae5d10db4521bb23ab61’
[Appium] xcodeOrgId: ‘GQ2C5GKWJ2’
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoGrantPermissions, platform.
[BaseDriver] Session created with session id: f375d837-91ff-4fcf-ae44-ef8f64c719f3
[XCUITest] Xcode version set to ‘8.3.3’
[XCUITest] iOS SDK Version set to ‘10.3’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1499678272827 (14:47:52 GMT+0530 (IST))
[XCUITest] Changing deviceName from ‘iphone Simulator’ to ‘iPhone 6’
[XCUITest] Available devices:
[XCUITest] Error: Unknown device or simulator UDID: ‘b84a97b33c516abca11aae5d10db4521bb23ab61’
at XCUITestDriver.determineDevice$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:604:17)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unknown device or simulator UDID: ‘b84a97b33c516abca11aae5d10db4521bb23ab61’
at XCUITestDriver.determineDevice$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:604:17)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[MJSONWP] Encountered internal error running command: Error: Unknown device or simulator UDID: ‘b84a97b33c516abca11aae5d10db4521bb23ab61’
at XCUITestDriver.determineDevice$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:604:17)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 5162 ms - 213
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/gateway/desktop/IntegrationApp.app",“autoGrantPermissions”:“true”,“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platform”:“ios”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/gateway/desktop/IntegrationApp.app",“autoGrantPermissions”:“true”,“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platform”:“ios”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1499678282366 (14:48:02 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] app: ‘/Users/gateway/desktop/IntegrationApp.app’
[Appium] autoGrantPermissions: ‘true’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iphone Simulator’
[Appium] platform: ‘ios’
[Appium] platformName: ‘ios’
[Appium] platformVersion: ‘10.3’
[Appium] xcodeOrgId: ‘GQ2C5GKWJ2’
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoGrantPermissions, platform.
[BaseDriver] Session created with session id: 288c2e64-3413-41c8-9d76-b06a65b4a8c8
[XCUITest] Xcode version set to ‘8.3.3’
[XCUITest] iOS SDK Version set to ‘10.3’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1499678282769 (14:48:02 GMT+0530 (IST))
[XCUITest] Changing deviceName from ‘iphone Simulator’ to ‘iPhone 6’
[iOSSim] Constructing iOS simulator for Xcode version 8.3.3 with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’
[XCUITest] Determining device to run tests on: udid: ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’, real device: false
[BaseDriver] Using local app ‘/Users/gateway/desktop/IntegrationApp.app’
[BaseDriver] Event ‘appConfigured’ logged at 1499678283535 (14:48:03 GMT+0530 (IST))
[XCUITest] Checking whether app ‘/Users/gateway/desktop/IntegrationApp.app’ is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app ‘/Users/gateway/desktop/IntegrationApp.app’: ‘com.facebooks.IntegrationsApps’
[XCUITest] Setting ‘connectHardwareKeyboard’ Simulator option to ‘on’
[BaseDriver] Event ‘resetStarted’ logged at 1499678283568 (14:48:03 GMT+0530 (IST))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[BaseDriver] Event ‘resetComplete’ logged at 1499678284093 (14:48:04 GMT+0530 (IST))
[iOSLog] Starting iOS 10.3 simulator log capture
[iOSLog] System log path: /Users/gateway/Library/Logs/CoreSimulator/553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D/system.log
[BaseDriver] Event ‘logCaptureStarted’ logged at 1499678284445 (14:48:04 GMT+0530 (IST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[XCUITest] Simulator with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’ already booted
[BaseDriver] Event ‘simStarted’ logged at 1499678284998 (14:48:04 GMT+0530 (IST))
[XCUITest] Reset requested. Removing app with id ‘com.facebooks.IntegrationsApps’ from the device
[XCUITest] Installing /Users/gateway/desktop/IntegrationApp.app on Simulator with UUID ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’…
[XCUITest] The app has been installed successfully.
[BaseDriver] Event ‘appInstalled’ logged at 1499678292414 (14:48:12 GMT+0530 (IST))
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1499678292420 (14:48:12 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Fetching dependencies
[XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[XCUITest] “Failed to write to /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the file “iOS” in the folder “Build”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7ffd564daa60 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}}”
[XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] Failed to check out repository into /Volumes/DATA/Applications/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=513 “You don’t have permission to save the file “RoutingHTTPServer” in the folder “Checkouts”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7ffd565bd020 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[BaseDriver] Event ‘wdaStartFailed’ logged at 1499678297772 (14:48:17 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1499678308936 (14:48:28 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Fetching dependencies
[XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[XCUITest] “Failed to write to /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the file “iOS” in the folder “Build”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7fd3a0e0a4a0 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}}”
[XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] Failed to check out repository into /Volumes/DATA/Applications/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=513 “You don’t have permission to save the file “RoutingHTTPServer” in the folder “Checkouts”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7fd3a0ddfe00 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[BaseDriver] Event ‘wdaStartFailed’ logged at 1499678312111 (14:48:32 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
at XCUITestDriver.quitAndUninstall$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/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$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/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)
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[iOSLog] Stopping iOS log capture
[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$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/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)
[HTTP] <-- POST /wd/hub/session 500 40033 ms - 252

udid’s for Simulators always have dashes (‘-’) in them. You’ve given the name of a simulator but the udid is in the form of a real device. Use the following command in the Terminal program to get the real udid, or just don’t use that in your capabilities. I don’t believe it’s needed for simulators.

instruments -s devices

@wreed

Thanks for your help!!

It was my mistake to keep UDID in capabilities
Currently i am trying to run simulator with the following capabilities -
Still getting following error-
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 18 ms - 40
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/gateway/desktop/IntegrationApp.app",“autoGrantPermissions”:“true”,“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platform”:“ios”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/gateway/desktop/IntegrationApp.app",“autoGrantPermissions”:“true”,“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platform”:“ios”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1499839636310 (11:37:16 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] app: ‘/Users/gateway/desktop/IntegrationApp.app’
[Appium] autoGrantPermissions: ‘true’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iphone Simulator’
[Appium] platform: ‘ios’
[Appium] platformName: ‘ios’
[Appium] platformVersion: ‘10.3’
[Appium] xcodeOrgId: ‘GQ2C5GKWJ2’
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoGrantPermissions, platform.
[BaseDriver] Session created with session id: 1a3ce4ae-0dda-413d-9012-2081ec3c8f8f
[XCUITest] Xcode version set to ‘8.3.3’
[XCUITest] iOS SDK Version set to ‘10.3’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1499839640578 (11:37:20 GMT+0530 (IST))
[XCUITest] Changing deviceName from ‘iphone Simulator’ to ‘iPhone 6’
[iOSSim] Constructing iOS simulator for Xcode version 8.3.3 with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’
[XCUITest] Determining device to run tests on: udid: ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’, real device: false
[BaseDriver] Using local app ‘/Users/gateway/desktop/IntegrationApp.app’
[BaseDriver] Event ‘appConfigured’ logged at 1499839641740 (11:37:21 GMT+0530 (IST))
[XCUITest] Checking whether app ‘/Users/gateway/desktop/IntegrationApp.app’ is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app ‘/Users/gateway/desktop/IntegrationApp.app’: ‘com.facebooks.IntegrationsApps’
[XCUITest] Setting ‘connectHardwareKeyboard’ Simulator option to ‘on’
[BaseDriver] Event ‘resetStarted’ logged at 1499839641748 (11:37:21 GMT+0530 (IST))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[BaseDriver] Event ‘resetComplete’ logged at 1499839642383 (11:37:22 GMT+0530 (IST))
[iOSLog] Starting iOS 10.3 simulator log capture
[iOSLog] System log path: /Users/gateway/Library/Logs/CoreSimulator/553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D/system.log
[BaseDriver] Event ‘logCaptureStarted’ logged at 1499839642824 (11:37:22 GMT+0530 (IST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[XCUITest] Reset requested. Removing app with id ‘com.facebooks.IntegrationsApps’ from the device
[XCUITest] Simulator with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’ already booted
[BaseDriver] Event ‘simStarted’ logged at 1499839643347 (11:37:23 GMT+0530 (IST))
[XCUITest] Installing /Users/gateway/desktop/IntegrationApp.app on Simulator with UUID ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’…
[XCUITest] The app has been installed successfully.
[BaseDriver] Event ‘appInstalled’ logged at 1499839649693 (11:37:29 GMT+0530 (IST))
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1499839649699 (11:37:29 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Fetching dependencies
[XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[XCUITest] “Failed to write to /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the file “iOS” in the folder “Build”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7fbb245e8dc0 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}}”
[XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] Failed to check out repository into /Volumes/DATA/Applications/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=513 “You don’t have permission to save the file “RoutingHTTPServer” in the folder “Checkouts”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7fbb244e2860 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[BaseDriver] Event ‘wdaStartFailed’ logged at 1499839655120 (11:37:35 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1499839665637 (11:37:45 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Fetching dependencies
[XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[XCUITest] “Failed to write to /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the file “iOS” in the folder “Build”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7fa783dae850 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}}”
[XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] Failed to check out repository into /Volumes/DATA/Applications/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=513 “You don’t have permission to save the file “RoutingHTTPServer” in the folder “Checkouts”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7fa783d783f0 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[BaseDriver] Event ‘wdaStartFailed’ logged at 1499839668779 (11:37:48 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
at XCUITestDriver.quitAndUninstall$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
Error: Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
at XCUITestDriver.quitAndUninstall$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[iOSLog] Stopping iOS log capture
[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$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[HTTP] <-- POST /wd/hub/session 500 42851 ms - 252

@wreed:

If i enter ‘-’ in Devicename then i get error. Instead if we enter ‘Iphone Simulator’, can see the simulator up and running.
But above error still exist -Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1

This looks like the real error. Did you by chance install Appium using sudo?

I had not used sudo command to download Appium .
I am using Appium desktop

The problem still exist …
@Anyone : if you guys have any workaround pls let me know.

Can you try removing the following capabilities and retest?
autoGrantPermissions and platform.You already have platformName and platformVersion, so you don’t need platform.

Thanks for your help!!

have removed capabilities
still same issue…

[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 11 ms - 40
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/gateway/desktop/IntegrationApp.app",“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/gateway/desktop/IntegrationApp.app",“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1499938241650 (15:00:41 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] app: ‘/Users/gateway/desktop/IntegrationApp.app’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iphone Simulator’
[Appium] platformName: ‘ios’
[Appium] platformVersion: ‘10.3’
[Appium] xcodeOrgId: ‘GQ2C5GKWJ2’
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] Session created with session id: 0cf8fed1-18f8-4f7e-a9ff-8113842c4b24
[XCUITest] Xcode version set to ‘8.3.3’
[XCUITest] iOS SDK Version set to ‘10.3’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1499938245348 (15:00:45 GMT+0530 (IST))
[XCUITest] Changing deviceName from ‘iphone Simulator’ to ‘iPhone 6’
[iOSSim] Constructing iOS simulator for Xcode version 8.3.3 with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’
[XCUITest] Determining device to run tests on: udid: ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’, real device: false
[BaseDriver] Using local app ‘/Users/gateway/desktop/IntegrationApp.app’
[BaseDriver] Event ‘appConfigured’ logged at 1499938246373 (15:00:46 GMT+0530 (IST))
[XCUITest] Checking whether app ‘/Users/gateway/desktop/IntegrationApp.app’ is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app ‘/Users/gateway/desktop/IntegrationApp.app’: ‘com.facebooks.IntegrationsApps’
[XCUITest] Setting ‘connectHardwareKeyboard’ Simulator option to ‘on’
[BaseDriver] Event ‘resetStarted’ logged at 1499938246409 (15:00:46 GMT+0530 (IST))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[BaseDriver] Event ‘resetComplete’ logged at 1499938246833 (15:00:46 GMT+0530 (IST))
[iOSLog] Starting iOS 10.3 simulator log capture
[iOSLog] System log path: /Users/gateway/Library/Logs/CoreSimulator/553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D/system.log
[BaseDriver] Event ‘logCaptureStarted’ logged at 1499938247200 (15:00:47 GMT+0530 (IST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[XCUITest] Simulator with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’ already booted
[BaseDriver] Event ‘simStarted’ logged at 1499938247737 (15:00:47 GMT+0530 (IST))
[XCUITest] Reset requested. Removing app with id ‘com.facebooks.IntegrationsApps’ from the device
[XCUITest] Installing /Users/gateway/desktop/IntegrationApp.app on Simulator with UUID ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’…
[XCUITest] The app has been installed successfully.
[BaseDriver] Event ‘appInstalled’ logged at 1499938253881 (15:00:53 GMT+0530 (IST))
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1499938253887 (15:00:53 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Fetching dependencies
[XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[XCUITest] “Failed to write to /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the file “iOS” in the folder “Build”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7ff137dca4b0 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}}”
[XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] Failed to check out repository into /Volumes/DATA/Applications/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=513 “You don’t have permission to save the file “RoutingHTTPServer” in the folder “Checkouts”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7ff137dd7820 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[BaseDriver] Event ‘wdaStartFailed’ logged at 1499938259737 (15:00:59 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1499938270448 (15:01:10 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Running WebDriverAgent bootstrap script to install dependencies
[XCUITest] Fetching dependencies
[XCUITest] *** Downloading RoutingHTTPServer.framework binary at “v1.0.1”
[XCUITest] *** Skipped installing RoutingHTTPServer.framework binary due to the error:
[XCUITest] “Failed to write to /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the file “iOS” in the folder “Build”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7fb2cf4d4d40 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}}”
[XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] Failed to check out repository into /Volumes/DATA/Applications/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=513 “You don’t have permission to save the file “RoutingHTTPServer” in the folder “Checkouts”.” UserInfo={NSFilePath=/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7fb2cf4f38f0 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[BaseDriver] Event ‘wdaStartFailed’ logged at 1499938273281 (15:01:13 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: Command ‘Scripts/bootstrap.sh -d’ exited with code 1
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device

Are you running this from some kind of external drive? This path is really weird.

@wreed:Thanks for your reply
I had managed to overcome above issue by ensuring admin rights to my login.

but Now i am getting this error:
[Appium] Welcome to Appium v1.6.5
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> GET /wd/hub/sessions {}
[MJSONWP] Calling AppiumDriver.getSessions() with args: []
[MJSONWP] Responding to client with driver.getSessions() result: []
[HTTP] <-- GET /wd/hub/sessions 200 19 ms - 40
[HTTP] --> POST /wd/hub/session {“desiredCapabilities”:{“app”:"/Users/gateway/desktop/IntegrationApp.app",“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“xcodeSigningId”:“iphone Developer”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“app”:"/Users/gateway/desktop/IntegrationApp.app",“automationName”:“XCUITest”,“deviceName”:“iphone Simulator”,“platformName”:“ios”,“platformVersion”:“10.3”,“xcodeOrgId”:“GQ2C5GKWJ2”,“xcodeSigningId”:“iphone Developer”,“newCommandTimeout”:0,“connectHardwareKeyboard”:true},null,null]
[BaseDriver] Event ‘newSessionRequested’ logged at 1500534800198 (12:43:20 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.30.0) session
[Appium] Capabilities:
[Appium] app: ‘/Users/gateway/desktop/IntegrationApp.app’
[Appium] automationName: ‘XCUITest’
[Appium] deviceName: ‘iphone Simulator’
[Appium] platformName: ‘ios’
[Appium] platformVersion: ‘10.3’
[Appium] xcodeOrgId: ‘GQ2C5GKWJ2’
[Appium] xcodeSigningId: ‘iphone Developer’
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[XCUITest] XCUITestDriver version: 2.30.0
[BaseDriver] Session created with session id: 3d9cec21-4822-4bd6-b2f1-f2cf1ea5980c
[XCUITest] Xcode version set to ‘8.3.3’
[XCUITest] iOS SDK Version set to ‘10.3’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1500534804723 (12:43:24 GMT+0530 (IST))
[XCUITest] Changing deviceName from ‘iphone Simulator’ to ‘iPhone 6’
[iOSSim] Constructing iOS simulator for Xcode version 8.3.3 with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’
[XCUITest] Determining device to run tests on: udid: ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’, real device: false
[BaseDriver] Using local app ‘/Users/gateway/desktop/IntegrationApp.app’
[BaseDriver] Event ‘appConfigured’ logged at 1500534805493 (12:43:25 GMT+0530 (IST))
[XCUITest] Checking whether app ‘/Users/gateway/desktop/IntegrationApp.app’ is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app ‘/Users/gateway/desktop/IntegrationApp.app’: ‘com.facebooks.IntegrationsApps’
[XCUITest] Setting ‘connectHardwareKeyboard’ Simulator option to ‘on’
[BaseDriver] Event ‘resetStarted’ logged at 1500534805521 (12:43:25 GMT+0530 (IST))
[XCUITest] Not scrubbing third party app in anticipation of uninstall
[BaseDriver] Event ‘resetComplete’ logged at 1500534805811 (12:43:25 GMT+0530 (IST))
[iOSLog] Starting iOS 10.3 simulator log capture
[iOSLog] System log path: /Users/gateway/Library/Logs/CoreSimulator/553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D/system.log
[BaseDriver] Event ‘logCaptureStarted’ logged at 1500534806115 (12:43:26 GMT+0530 (IST))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[XCUITest] Simulator with udid ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’ already booted
[BaseDriver] Event ‘simStarted’ logged at 1500534806491 (12:43:26 GMT+0530 (IST))
[XCUITest] Reset requested. Removing app with id ‘com.facebooks.IntegrationsApps’ from the device
[XCUITest] Installing /Users/gateway/desktop/IntegrationApp.app on Simulator with UUID ‘553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D’…
[XCUITest] The app has been installed successfully.
[BaseDriver] Event ‘appInstalled’ logged at 1500534812421 (12:43:32 GMT+0530 (IST))
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1500534812425 (12:43:32 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Killing hanging processes
[XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3’ in directory ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Log file for xcodebuild test: /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Logs/Test/71BDEE79-20D0-4F89-9503-29125FDC031B/Session-WebDriverAgentRunner-2017-07-20_124345-9VUi5u.log
[Xcode] ** TEST BUILD FAILED **
[Xcode]
[Xcode]
[Xcode] The following build commands failed:
[Xcode] CompileC /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Build/Intermediates/WebDriverAgent.build/Debug-iphonesimulator/WebDriverAgentLib.build/Objects-normal/x86_64/FBWebServer.o WebDriverAgentLib/Routing/FBWebServer.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
[Xcode] (1 failure)
[Xcode] 2017-07-20 12:43:45.275 xcodebuild[1916:41115] [MT] IDETestOperationsObserverDebug: (6344F71C-FA68-4789-95A4-2558C9930277) Beginning test session WebDriverAgentRunner-6344F71C-FA68-4789-95A4-2558C9930277 at 2017-07-20 12:43:45.274 with Xcode 8E3004b on target {
[Xcode] SimDevice: SimDevice : iPhone 6 (553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D) : state={ Booted } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6 } runtime={ SimRuntime : 10.3.1 (14E8301) - com.apple.CoreSimulator.SimRuntime.iOS-10-3 }
[Xcode] } (10.3.1 (14E8301))
[Xcode] 2017-07-20 12:43:45.276 xcodebuild[1916:41116] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[Xcode] /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Logs/Test/71BDEE79-20D0-4F89-9503-29125FDC031B/Session-WebDriverAgentRunner-2017-07-20_124345-9VUi5u.log
[Xcode] 2017-07-20 12:43:45.414 xcodebuild[1916:41115] Error Domain=IDEFoundationErrorDomain Code=1 “Cannot launch simulated executable: no file found at /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app” UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
[Xcode] 2017-07-20 12:43:45.414 xcodebuild[1916:41115] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode] 2017-07-20 12:43:45.423 xcodebuild[1916:41118] Connection peer refused channel request for “dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface”; channel canceled
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[BaseDriver] Event ‘wdaStartFailed’ logged at 1500534825629 (12:43:45 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1500534836169 (12:43:56 GMT+0530 (IST))
[XCUITest] Using WDA path: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: ‘/usr/local/bin/carthage’
[XCUITest] Killing hanging processes
[XCUITest] Beginning test with command ‘xcodebuild build-for-testing test-without-building -project /Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=553BE51E-86C4-4C9C-AAE4-AD3DE2C7C89D -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3’ in directory ‘/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] Log file for xcodebuild test: /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Logs/Test/02CA3A0C-61DD-4B63-973E-572B7586C2FB/Session-WebDriverAgentRunner-2017-07-20_124400-wuiEif.log
[Xcode] 2017-07-20 12:44:00.187 xcodebuild[1955:41449] Error Domain=IDEFoundationErrorDomain Code=1 “Cannot launch simulated executable: no file found at /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app” UserInfo={NSLocalizedDescription=Cannot launch simulated executable: no file found at /Users/gateway/Library/Developer/Xcode/DerivedData/WebDriverAgent-cgorthrnzhsskecghzwxrgtdxami/Build/Products/Debug-iphonesimulator/WebDriverAgentRunner-Runner.app}
[Xcode] 2017-07-20 12:44:00.187 xcodebuild[1955:41449] Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
[Xcode]
[Xcode] 2017-07-20 12:44:00.189 xcodebuild[1955:41550] Connection peer refused channel request for “dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface”; channel canceled
[Xcode]
[Xcode] ** TEST EXECUTE FAILED **
[Xcode]
[Xcode]
[XCUITest] xcodebuild exited with code ‘65’ and signal ‘null’
[BaseDriver] Event ‘wdaStartFailed’ logged at 1500534840219 (12:44:00 GMT+0530 (IST))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/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: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/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)
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65
at XCUITestDriver.quitAndUninstall$ (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:386:15)
at tryCatch (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Volumes/DATA/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Volumes/DATA/Applications/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)
[HTTP] <-- POST /wd/hub/session 500 50550 ms - 230

P.S.: I am aware that this could be signing issue of WebDriveragent, I had already crossed checked with Xcode signing but still get the same…
Now i am stuck with this issue.
Pls help!!

XCUITest] “Failed to write to /Volumes/DATA/Applications/
Appium.app/Contents/Resources/app/node_modules/appium/node_
modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Build/iOS: Error
Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the
file “iOS” in the folder “Build”.” UserInfo={NSFilePath=/Volumes/
DATA/Applications/Appium.app/Contents/Resources/app/node_
modules/appium/node_modules/appium-xcuitest-driver/
WebDriverAgent/Carthage/Build/iOS, NSUnderlyingError=0x7ff137dca4b0 {Error
Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}}”

It’s a permission issues please provide access to appium node modules
folder

Check permission and provide

Sudo Chown -R 755 your node modules path

@Nischal_Sinha: Really appreciate you quick response.

I had double check for rights in each folder path in WebDriveragent.

And when i run : Sudo Chown -R 755 my node modules path

I get Following

Last login: Thu Jul 20 11:49:29 on console
DSK-496:~ gateway$ sudo chown -R 755/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules
Password:
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file …
chown [-fhv] [-R [-H | -L | -P]] :group file …
DSK-496:~ gateway$