angular-cli: ng e2e fails with Error code 135

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Mac OSX El Cap

  1. Versions. Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.14
node: 6.6.0
os: darwin x64

  1. Repro steps. Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

new application, start the server with ng serve and in another terminal window try to run the tests with ng e2e

  1. The log given by the failure. Normally this include a stack trace and some more information.

> a2test@0.0.0 pree2e /Users/John/Dev/Javascript/Angular/a2test
> webdriver-manager update

[12:50:02] I/update - chromedriver: file exists /Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/webdriver-manager/selenium/
[12:50:02] I/update - chromedriver: unzipping
[12:50:02] I/update - chromedriver: setting permissions to 0755 for /Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22
[12:50:02] I/update - chromedriver: v2.22 up to date
[12:50:02] I/update - selenium standalone: file exists /Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar
[12:50:02] I/update - selenium standalone: v2.53.1 up to date

> a2test@0.0.0 e2e /Users/John/Dev/Javascript/Angular/a2test
> protractor "./protractor.conf.js"

[12:50:03] I/direct - Using ChromeDriver directly...
[12:50:03] I/launcher - Running 1 instances of WebDriver
[12:50:04] E/launcher - Error code: 135
[12:50:04] E/launcher - Error message: ECONNREFUSED connect ECONNREFUSED
[12:50:04] E/launcher - Error: ECONNREFUSED connect ECONNREFUSED
    at ClientRequest.<anonymous> (/Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/selenium-webdriver/http/index.js:381:15)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:308:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1271:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
From: Task: WebDriver.createSession()
    at Function.createSession (/Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:329:24)
    at Driver (/Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:778:38)
    at Direct.getNewDriver (/Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/built/driverProviders/direct.js:68:26)
    at Runner.createBrowser (/Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/built/runner.js:190:43)
    at /Users/John/Dev/Javascript/Angular/a2test/node_modules/protractor/built/runner.js:264:30
    at _fulfilled (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:796:13)
    at /Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:556:49
    at runSingle (/Users/John/Dev/Javascript/Angular/a2test/node_modules/q/q.js:137:13)
[12:50:04] E/launcher - Process exited with error code 135

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/Cellar/node/6.6.0/bin/node" "/usr/local/bin/npm" "run" "e2e" "--" "./protractor.conf.js"
npm ERR! node v6.6.0
npm ERR! npm  v3.10.7
npm ERR! a2test@0.0.0 e2e: `protractor "./protractor.conf.js"`
npm ERR! Exit status 135
npm ERR!
npm ERR! Failed at the a2test@0.0.0 e2e script 'protractor "./protractor.conf.js"'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the a2test package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     protractor "./protractor.conf.js"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs a2test
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls a2test
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/John/Dev/Javascript/Angular/a2test/npm-debug.log

Some end-to-end tests failed, see above.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 4
  • Comments: 19 (5 by maintainers)

Commits related to this issue

Most upvoted comments

For me this turned out to be an issue w/ the latest version of Chrome (v54) and how it interacts w/ Chromedriver.

So when you install the latest Chromedriver via webdriver-manager update, right now it’s installing the default Chromedriver version which is 2.22. In Chrome 54 they changed something w/ the Devtools API which breaks that version. I got around this issue by forcing webdriver-manager to download Chromedriver v.2.2.4 doing this:

webdriver-manager update

That will download version v.2.24. However, if you are connecting to Protractor using directConnect: true in the config (which you probably are), protractor will still attempt to use the default (v.2.22) driver when running tests. To fix that, you need to specify a chromeDriver setting in protractor.conf.js as well. To get it to work on Windows and Unix platforms you can do something like this:

chromeDriver: `./node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.24${process.platform.indexOf('win') === 0 ? '.exe' : ''}`

Kind of annoying but at least it’s working.

In my project (again, a simple Angular-cli app), there isn’t anything under the node_modules/protractor/node_modules folder - it’s empty.

I did find node_modules/protractor/bin/webdriver-manager, and when trying the command given, I get:

➜  bin git:(master) ✗ ./webdriver-manager update 2.24
[10:28:21] I/file_manager - creating folder /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium
[10:28:21] I/downloader - selenium standalone: downloading version 2.53.1
[10:28:21] I/downloader - curl -o /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar
[10:28:21] I/downloader - chromedriver: downloading version 2.24
[10:28:21] I/downloader - curl -o /Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/
[10:28:22] E/downloader - Error: Got code 404 from
[10:28:22] E/downloader - Error: Got error Error: ENOENT: no such file or directory, stat '/Users/John/Dev/Javascript/Angular/a2test/node_modules/webdriver-manager/selenium/' from

It looks like it’s trying and failing to download, which doesn’t exist.

Thanks ecozoic for the workaround. Just sharing that in my case all I had to do was the below in order to solve our issue with protractor:

cd protractor/node_modules/webdriver-manager/bin
./webdriver-manager update 2.24

I am having this exact same problem since Chrome updated to v54 and getting the same errors when trying to download chromedriver version 2.24. Has anyone found a solution?

I’m still encountering this issue with the following (up to date) dependencies:

protractor version 4.0.9 webdriver-manager version 10.2.7 chromedriver version 2.25.426935 chrome version 54.0.2840.87

For the time being I switched to using Canary with the following settings within protractor.conf.js:

capabilities: {
  "browserName": "chrome",
"chromeOptions": {
    "binary": "/Users/XXX/Applications/Google\ Chrome\\ Chrome\ Canary"

I forgot I had posted on this thread too. I got a response from protractor that webdriver-manager was updated two days ago, so everything started working again once I updated to 4.0.9. & did npm install. Issue fixed