New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: https-proxy-agent@^5.0.0
to fix node@15 ERR_INVALID_PROTOCOL
#6555
Conversation
With `nodejs@15.0.1`, install puppeteer with `https_proxy` set will cause error like: ``` > puppeteer@5.4.1 install /home/dr/Git/dr-js/node_modules/puppeteer > node install.js ERROR: Failed to set up Chromium r809590! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download. TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:" at new NodeError (node:internal/errors:258:15) at new ClientRequest (node:_http_client:155:11) at Object.request (node:https:313:10) at httpRequest (/home/dr/Git/dr-js/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:488:17) at downloadFile (/home/dr/Git/dr-js/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:357:21) at BrowserFetcher.download (/home/dr/Git/dr-js/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:239:19) at async downloadBrowser (/home/dr/Git/dr-js/node_modules/puppeteer/lib/cjs/puppeteer/node/install.js:48:5) { code: 'ERR_INVALID_PROTOCOL' } ``` The related issue is at TooTallNate/node-agent-base#47, from package `agent-base` under `https-proxy-agent` And the version bump is for `Refactor to TypeScript`: TooTallNate/proxy-agents@4.0.0...5.0.0
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
Testing the patched .tgz with And for me the proxy setting is in
|
Thank you for the patch and the detailed tests + logs in the description! |
With
nodejs@15.0.1
, install puppeteer withhttps_proxy=http://*/
set will cause error like:The related issue is at TooTallNate/node-agent-base#47,
from package
agent-base
underhttps-proxy-agent
And the
https-proxy-agent
major version bump is forRefactor to TypeScript
: TooTallNate/proxy-agents@4.0.0...5.0.0Also there's an older
"https-proxy-agent": "^2.2.1",
underexperimental/puppeteer-firefox/package.json
, I did not change that since it's marked experimental.And
npm@6
also useshttps-proxy-agent
but didn't hit the protocol auto detect bug, because it useshttp-proxy-agent
separately forhttp_proxy
inmake-fetch-happen/agent.js#L185-L199
(butnpm@7
did hit the bug npm/cli#2003)And a simple package test: (with
nodejs@15.0.1
&npm@7.0.5
)and the diff result: