When running webdriver-manager update
, it downloads a file with -alpha-1.zip.jar. This does not appear to be the right file format. The example below is to just download the selenium standalone jar file:
> ./webdriver-manager update --standalone --chrome false --gecko false
webdriver-manager: using global installed version 12.1.1
[13:34:08] I/downloader - curl -o/path/to/selenium-server-standalone-4.0.0-alpha-1.zip.jar https://selenium-release.storage.googleapis.com/4.0/selenium-server-standalone-4.0.0-alpha-1.zip
This is an invalid file when trying to run webdriver-manager start
. What's going on and how do we fix this?
For context, what was happening in 12.1.1?
We download the xml file from https://selenium-release.storage.googleapis.com. This xml file previously did not have .zip files. So webdriver-manager update would find the latest from this list. For the
3.141/selenium-server-standalone-3.141.59
the xml Contents has only a jar file:When 4.0.0-alpha.1 was released the xml file has both a jar and zip extension:
During the download, it was taking the first Contents Key that matched the latest version. So the assumption was that it would be a jar file and did not check the file extension. As part of the rename process, it would generate the file name. This was a pattern used for chromedriver where we would tack on the version to the binary. So chromedriver binary would be renamed to chromedriver_2.44. This is why we have a
.zip.jar
file.In addition, we were not downloading beta versions of jar files. Another issue is that it is downloading an alpha version.
How to update your webdriver-manager to 12.1.4?
Huzzah! This is an issue that is now resolved with webdriver-manager@12.1.2 released yesterday morning. But 12.1.4 has all the other fixes (More info here: When using Protractor 5.4.2, webdriver-manager downloads 2.46 which is not compatible with Chrome 74)
It fixes downloading the
.zip
file and renaming it to a.zip.jar
. It will only download jar files. Also we are not downloading alpha and beta versions of the jar. We should use stable versions of selenium standalone server.To update to 12.1.4 if you are using Protractor:
npm install -f
) or clean your workspace (removing your node modules and doing a fresh install).If you are using webdriver-manager installed globally:
npm install -g webdriver-manager@12.1.4
Links
The issues that have tracked this in Protractor and webdriver manager are: - angular/protractor#5224 - angular/webdriver-manager#370
The fix to this was in pull request: angular/webdriver-manager#371.
Other post for StackOverflow for the other fixes: When using Protractor 5.4.2, webdriver-manager downloads 2.46 which is not compatible with Chrome 74