angular / webdriver-manager

A binary manager for E2E testing
MIT License
227 stars 113 forks source link

"E/downloader - undefined" if you use a non-existent version of the browser. #393

Open bmsdave opened 5 years ago

bmsdave commented 5 years ago

Hi!

I'm just wondering. I run:

> webdriver-manager update --versions.chrome=74

[11:59:11] E/downloader - undefined
[11:59:11] I/update - chromedriver: file exists /home/bmsdave/projects/openway/jsengine/node_modules/webdriver-manager/selenium/chromedriver_74.zip
[11:59:11] I/update - chromedriver: unzipping chromedriver_74.zip
(node:15003) UnhandledPromiseRejectionWarning: Invalid filename
(node:15003) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:15003) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[11:59:11] I/update - selenium standalone: file exists /home/bmsdave/projects/openway/jsengine/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.141.59.jar
[11:59:11] I/update - selenium standalone: selenium-server-standalone-3.141.59.jar up to date
[11:59:12] I/update - geckodriver: file exists /home/bmsdave/projects/openway/jsengine/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0.tar.gz
[11:59:12] I/update - geckodriver: unzipping geckodriver-v0.24.0.tar.gz
[11:59:12] I/update - geckodriver: setting permissions to 0755 for /home/bmsdave/projects/openway/jsengine/node_modules/webdriver-manager/selenium/geckodriver-v0.24.0
[11:59:12] I/update - geckodriver: geckodriver-v0.24.0 up to date

And I can not understand where the error E/downloader - undefined comes from. Tell me what does this mean?

bmsdave commented 5 years ago

I understand why this is happening. I write a non-existing version of chromeDriver ("74" instead of "74.0.3729.6"). Unfortunately, webdriver-manager shows very unclear where the error is.

I create pull request: https://github.com/bmsdave/webdriver-manager/commit/c6d5de84f303f9523962c1e7e0817a39140a82f1

Watch it please. Have I done everything right?

cnishina commented 5 years ago

This is a good point where at least in Chrome it makes sense to look up by major version. I imagine there will be a world where I make the request webdriver-manager update --versions.chromedriver=74 --versions.chromium=74 and it will download chromedriver and chromium 74.x.x

Improvements should go against the master branch since we are trying to get off of the legacy branch.

yuezk commented 4 years ago

I ran into the same issue, upgrading to 12.1.7 resolved it. Thanks.