rong
rong

Reputation: 121

How to set PUPPETEER_DOWNLOAD_HOST?

When I install puppeteer, I am getting this error.

ERROR: Failed to set up Chromium r901912! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
Error: Download failed: server returned code 403. URL: 
https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/901912/chrome-linux.zip

So I download the zip file and put it to local artifactory: https://artifactory.company.com/dept/team/project/chrome-linux.zip.

How should I set PUPPETEER_DOWNLOAD_HOST? If I set it like this, does it work?

export PUPPETEER_DOWNLOAD_HOST=https://artifactory.company.com/dept/team/project

If I renamed the zip file name to chromium-linux-x64-r901912.zip, how should I set PUPPETEER_DOWNLOAD_HOST then?

Actually I don't understand https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#environment-variables.

Upvotes: 1

Views: 3804

Answers (1)

rong
rong

Reputation: 121

The file must be put here: https://artifactory.company.com/dept/team/project/chromium-browser-snapshots/Linux_x64/901912/chrome-linux.zip

The file name must be chrome-linux.zip.

export PUPPETEER_DOWNLOAD_HOST=https://artifactory.company.com/dept/team/project

export PUPPETEER_CHROMIUM_REVISION=901912

Upvotes: 2

Related Questions