WDA calls the wrong path to the Carthage

Hi,

I am trying to run Appium on a real iOS device. I have been able to successfully run it on android, but when I try running for iOS I get the error. Here is my environment: -Appium v1.10.0 -iPhone 8 -Xcode 10.1

I don’t realy know if the problem is through Permission or the Wrong path !!
$ which appium . --> /Users/local/.n/bin/appium
my WebDriver is here
/Users/local/.n/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
plus Scripts with bootstrap

here my Log

The server is running
[Appium] Welcome to Appium v1.10.0
[Appium] Non-default server args:
[Appium] address: 127.0.0.1
[Appium] Appium REST http interface listener started on 127.0.0.1:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“app”:"/Users/ghasaleh.malek/Documents/iosAutomation/DEV.ipa",“noReset”:“false”,“xcodeOrgId”:“KGN9GLW793”,“bundleId”:“com.gazale.AppiumTest”,“autoDismissAlerts”:true,“deviceName”:“iPhone 8”,“updatedWDABundleId”:“io.appium.WebDriverAgentRunner”,“nativeWebTap”:true,“xcodeSigningId”:“iPhone Developer”,“platformVersion”:“12.1.2”,“automationName”:“XCUITest”,“autoGrantPermissions”:true,“unicodeKeyboard”:“true”,“platformName”:“iOS”,“udid”:“94f6034d1be7cfcf9d4c6540b67b3aca9682fd46”,“resetKeyboard”:“true”,“autoAcceptAlerts”:true},“capabilities”:{“alwaysMatch”:{“appium:app”:"/Users/ghasaleh.malek/Documents/iosAutomation/DEV.ipa",“appium:autoAcceptAlerts”:true,“appium:autoDismissAlerts”:true,“appium:autoGrantPermissions”:true,“appium:automationName”:“XCUITest”,“appium:bundleId”:“com.gazale.AppiumTest”,“appium:deviceName”:“iPhone 8”,“appium:nativeWebTap”:true,“appium:noReset”:“false”,“platformName”:“ios”,“appium:platformVersion”:“12.1.2”,“appium:resetKeyboard”:“true”,“appiu
[W3C] Calling AppiumDriver.createSession() with args: [{“app”:”/Users/ghasaleh.malek/Documents/iosAutomation/DEV.ipa",“noReset”:“false”,“xcodeOrgId”:“KGN9GLW793”,“bundleId”:“com.gazale.AppiumTest”,“autoDismissAlerts”:true,“deviceName”:“iPhone 8”,“updatedWDABundleId”:“io.appium.WebDriverAgentRunner”,“nativeWebTap”:true,“xcodeSigningId”:“iPhone Developer”,“platformVersion”:“12.1.2”,“automationName”:“XCUITest”,“autoGrantPermissions”:true,“unicodeKeyboard”:“true”,“platformName”:“iOS”,“udid”:“94f6034d1be7cfcf9d4c6540b67b3aca9682fd46”,“resetKeyboard”:“true”,“autoAcceptAlerts”:true},null,{“alwaysMatch”:{“appium:app”:"/Users/ghasaleh.malek/Documents/iosAutomation/DEV.ipa",“appium:autoAcceptAlerts”:true,“appium:autoDismissAlerts”:true,“appium:autoGrantPermissions”:true,“appium:automationName”:“XCUITest”,“appium:bundleId”:“com.gazale.AppiumTest”,“appium:deviceName”:“iPhone 8”,“appium:nativeWebTap”:true,“appium:noReset”:“false”,“platformName”:“ios”,“appium:platformVersion”:“12.1.2”,“appium:resetKeyboard”:“true”,“appium:udid”:“94f6034d1be7cfcf9d4c6540b67b3aca9682fd46”,"a…
[BaseDriver] Event ‘newSessionRequested’ logged at 1547545422759 (10:43:42 GMT+0100 (CET))
[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.
[Appium] Creating new XCUITestDriver (v2.104.0) session
[Appium] Capabilities:
[Appium] platformName: ios
[Appium] app: /Users/ghasaleh.malek/Documents/iosAutomation/DEV.ipa
[Appium] autoAcceptAlerts: true
[Appium] autoDismissAlerts: true
[Appium] autoGrantPermissions: true
[Appium] automationName: XCUITest
[Appium] bundleId: com.gazale.AppiumTest
[Appium] deviceName: iPhone 8
[Appium] nativeWebTap: true
[Appium] noReset: false
[Appium] platformVersion: 12.1.2
[Appium] resetKeyboard: true
[Appium] udid: 94f6034d1be7cfcf9d4c6540b67b3aca9682fd46
[Appium] unicodeKeyboard: true
[Appium] updatedWDABundleId: io.appium.WebDriverAgentRunner
[Appium] xcodeOrgId: KGN9GLW793
[Appium] xcodeSigningId: iPhone Developer
[BaseDriver] W3C capabilities {“alwaysMatch”:{“platformNa… and MJSONWP desired capabilities {“app”:”/Users/ghasaleh.mal… were provided
[BaseDriver] Creating session with W3C capabilities: {“alwaysMatch”:{"platformNa…
[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.
[BaseDriver] Capability ‘noReset’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] The following capabilities were provided, but are not recognized by appium: autoGrantPermissions, resetKeyboard, unicodeKeyboard.
[BaseDriver] Session created with session id: 2da0fa04-13fc-450c-af1b-b2a23c45f238
[XCUITest] Current user: ‘ghasaleh.malek’
[XCUITest] Available devices: 94f6034d1be7cfcf9d4c6540b67b3aca9682fd46
[XCUITest] Creating iDevice object with udid ‘94f6034d1be7cfcf9d4c6540b67b3aca9682fd46’
[XCUITest] Determining device to run tests on: udid: ‘94f6034d1be7cfcf9d4c6540b67b3aca9682fd46’, real device: true
[XCUITest] Xcode version set to ‘10.1’ (tools v10.1.0.0.1.1539992718)
[XCUITest] iOS SDK Version set to ‘12.1’
[BaseDriver] Event ‘xcodeDetailsRetrieved’ logged at 1547545422936 (10:43:42 GMT+0100 (CET))
[BaseDriver] Using local app ‘/Users/ghasaleh.malek/Documents/iosAutomation/DEV.ipa’
[BaseDriver] Will reuse previously cached application at ‘/var/folders/8q/g3lhgb4j3zs2d3_g1c4df_mr0000gn/T/2019015-67966-ccubuw.ybyxv/Payload/TrustCase.app’
[BaseDriver] Event ‘appConfigured’ logged at 1547545423216 (10:43:43 GMT+0100 (CET))
[XCUITest] Checking whether app ‘/var/folders/8q/g3lhgb4j3zs2d3_g1c4df_mr0000gn/T/2019015-67966-ccubuw.ybyxv/Payload/TrustCase.app’ is actually present on file system
[XCUITest] App is present
[BaseDriver] Event ‘resetStarted’ logged at 1547545423217 (10:43:43 GMT+0100 (CET))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event ‘resetComplete’ logged at 1547545423217 (10:43:43 GMT+0100 (CET))
[iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Starting iOS device log capture with: ‘idevicesyslog’
[XCUITest] Cannot get the name of the crashes folder for the device with udid ‘94f6034d1be7cfcf9d4c6540b67b3aca9682fd46’. Original error: Command ‘idevicename -u 94f6034d1be7cfcf9d4c6540b67b3aca9682fd46’ exited with code 255
[BaseDriver] Event ‘logCaptureStarted’ logged at 1547545423915 (10:43:43 GMT+0100 (CET))
[XCUITest] Setting up real device
[XCUITest] Verifying application platform
[XCUITest] CFBundleSupportedPlatforms: [“iPhoneOS”]
[XCUITest] Installing ‘/var/folders/8q/g3lhgb4j3zs2d3_g1c4df_mr0000gn/T/2019015-67966-ccubuw.ybyxv/Payload/TrustCase.app’ on device with UUID ‘94f6034d1be7cfcf9d4c6540b67b3aca9682fd46’…
[XCUITest] The app has been installed successfully.
[BaseDriver] Event ‘appInstalled’ logged at 1547545431230 (10:43:51 GMT+0100 (CET))
[XCUITest] Using WDA path: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent’
[XCUITest] Using WDA agent: ‘/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj’
[XCUITest] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[JSONWP Proxy] Matched ‘/status’ to command name ‘getStatus’
[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}
[XCUITest] WDA is not listening at ‘http://localhost:8100/
[XCUITest] WDA is currently not running. There is nothing to cache
[XCUITest] Trying to start WebDriverAgent 1 times with 10000ms interval
[BaseDriver] Event ‘wdaStartAttempted’ logged at 1547545431349 (10:43:51 GMT+0100 (CET))
[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] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] *** Checking out CocoaAsyncSocket at “7.6.3”
[XCUITest] *** Checking out YYCache at “1.0.5”
[XCUITest] Failed to check out repository into /Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/YYCache: Could not create working directory (Error Domain=NSCocoaErrorDomain Code=513 “You don’t have permission to save the file “YYCache” in the folder “Checkouts”.” UserInfo={NSFilePath=/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/YYCache, NSUnderlyingError=0x7f97e071e2d0 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[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] *** Checking out CocoaAsyncSocket at “7.6.3”
[XCUITest] *** Checking out YYCache at “1.0.5”
[XCUITest] *** Checking out RoutingHTTPServer at “v1.0.1”
[XCUITest] Failed to check out repository into /Applications/Appium.app/Contents/Resources/app/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=/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/Carthage/Checkouts/RoutingHTTPServer, NSUnderlyingError=0x7f89ace45720 {Error Domain=NSPOSIXErrorDomain Code=13 “Permission denied”}})
[BaseDriver] Event ‘wdaStartFailed’ logged at 1547545433343 (10:43:53 GMT+0100 (CET))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[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”. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[XCUITest] at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:476:13)
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[iOSLog] Stopping iOS log capture
[BaseDriver] Event ‘newSessionStarted’ logged at 1547545433788 (10:43:53 GMT+0100 (CET))
[W3C] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘Scripts/bootstrap.sh -d’ exited with code 1”. Make sure you follow the tutorial at https://github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[W3C] at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:476:13)
[HTTP] <-- POST /wd/hub/session 500 11032 ms - 1300
[HTTP]

could I change the Path or make a directory where appium want to access ??

1 Like

Can some one help with this query? I am also facing the same issue, can we redirect the path so that packages are installed from some custom repo instead of github?