puppeteer icon indicating copy to clipboard operation
puppeteer copied to clipboard

Unable to download both chromium and firefox

Open LarsDenBakker opened this issue 4 years ago • 11 comments

It's possible to influence the postinstall script by setting the puppeteer product environment variable.

However this variable accepts only a single value, while I'd like to use puppeteer to run both chromium and firefox in a single project.

PUPPETEER_PRODUCT is already used for running puppeteer, so it makes sense that it's a single value only. Could we perhaps add a separate environment variable to configure just the installation behavior, which allows setting multiple products? For example PUPPETEER_INSTALL=chrome,firefox.

LarsDenBakker avatar Jul 16 '20 06:07 LarsDenBakker

This will be possible once puppeteer-firefox is no longer experimental. cc @mjzffr

mathiasbynens avatar Jul 16 '20 06:07 mathiasbynens

Why is this reliant on the experimental status? From what I can tell, this is mostly a change that's needed in the installation script.

LarsDenBakker avatar Jul 17 '20 06:07 LarsDenBakker

Once puppeteer-firefox is no longer experimental, npm i puppeteer will install both browsers.

mathiasbynens avatar Jul 17 '20 06:07 mathiasbynens

See workaround at https://github.com/puppeteer/puppeteer/issues/5743#issuecomment-621664876

On Fri., Jul. 17, 2020, 02:54 Mathias Bynens, [email protected] wrote:

Once puppeteer-firefox is no longer experimental, npm i puppeteer will install both browsers.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/puppeteer/puppeteer/issues/6225#issuecomment-659904099, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABN6ZBRIKY4UQOSM5XVVJNLR37YUFANCNFSM4O3UKSSQ .

mjzffr avatar Jul 17 '20 12:07 mjzffr

@mjzffr @mathiasbynens Thanks for the info. Do we have any rough estimates or goals when it will no longer be experimental? We want to ship (experimental) firefox support for puppeteer in web test runner. I'm happy to create a PR to create a solution for the short term.

LarsDenBakker avatar Aug 07 '20 19:08 LarsDenBakker

@LarsDenBakker What would your short-term solution be?

mjzffr avatar Aug 10 '20 13:08 mjzffr

@mjzffr This issue has been open quite a while but in the event you haven't found a solution, this is what I'm doing in package.json.

"prepare": "node -e \"require('child_process').execSync('cross-env PUPPETEER_PRODUCT=firefox node node_modules/puppeteer/install.js');\""

pyoor avatar Jan 27 '21 03:01 pyoor

Note that this is blocked by issue #6371.

whimboo avatar Feb 17 '21 09:02 whimboo

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

stale[bot] avatar Jun 24 '22 17:06 stale[bot]

Note that this is blocked by issue #6371.

@OrKoN I would leave this up to you to decide. Not sure if issue #6371 should really block here.

whimboo avatar Jun 24 '22 20:06 whimboo

There is already a CLI interface to download other browsers:

npx puppeteer browsers install firefox

We also want to update the configuration to allow configuring browsers for download (and probably corresponding env variables) (cc @Lightning00Blade)

OrKoN avatar May 24 '24 07:05 OrKoN