Search code examples
node.jsselenium-webdrivergulpprotractorselenium-server

Error: Invalid or corrupt jarfile while giving webdriver-manager start


When we tried to start the selenium server we are getting this error. It seems the latest selenium server standalone version is 3.7.1. When we updated using webdriver-manager update command it is downloading the version 3.8.0 and when we give the command webdriver-manager start it is throwing the error as

Error: Invalid or corrupt jarfile.

Please see the screenshot attached.

webdriver-manager start error


Solution

  • There's a workaround to bring the webdriver-manager version back to 3.7.1 according to this ticket: https://github.com/SeleniumHQ/selenium/issues/5142

    1. Update webdriver-manager to 3.7.1

      webdriver-manager update --versions.standalone=3.7.1

    2. Rename selenium-server-standalone-3.7.1.jar to selenium-server-standalone-3.8.0.jar. By default this file is in the %YourUserDirectory%\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium directory.