1.54.0
Steps to reproduceHow to reproduce:
npm install playwright@1.54.0
https_proxy=http://localhost:3128 npx playwright install webkit
The browser is downloaded and placed in the cache folder.
Actual behaviorWhen https_proxy
is set to http://<domain>:<port>
then an attempt to run npx playwright install webkit
to download browsers will fail with
TypeError [ERR_INVALID_PROTOCOL]: Protocol "https:" not supported. Expected "http:"
at new ClientRequest (node:_http_client:190:11)
at Object.request (node:http:102:10)
at httpRequest (/Users/user/Projects/playwright-proxy-test/node_modules/playwright-core/lib/server/utils/network.js:80:139)
at downloadFile (/Users/user/Projects/playwright-proxy-test/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js:45:34)
at main (/Users/user/Projects/playwright-proxy-test/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js:96:9)
at process.<anonymous> (/Users/user/Projects/playwright-proxy-test/node_modules/playwright-core/lib/server/registry/oopDownloadBrowserMain.js:110:13)
at process.emit (node:events:518:28)
at emit (node:internal/child_process:949:14)
at process.processTicksAndRejections (node:internal/process/task_queues:91:21) {
code: 'ERR_INVALID_PROTOCOL'
}
Additional context
It works for 1.53.2
and previous versions. One can run a squid proxy using Docker via docker run --rm -p 3128:3128 ubuntu/squid:5.2-22.04_beta
and then test that browsers are downloaded successfully.
System: OS: macOS 15.5 CPU: (14) arm64 Apple M4 Pro Memory: 303.50 MB / 48.00 GB Binaries: Node: 22.17.0 - ~/Opt/node-v22.17.0-darwin-arm64/bin/node npm: 10.9.2 - ~/Opt/node-v22.17.0-darwin-arm64/bin/npm Languages: Bash: 3.2.57 - /bin/bash npmPackages: playwright: ^1.54.0 => 1.54.0
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4