Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting 'E/launcher - spawn Unknown system error -86' when running chrome driver with protractor

Mac OSX version: Catalina 10.15.7
Node version: 10.18.1
NPM version: 6.13.4
Protractor version: 5.4.2
Chrome driver version: 87.0.4280.88
Chrome browser version: 87.0.4280.141 (Official Build) (x86_64)

I suddenly ran into a problem whilst running some protractor tests directly against my local Chrome browser. I encountered the following error when running ng e2e --devServerTarget=:

[12:33:36] I/launcher - Running 1 instances of WebDriver
[12:33:36] I/direct - Using ChromeDriver directly...
[12:33:36] E/launcher - spawn Unknown system error -86
[12:33:36] E/launcher - Error: spawn Unknown system error -86
    at ChildProcess.spawn (internal/child_process.js:366:11)
    at Object.spawn (child_process.js:551:9)
    at exec (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/selenium-webdriver/io/exec.js:116:27)
    at resolveCommandLineFlags.then.args (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/selenium-webdriver/remote/index.js:219:25)
    at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/selenium-webdriver/chrome.js:761:15)
    at Direct.getNewDriver (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/protractor/built/driverProviders/direct.js:77:33)
    at Runner.createBrowser (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/protractor/built/runner.js:195:43)
    at q.then.then (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/q/q.js:834:54)
    at /Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/q/q.js:863:30
    at Promise.promise.promiseDispatch (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/q/q.js:796:13)
    at /Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/q/q.js:556:49
    at runSingle (/Users/[email protected]/dev/code/cpp.idam.am.idam-frontend/node_modules/q/q.js:137:13)
[12:33:36] E/launcher - Process exited with error code 199
An unexpected error occurred: undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] docker:e2e: `IDAM_TEST_ENV=docker ng e2e --devServerTarget=`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] docker:e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/[email protected]/.npm/_logs/2021-01-08T12_33_36_195Z-debug.log
make: *** [docker-e2e] Error 1

I had not made any changes to my protractor/chrome-driver configuration. It just suddenly started failing. I have tried clean builds, reverting my changes but I am still having this problem. Please can anyone help?

like image 773
Johno Avatar asked Jan 08 '21 14:01

Johno


1 Answers

I encounter the same error this morning and found that the fix was to run:
webdriver-manager update
npm install --force protractor
There was a fix to this issue in the latest webddriver-manager update. You'll need to force a dependency update on protractor for it to use the latest webdriver-manager

like image 186
Alessandro Kreslin Avatar answered Nov 19 '22 07:11

Alessandro Kreslin