首页 > 解决方案 > webdriver-manager update 命令总是第一次失败,但之后通过

问题描述

当我webdriver-manager update第一次执行时,我总是看到以下错误

PS H:\> webdriver-manager update
webdriver-manager: using global installed version 12.1.2
[09:55:15] I/config_source - curl -oC:\Users\myusername\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/
[09:55:15] I/config_source - curl -oC:\Users\myusername\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
[09:55:15] I/config_source - curl -oC:\Users\myusername\AppData\Roaming\npm\node_modules\webdriver-manager\selenium\gecko-response.json https://api.github.com/repos/mozilla/geckodriver/releases
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onread (net.js:622:25)

但是,每当我再次运行它时,它总是会成功执行。我只在我现在的公司经历过这种情况,而且我知道它也发生在其他同事身上,所以我认为它一定是代理,但无法理解它是如何成功通过的。

任何关于如何更好地解决我的问题的解决方案或建议将不胜感激。

注意:我正在使用 powershell 执行命令

标签: seleniumselenium-webdriverwebdriverwebdriver-manager

解决方案


我在以前版本的 webdriver-manager 中打开和关闭了相同的错误。唯一修复它的就是升级到最新版本。我们也支持代理,所以这可能是问题所在。也许在https://github.com/angular/webdriver-manager/issues下重新发布它,以便开发人员接受它?


推荐阅读