[BUG]: downloading browsers via https endpoint does not work behind proxy in some cases.
See original GitHub issueContext:
System:
- OS: Linux 3.10 CentOS Linux 7 (Core)
- Memory: 15.78 GB / 125.51 GB
- Container: Yes
Binaries:
- Node: 16.8.0 - /usr/bin/node
- Yarn: 1.22.11 - /usr/bin/yarn
- npm: 7.24.0 - /usr/bin/npm
Languages:
- Bash: 4.2.46 - /usr/bin/bash
Describe the bug
Inside my company network we usually define proxy like this:
export http_proxy=http://proxy.company.com:3128/; export https_proxy=$http_proxy; export no_proxy=.company.com
And as defined here: https://github.com/microsoft/playwright/blob/master/src/utils/utils.ts#L81
if protocol is not https then http.request will be used.
But end result is an https response.
This results in this error during installation (error sanitized to remove unecessary paths):
erroe <some>/node_modules/playwright: Command failed.
Exit code: 1
Command: node install.js
Arguments:
Directory: <some>/node_modules/playwright
Output:
<some>/node_modules/playwright/lib/utils/registry.js:557
throw new Error(`Failed to download ${title}, caused by\n${e.stack}`);
^
Error: Failed to download chromium v920619, caused by
TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
at new NodeError (node:internal/errors:371:5)
at new ClientRequest (node:_http_client:158:11)
at Object.request (node:https:353:10)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
HTTPS connections over proxy servers - Stack Overflow
Proxy transparently intercepts the connection and returns an ad-hoc generated(possibly weak) certificate Ka, signed by a certificate authority that is ...
Read more >Proxy support in Chrome
Specifying an HTTPS proxy is generally not possible through system proxy settings. Instead, one must use either a PAC script or a Chrome...
Read more >Configure device proxy and Internet connection settings
Configure the Microsoft Defender for Endpoint proxy and internet settings to enable communication with the cloud service.
Read more >How to Fix PR_END_OF_FILE_ERROR: 3 Methods That Work
1. Go Through Your Firefox Settings ... Since PR_END_OF_FILE_ERROR is a Firefox-specific issue, we'll start by reviewing the browser settings. ... You may...
Read more >24 - Proxy causes some or all network requests to fail - Monorail
I am connecting to the internet through a proxy server (I'm at work); ... Will try downloading Chrome at home tonight to see...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, it defenitelly seems like some network configuration.
I think issue can be closed, this has nothing to do with playwright itself.
Hmm, I’m unfortunately not able to repro. I’m using this squid container with which it seems to work: https://hub.docker.com/r/sameersbn/squid
Do you have insights what kind of proxy you are using?
Node.js 16.8.0 Playwright 1.15.0