WebDriver更新失败

时间:2019-02-11 18:41:45

标签: angular selenium-webdriver protractor webdriver

我正在尝试安装Protractor,但目前仍无法更新Web驱动程序。

我正在运行Node 8.9.4,npm版本是5.6.0。

当我运行以下命令时

webdriver-manager update --ignore_ssl

我收到以下异常。

[18:10:35] I/http_utils - ignoring SSL certificate
[18:10:35] I/config_source - curl -ok ...\node_modules\protractor\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/
[18:10:35] I/http_utils - ignoring SSL certificate
[18:10:35] I/config_source - curl -ok ...\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
[18:10:35] I/http_utils - ignoring SSL certificate
[18:10:35] I/config_source - curl -ok ...\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json https://api.github.com/repos/mozilla/geckodriver/releases
(node:19392) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'ListBucketResult' of undefined
(node:19392) [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.
[18:10:35] I/http_utils - ignoring SSL certificate
[18:10:35] I/http_utils - ignoring SSL certificate
[18:10:36] I/downloader - curl -ok ...\node_modules\protractor\node_modules\webdriver-manager\selenium/selenium-server-standalone-3.141.59.jar https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
[18:10:36] I/downloader - curl -ok ...\node_modules\protractor\node_modules\webdriver-manager\selenium/selenium-server-standalone-3.141.59.jar https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar
[18:10:36] I/http_utils - ignoring SSL certificate
[18:10:37] I/downloader - curl -ok ...\node_modules\protractor\node_modules\webdriver-manager\selenium/geckodriver-v0.24.0.zip https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-win32.zip
[18:10:37] I/update - geckodriver: unzipping geckodriver-v0.24.0.zip

...\node_modules\adm-zip\zipFile.js:66
                        throw Utils.Errors.INVALID_FORMAT;
                        ^
Invalid or unsupported zip format. No END header found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! rdx-app@0.0.0 webdriver: `webdriver-manager update --versions.chrome 2.38 --ignore_ssl`

1 个答案:

答案 0 :(得分:0)

经过一番调查后,我发现了问题所在。 在adm-zip中,已经出现了该错误的罚单:https://github.com/cthackers/adm-zip/issues/99

在那儿,您对自己的问题进行了讨论: https://github.com/angular/protractor/issues/1005