Appium-desktop: Not able to start appium-desktop: "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file."

Created on 9 May 2017  Â·  11Comments  Â·  Source: appium/appium-desktop

Appium and Appium Desktop?

You are reporting an issue at the Appium Desktop repository. Appium Desktop is a wrapper around Appium. If you are having trouble running tests, it is much more likely that the problem you are encountering is not a problem with Appium Desktop but with Appium. For that reason we require you to have tried your testcase with Appium CLI before reporting issues. Check the checkbox below to confirm that you have proven your issue does _not_ reproduce on Appium itself:

  • [ Yes] I have verified that my issue does not occur with Appium and should be investigated as an Appium Desktop issue

The problem

I have installed appium desktop using .dmg file and it is available under Applications.
I have installed appium 1.6.4 and configured WebDriverAgent project and it works fine if I launch old appium GUI, it gives me inspector screen but the same is not working with appium desktop.

Environment

  • I am running Appium Desktop version _<1.0.0>_.
  • I am on (pick one):

    • [Yes] Mac

    • [ ] Windows

    • [ ] Linux

Below is the log which is shown on appium desktop cli

[Appium] Welcome to Appium v1.6.4
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"automationName":"XCUITest","bundleId":"com.apple.Preferences","deviceName":"iPhone5","platformName":"iOS","platformVersion":"10.3","udid":"<UDID>","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"automationName":"XCUITest","bundleId":"com.apple.Preferences","deviceName":"iPhone5","platformName":"iOS","platformVersion":"10.3","udid":"<UDID>","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null,null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1494300632216 (09:00:32 GMT+0530 (IST))
[Appium] Creating new XCUITestDriver (v2.27.2) session
[Appium] Capabilities:
[Appium]   automationName: 'XCUITest'
[Appium]   bundleId: 'com.apple.Preferences'
[Appium]   deviceName: 'iPhone5'
[Appium]   platformName: 'iOS'
[Appium]   platformVersion: '10.3'
[Appium]   udid: '<Device_UDID>'
[Appium]   newCommandTimeout: 0
[Appium]   connectHardwareKeyboard: true
[XCUITest] XCUITestDriver version: 2.27.2
[BaseDriver] Session created with session id: 9bb13661-24a7-461d-ac6c-c08609081154
[XCUITest] Xcode version set to '8.3.2' 
[XCUITest] iOS SDK Version set to '10.3'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1494300632569 (09:00:32 GMT+0530 (IST))
[XCUITest] Available devices: <Device_UDID>
[XCUITest] Creating iDevice object with udid '<Device_UDID>'
[XCUITest] Determining device to run tests on: udid: '<Device_UDID>', real device: true
[BaseDriver] Event 'appConfigured' logged at 1494300633102 (09:00:33 GMT+0530 (IST))
[BaseDriver] Event 'resetStarted' logged at 1494300633103 (09:00:33 GMT+0530 (IST))
[XCUITest] Reset: running ios real device reset flow
[BaseDriver] Event 'resetComplete' logged at 1494300633105 (09:00:33 GMT+0530 (IST))
[iOSLog] Attempting iOS device log capture via libimobiledevice idevicesyslog
[iOSLog] Found idevicesyslog: '/usr/local/bin/idevicesyslog'
[BaseDriver] Event 'logCaptureStarted' logged at 1494300633295 (09:00:33 GMT+0530 (IST))
[XCUITest] Setting up real device
[BaseDriver] Event 'wdaStartAttempted' logged at 1494300633298 (09:00:33 GMT+0530 (IST))
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/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] Creating WebDriverAgent resources directory
[XCUITest] Creating WebDriverAgent resource bundle directory
[XCUITest] Killing hanging processes
[XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=<Device_UDID> -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[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/Abhinav/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/999E3719-199C-4EE7-B44E-481E937FC323/Session-WebDriverAgentRunner-2017-05-09_090046-YklDLJ.log
[Xcode] 2017-05-09 09:00:46.406 xcodebuild[12581:761865] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/Abhinav/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fe5642d82a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode] 2017-05-09 09:00:46.406 xcodebuild[12581:761865] 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] ** TEST EXECUTE FAILED **
[Xcode] 
[Xcode] 
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1494300646439 (09:00:46 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] Shutting down iproxy process (pid 12580)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device
[BaseDriver] Event 'wdaStartAttempted' logged at 1494300656859 (09:00:56 GMT+0530 (IST))
[XCUITest] Using WDA path: '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/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 /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=<Device_UDID> -configuration Debug IPHONEOS_DEPLOYMENT_TARGET=10.3' in directory '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Output from xcodebuild will not be logged
[XCUITest] Starting iproxy to forward traffic from local port 8100 to device port 8100 over USB
[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/Abhinav/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Logs/Test/92A0B371-8998-41CB-9348-FBA0E0B797C0/Session-WebDriverAgentRunner-2017-05-09_090105-aXOdHS.log
[Xcode] 2017-05-09 09:01:05.906 xcodebuild[12614:762502] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/Abhinav/Library/Developer/Xcode/DerivedData/WebDriverAgent-dikkwtrisltbeobjmfvpthwwekvs/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7fcee478a2d0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode] 2017-05-09 09:01:05.906 xcodebuild[12614:762502] 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] ** TEST EXECUTE FAILED **
[Xcode] 
[Xcode] 
[XCUITest] xcodebuild exited with code '65' and signal 'null'
[BaseDriver] Event 'wdaStartFailed' logged at 1494300665940 (09:01:05 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] Shutting down iproxy process (pid 12613)
[XCUITest] iproxy exited with code 'null'
[XCUITest] Removing WDA application from device

The WebDriverAgent project build is also successful. Is there any other configuration which needs to be done to make it up and running?

Most helpful comment

After specifying below capabilities, appium desktop worked. It would be good to have this documented somewhere:

"agentPath": "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj",
  "bootstrapPath": "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent"

All 11 comments

I tried running below command but it is also giving error:
xcodebuild build-for-testing test-without-building -project /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=<Device_UDID> -configuration Debug

Following is the output of above command
https://gist.github.com/abh7nav/8b796440721705b4fcb362053de3ffd7

Please add the log of the successful run with Appium CLI, so we can see what difference Appium Desktop might be adding.

Please find below log of successful APPIUM CLI:
https://gist.github.com/abh7nav/cab4e8de689deb8e8d48ab32825d57aa

After specifying below capabilities, appium desktop worked. It would be good to have this documented somewhere:

"agentPath": "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj",
  "bootstrapPath": "/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent"

@abh7nav You are the best! Your solution ended my misery!

@abh7nav You are awesome and ended my misery too... Was struggling for one week...

What's the root cause of this, did something went wrong while installing ? I would really like to know the issue behind this.

@abh7nav Spend a lot of time trying to figure this one out, and finally your suggestion helped. Thanks a ton dude

@ abh7nav Thank you for saving the day !!

@abh7nav You change your name to mr. Troubleshooter :) I working perfectly .

You made my day @abh7nav .
I has been breaking my head past 2 days !!

Was this page helpful?
0 / 5 - 0 ratings