webdriver-manager update命令总是第一次失败,但之后通过

时间:2019-05-17 09:04:07

标签: selenium selenium-webdriver webdriver webdriver-manager

当我第一次执行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执行命令

1 个答案:

答案 0 :(得分:0)

在以前版本的webdriver-manager中,我打开和关闭时都遇到相同的错误。修复此问题的唯一方法是升级到最新版本。我们也在代理之后,所以可能是问题所在。 也许将其重新发布到https://github.com/angular/webdriver-manager/issues下,以便开发人员将其获取?