Skip to content
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

[Bug]: --base-url option seems to be non-working #12204

Closed
mikaello opened this issue Apr 4, 2024 · 0 comments · Fixed by #12206
Closed

[Bug]: --base-url option seems to be non-working #12204

mikaello opened this issue Apr 4, 2024 · 0 comments · Fixed by #12206

Comments

@mikaello
Copy link

mikaello commented Apr 4, 2024

Steps to reproduce

When adding the --base-url I expect this to be used instead of the default base URL, and if I use a non-working --base-url I expect the download to fail (to verify that the option is actually used).

Non-working base URL, expected to fail (but works): npx @puppeteer/browsers install --base-url https://example.com chrome@stable

I am working in an airgapped environment, so I got a proxy on my side (which I have verified working locally by cURL-ing the URL), example with redacted host:

$ curl -I https://nexus.company.com/googleapis-storage-external/chrome-for-testing-public/125.0.6368.2/linux64/chrome-linux64.zip`
HTTP/1.1 200

But this does not work when using it with the --base-url option (it still uses the default base URL): npx @puppeteer/browsers install --base-url https://nexus.company.com/googleapis-storage-external/chrome-for-testing-public chrome@stable.

I have also tested the same things with the PUPPETEER_DOWNLOAD_BASE_URL env set to the correct proxy, and to a failing proxy, e.g. PUPPETEER_DOWNLOAD_BASE_URL=https://example.com with the same result.

Expected results

Expects:

  • npx @puppeteer/browsers install --base-url https://example.com chrome@stable should fail because of invalid base URL
  • npx @puppeteer/browsers install --base-url https://nexus.company.com/googleapis-storage-external/chrome-for-testing-public chrome@stable (redacted host) should work and use the specified base URL

Also expects the same resuts by substituting the --base-url option with PUPPETEER_DOWNLOAD_BASE_URL.

Actual results

Whatever I specify in --base-url, the default base URL is used, it does not fail when inserting invalid base URLs, and it does not succeed when using valid base URLs in air-gapped environments.

Base URL option and version used:

$ npx @puppeteer/browsers install --help  | grep base-url
  --base-url  Base URL to download from  [string]
$ npx @puppeteer/browsers install --version
2.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants