-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Closed
Closed
Copy link
Labels
Description
Version
1.54.0
Steps to reproduce
How to reproduce:
npm install [email protected]https_proxy=http://localhost:3128 npx playwright install webkit
Expected behavior
The browser is downloaded and placed in the cache folder.
Actual behavior
When 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.
Environment
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.0colinaaa and sebk