node-chromedriver: npm install fails through http proxy

Unfortunately, it is not possible to install chromedriver via an http proxy. Proxy values are set as follows and the values are available in .npmrc:

npm config set proxy http://[user:pwd]@domain.tld:port
npm config set https-proxy http://[user:pwd]@domain.tld:port

If I try to install chromedriver via cli (npm install chromedriver --save-dev) I get the following error:

ChromeDriver installation failed Error: Error with http(s) request: Error: connect ETIMEDOUT 172.217.20.16:443
    at requestBinary (c:\dev\wdio-debugging\node_modules\chromedriver\install.js:254:11)


We have already done debugging and the problem we found is, installer fetches the https URL through the proxy by means of an http GET instead of an http CONNECT as you can see below(tcpdump).

GET https://chromedriver.storage.googleapis.com/80.0.3987.16/chromedriver_win32.zip HTTP/1.1
Accept: application/json, text/plain, */*
User-Agent: npm/6.13.4 node/v12.16.1 win32 x64
host: chromedriver.storage.googleapis.com
Connection: close

If I change the custom binaries URL to http(npm install chromedriver --save-dev --chromedriver_cdnurl=http://chromedriver.storage.googleapis.com), the installation works. Could you please check?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 18 (6 by maintainers)

Most upvoted comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.