angular-cli: `ng e2e` breaks when webdriver-manager out of date

OS?

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

Ubuntu

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.31

Repro steps.

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

Run ng e2e with an out of date webdriver-manager.

The log given by the failure.

Normally this include a stack trace and some more information.

$ DISPLAY=:10 ng e2e --prod --env=ci
****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.

DON'T USE IT FOR PRODUCTION USE!
****************************************************************************************
** NG Live Development Server is running on http://localhost:4200. **
 21% building modules 99/103 modules 4 active ...gets/src/app/table/table.component.tsmagicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead
Hash: ea1b24c233ed492d09cc
Time: 42423ms
chunk    {0} polyfills.f87c4a6686e3d9676fed.bundle.js (polyfills) 268 kB {5} [initial] [rendered]
chunk    {1} main.6e640f136426e5f8fc3b.bundle.js (main) 1.46 MB {4} [initial] [rendered]
chunk    {2} scripts.dd0fa2903fcecac43f2b.bundle.js (scripts) 1.3 kB {5} [initial] [rendered]
chunk    {3} styles.876b719d1c595c01c80b.bundle.css (styles) 69 bytes {5} [initial] [rendered]
chunk    {4} vendor.43bccd6adc65df20f10a.bundle.js (vendor) 2.76 MB [initial] [rendered]
chunk    {5} inline.c6b5057f43e1c851480a.bundle.js (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
[09:30:51] I/downloader - chromedriver: downloading version 2.26
[09:30:51] I/downloader - curl -o /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26linux64.zip https://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip
[09:30:51] I/direct - Using ChromeDriver directly...
[09:30:51] I/launcher - Running 1 instances of WebDriver
[09:30:51] E/direct - Error code: 135
[09:30:51] E/direct - Error message: Could not find chromedriver at /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26. Run 'webdriver-manager update' to download binaries.
[09:30:51] E/direct - Error: Could not find chromedriver at /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26. Run 'webdriver-manager update' to download binaries.
    at BrowserError.Error (native)
    at BrowserError.IError [as constructor] (/home/vagrant/ng2-widgets/node_modules/protractor/built/exitCodes.js:13:23)
    at BrowserError.ProtractorError [as constructor] (/home/vagrant/ng2-widgets/node_modules/protractor/built/exitCodes.js:21:28)
    at new BrowserError (/home/vagrant/ng2-widgets/node_modules/protractor/built/exitCodes.js:67:23)
    at Direct.getNewDriver (/home/vagrant/ng2-widgets/node_modules/protractor/built/driverProviders/direct.js:66:27)
    at Runner.createBrowser (/home/vagrant/ng2-widgets/node_modules/protractor/built/runner.js:198:43)
    at /home/vagrant/ng2-widgets/node_modules/protractor/built/runner.js:277:30
    at _fulfilled (/home/vagrant/ng2-widgets/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/vagrant/ng2-widgets/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/vagrant/ng2-widgets/node_modules/q/q.js:796:13)
    at /home/vagrant/ng2-widgets/node_modules/q/q.js:556:49
    at runSingle (/home/vagrant/ng2-widgets/node_modules/q/q.js:137:13)
    at flush (/home/vagrant/ng2-widgets/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[09:30:51] E/launcher - Process exited with error code 135

The log says to update webdriver-manager (which used to happen as a part of the pree2e npm script in package.json).

Running that pre script manually fixes the problem:

$ npm run pree2e

> ng2-widgets@0.0.0 pree2e /home/vagrant/ng2-widgets
> webdriver-manager update --standalone false --gecko false

[09:35:19] I/downloader - chromedriver: downloading version 2.26
[09:35:19] I/downloader - curl -o /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26linux64.zip https://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip
[09:35:19] I/update - chromedriver: unzipping /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26linux64.zip
[09:35:19] I/update - chromedriver: setting permissions to 0755 for /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26

Successful run

$ DISPLAY=:10 ng e2e --prod --env=ci
****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.

DON'T USE IT FOR PRODUCTION USE!
****************************************************************************************
** NG Live Development Server is running on http://localhost:4200. **
 21% building modules 99/103 modules 4 active ...gets/src/app/table/table.component.tsmagicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead
Hash: dc835bf7904c1631debc
Time: 40454ms
chunk    {0} polyfills.f87c4a6686e3d9676fed.bundle.js (polyfills) 268 kB {5} [initial] [rendered]
chunk    {1} main.6e640f136426e5f8fc3b.bundle.js (main) 1.46 MB {4} [initial] [rendered]
chunk    {2} scripts.dd0fa2903fcecac43f2b.bundle.js (scripts) 1.3 kB {5} [initial] [rendered]
chunk    {3} styles.876b719d1c595c01c80b.bundle.css (styles) 69 bytes {5} [initial] [rendered]
chunk    {4} vendor.43bccd6adc65df20f10a.bundle.js (vendor) 2.76 MB [initial] [rendered]
chunk    {5} inline.c6b5057f43e1c851480a.bundle.js (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
[09:36:15] I/direct - Using ChromeDriver directly...
[09:36:15] I/launcher - Running 1 instances of WebDriver
[09:36:15] I/update - chromedriver: file exists /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26linux64.zip
[09:36:15] I/update - chromedriver: unzipping chromedriver_2.26linux64.zip
[09:36:15] I/update - chromedriver: setting permissions to 0755 for /home/vagrant/ng2-widgets/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.26
[09:36:15] I/update - chromedriver: v2.26 up to date
Spec started

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 16 (5 by maintainers)

Most upvoted comments

@johnpapa @Blasz Running the e2e command without the webdriver update and adding pree2e below fixed this issue ( I use yarn btw) see #4597

"pree2e": "webdriver-manager update --standalone false --gecko false",
 "e2e": "ng e2e --no-webdriver-update",

@Blasz Also, to be able to migrate, you should copy-paste and merged all cli config files

@b-barry’s trick did not work for me on a newly generated project, still the same error. I’m using Angular CLI 1.0.0.

To record, I tried “npm install --save-dev protractor@latest”, the protractor version turned into: “protractor”: “^5.1.2”, from “~4.0.13” and the “ng e2e” worked.

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

Attached e2e-log.txt.

Edit: Okay, that’s Firefox, true. Chrome works however.