Webdriveragent: Unable to launch WebDriverAgent because of xcodebuild failure

Created on 11 Jan 2018  路  26Comments  路  Source: facebookarchive/WebDriverAgent

Hi guys, until yesterday, it still works. after updated to Appium 1.7.2, sth wrong and please help.
Have tried uninstall and install Appium, and related lots of things, but still error.

[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
Error: Unable to launch WebDriverAgent because of xcodebuild failure: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[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: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[HTTP] <-- POST /wd/hub/session 500 14727 ms - 404
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"app":"/Users/galen/Library/Developer/Xcode/DerivedData/TestApp-azfonskpurcnochewekilpnqczvd/Build/Products/Debug-iphonesimulator/TestApp.app","deviceName":"iPhone 7","noReset":true,"platformName":"iOS","platformVersion":"11.2","newCommandTimeout":0,"connectHardwareKeyboard":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"app":"/Users/galen/Library/Developer/Xcode/DerivedData/TestApp-azfonskpurcnochewekilpnqczvd/Build/Products/Debug-iphonesimulator/TestApp.app","deviceName":"iPhone 7","noReset":true,"platformName":"iOS","platformVersion":"11.2","newCommandTimeout":0,"connectHardwareKeyboard":true},null,null]
[BaseDriver] Event 'newSessionRequested' logged at 1515653712216 (19:55:12 GMT+1300 (NZDT))
[Appium] Requested iOS support with version >= 10, using XCUITest driver instead of UIAutomation-based driver, since the latter is unsupported on iOS 10 and up.
[Appium] Creating new XCUITestDriver (v2.64.0) session
[Appium] Capabilities:
[Appium] app: /Users/galen/Library/Developer/Xcode/DerivedData/TestApp-azfonskpurcnochewekilpnqczvd/Build/Products/Debug-iphonesimulator/TestApp.app
[Appium] deviceName: iPhone 7
[Appium] noReset: true
[Appium] platformName: iOS
[Appium] platformVersion: 11.2
[Appium] newCommandTimeout: 0
[Appium] connectHardwareKeyboard: true
[BaseDriver] Session created with session id: 153fbee2-f341-436a-8a78-81120e57e086
[XCUITest] Current user: 'galen'
[XCUITest] Current version of libimobiledevice: stable 1.2.0 (bottled), HEAD
[XCUITest] Xcode version set to '9.2' (tools v9.2.0.0.1.1510905681)
[XCUITest] iOS SDK Version set to '11.2'
[BaseDriver] Event 'xcodeDetailsRetrieved' logged at 1515653713437 (19:55:13 GMT+1300 (NZDT))
[iOSSim] Constructing iOS simulator for Xcode version 9.2 with udid '5AD6C6AA-3337-4558-B56C-4B6BC7E3F378'
[XCUITest] Determining device to run tests on: udid: '5AD6C6AA-3337-4558-B56C-4B6BC7E3F378', real device: false
[BaseDriver] Using local app '/Users/galen/Library/Developer/Xcode/DerivedData/TestApp-azfonskpurcnochewekilpnqczvd/Build/Products/Debug-iphonesimulator/TestApp.app'
[BaseDriver] Event 'appConfigured' logged at 1515653713756 (19:55:13 GMT+1300 (NZDT))
[XCUITest] Checking whether app '/Users/galen/Library/Developer/Xcode/DerivedData/TestApp-azfonskpurcnochewekilpnqczvd/Build/Products/Debug-iphonesimulator/TestApp.app' is actually present on file system
[XCUITest] App is present
[iOS] Getting bundle ID from app '/Users/galen/Library/Developer/Xcode/DerivedData/TestApp-azfonskpurcnochewekilpnqczvd/Build/Products/Debug-iphonesimulator/TestApp.app': 'io.galen.appium.TestApps'
[BaseDriver] Event 'resetStarted' logged at 1515653713757 (19:55:13 GMT+1300 (NZDT))
[XCUITest] Reset: noReset is on. Leaving simulator as is
[BaseDriver] Event 'resetComplete' logged at 1515653713757 (19:55:13 GMT+1300 (NZDT))
[XCUITest] Starting log capture for iOS Simulator with udid '5AD6C6AA-3337-4558-B56C-4B6BC7E3F378', using 'xcrun simctl spawn 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378 log stream --style compact'
[BaseDriver] Event 'logCaptureStarted' logged at 1515653714122 (19:55:14 GMT+1300 (NZDT))
[XCUITest] Setting up simulator
[iOS] No reason to set locale
[iOS] No iOS / app preferences to set
[iOSSim] Matched 1 Simulator cache item for cleanup: /Users/galen/Library/Developer/CoreSimulator/Devices/5AD6C6AA-3337-4558-B56C-4B6BC7E3F378/data/Library/Caches/com.apple.mobile.installd.staging
[iOSSim] Setting common Simulator preferences to {"ConnectHardwareKeyboard":true}
[iOSSim] Updated 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378 Simulator preferences at '/Users/galen/Library/Preferences/com.apple.iphonesimulator.plist' with {"ConnectHardwareKeyboard":true}
[iOSSim] The count of running Simulator UI client instances is 1
[iOSSim] Both Simulator with UDID 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378 and the UI client are currently running
[BaseDriver] Event 'simStarted' logged at 1515653714579 (19:55:14 GMT+1300 (NZDT))
[XCUITest] App 'io.galen.appium.TestApps' is already installed. No need to reinstall.
[BaseDriver] Event 'appInstalled' logged at 1515653714719 (19:55:14 GMT+1300 (NZDT))
[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] No obsolete cached processes from previous WDA sessions listening on port 8100 have been found
[JSONWP Proxy] Proxying [GET /status] to [GET http://localhost:8100/status] with no body
[XCUITest] WDA is not listening at 'http://localhost:8100/'
[BaseDriver] Event 'wdaStartAttempted' logged at 1515653714771 (19:55:14 GMT+1300 (NZDT))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing running processes 'xcodebuild.5AD6C6AA-3337-4558-B56C-4B6BC7E3F378, iproxy 8100, 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378.XCTRunner' for the device 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378...
[XCUITest] 'pgrep -nif xcodebuild.5AD6C6AA-3337-4558-B56C-4B6BC7E3F378' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378.
XCTRunner' didn't detect any matching processes. Return code: 1
[XCUITest] Using Xcode 9.2, so fixing WDA codebase
[BaseDriver] Event 'wdaStartFailed' logged at 1515653714883 (19:55:14 GMT+1300 (NZDT))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Removing WDA application from device
[BaseDriver] Event 'wdaStartAttempted' logged at 1515653726011 (19:55:26 GMT+1300 (NZDT))
[XCUITest] Launching WebDriverAgent on the device
[XCUITest] Carthage found: '/usr/local/bin/carthage'
[XCUITest] Killing running processes 'xcodebuild.5AD6C6AA-3337-4558-B56C-4B6BC7E3F378, iproxy 8100, 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378.XCTRunner' for the device 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378...
[XCUITest] 'pgrep -nif xcodebuild.5AD6C6AA-3337-4558-B56C-4B6BC7E3F378' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif iproxy 8100' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif 5AD6C6AA-3337-4558-B56C-4B6BC7E3F378.
XCTRunner' didn't detect any matching processes. Return code: 1
[XCUITest] Using Xcode 9.2, so fixing WDA codebase
[BaseDriver] Event 'wdaStartFailed' logged at 1515653726129 (19:55:26 GMT+1300 (NZDT))
[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
[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: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
Error: Unable to launch WebDriverAgent because of xcodebuild failure: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[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: "ENOENT: no such file or directory, open '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/PrivateHeaders/XCTest/XCUICoordinate.h'".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:375:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/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] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[HTTP] <-- POST /wd/hub/session 500 15055 ms - 404
[HTTP] --> DELETE /wd/hub/session {}
[HTTP] No route found. Setting content type to 'text/plain'
[HTTP] <-- DELETE /wd/hub/session 404 3 ms - 57

Most helpful comment

fixed it by running:
cd /Applications/Appium.app/Contents/Resources/app ; npm install

All 26 comments

I had the same problem. Please try importing the web driver agent dependencies. In terminal cd into the "Appium.app/contents/resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/webdriveragent" directory and run: ./Scripts/bootstrap.sh
I have tried this and I am getting another error but suspect it is related to my local environment so the bootstrap.sh script may be all you need.

Thanks, @VTINFOJames, I tried but it's still not working. Strange

Solved. After degrade Appium to v1.7.1, everything is worked as usual

I am having the same issue

fixed it by running:
cd /Applications/Appium.app/Contents/Resources/app ; npm install

I was also facing the same issue.

fixed it by running:
cd /Applications/Appium.app/Contents/Resources/app ; npm install

Thanks @jamesoram

I was also facing the same issue.

fixed it by running:
cd /Applications/Appium.app/Contents/Resources/app ; npm install

Thanks @jamesoram

I was also facing the same issue.

fixed it by running:
cd /Applications/Appium.app/Contents/Resources/app ; npm install

Thanks @jamesoram

I updated earlier in the week but didn't have this error until today when I updated to the latest Xcode. Running this also fixed it for me: cd /Applications/Appium.app/Contents/Resources/app ; npm install

I Was also facing same error after updating appium;
by executing

cd /Applications/Appium.app/Contents/Resources/app ; npm install

issue resolved.

thanks @jamesoram its worked successfully

cd /Applications/Appium.app/Contents/Resources/app ; npm install

worked successfully for me

Thanks @jamesoram

I tried: cd /Applications/Appium.app/Contents/Resources/app ; npm install
But it didn't work for me. After hitting this command in terminal i get warning message as:

(node:9847) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGINT listeners added. Use emitter.setMaxListeners() to increase limit
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] requires a peer of jquery@>=1.8.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of postcss@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] license should be a valid SPDX license expression

In Appium server I get error message as

[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj' but the file does not exist".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:387:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj' but the file does not exist".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:387:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[XCUITest] Killing running processes 'xcodebuild.BCE51EDA-7A3F-46F5-A7DD-A01A345654E6, BCE51EDA-7A3F-46F5-A7DD-A01A345654E6.XCTRunner' for the device BCE51EDA-7A3F-46F5-A7DD-A01A345654E6...
[XCUITest] 'pgrep -nif xcodebuild.BCE51EDA-7A3F-46F5-A7DD-A01A345654E6' didn't detect any matching processes. Return code: 1
[XCUITest] 'pgrep -nif BCE51EDA-7A3F-46F5-A7DD-A01A345654E6.
XCTRunner' didn't detect any matching processes. Return code: 1
[XCUITest] Deleting simulator created for this run (udid: 'BCE51EDA-7A3F-46F5-A7DD-A01A345654E6')
[iOSLog] Stopping iOS log capture
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj' but the file does not exist".
at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/lib/driver.js:387:13)
at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at
[HTTP] <-- POST /wd/hub/session 500 47803 ms - 398

I was also facing the same issue after the appium update
and it's working fine now

fixed it by running

  1. cd /Applications/Appium.app/Contents/Resources/app
  2. npm install

Thanks @jamesoram

Thanks @Dahboorq, @Jamesoram and @Rahul. It worked! :)

Can we add this to the setup process for the appium desktop?

Thanks lot guys. fixed it by running

cd /Applications/Appium.app/Contents/Resources/app
npm install

Suddenly I had that error, and thank you guys.
Following:
1) cd /Applications/Appium.app/Contents/Resources/app
2) npm install

fixed my issue.

screen shot 2018-02-13 at 4 46 02 pm
screen shot 2018-02-13 at 4 46 52 pm

Hi @sa2qc ,
I am facing the same issue that

"Error: Unable to launch WebDriverAgent because of xcodebuild failure: "Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj' but the file does not exist".

after using the command that are

  1. cd /Applications/Appium.app/Contents/Resources/app
  2. npm install

could you tell me the solution to fix it. I'll be very appreciate for that!

Hi All,
Thanks for you all!
About my problem, it's necessary to restart my Appium server. After than, it worked properly!
Thanks again!

And the hero of the day is .... @jamesoram!

body
[XCUITest] Failed to create WDA session. Retrying...
[XCUITest] Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100".
[XCUITest] Quitting and uninstalling WebDriverAgent, then retrying
[XCUITest] Shutting down sub-processes
[XCUITest] Shutting down xcodebuild process (pid 12046)
[XCUITest] xcodebuild exited with code 'null' and signal 'SIGTERM'
[XCUITest] Removing WDA application from device
[XCUITest] Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100".
[XCUITest] at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:426:13)
[XCUITest] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[XCUITest] at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[XCUITest] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[XCUITest] at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[XCUITest] at
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[iOSLog] Stopping iOS log capture
[BaseDriver] Event 'newSessionStarted' logged at 1526907694359 (16:01:34 GMT+0300 (+03))
[MJSONWP] Encountered internal error running command: Error: Unable to start WebDriverAgent session because of xcodebuild failure: "Could not proxy command to remote server. Original error: Error: connect ECONNREFUSED 127.0.0.1:8100".
[MJSONWP] at XCUITestDriver.quitAndUninstall$ (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:426:13)
[MJSONWP] at tryCatch (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[MJSONWP] at GeneratorFunctionPrototype.invoke [as _invoke] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[MJSONWP] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[MJSONWP] at GeneratorFunctionPrototype.invoke (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[MJSONWP] at
[HTTP] <-- POST /wd/hub/session 500 454425 ms - 312

please help !!!

I was also facing the same issue.

fixed it by running:
cd /Applications/Appium.app/Contents/Resources/app ; npm install

Thanks @jamesoram

this solution cd /Applications/Appium.app/Contents/Resources/app ; npm install did not work for me. I ended up having to unlink and relink carthage. sometimes major updates will cause a mismatch. I first saw this issue when establishing appium for the first time, and then again when upgrading xcode to 10.2.1.

first, I updated carthage: brew update carthage
followed by unlinking and relinking: brew unlink carthage && brew link carthage

hopefully this helps someone else.

I'm working with Appium 1.13.0 and xcode 10.2.1 on mac os 10.14.5 automating a react native app.

@yangfei1028 cd /Applications/Appium.app/Contents/Resources/app ; npm install fixed it for me! Lifesaver!

Was this page helpful?
0 / 5 - 0 ratings