puppeteer
puppeteer copied to clipboard
Unable to download both chromium and firefox
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
.
This will be possible once puppeteer-firefox is no longer experimental. cc @mjzffr
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.
Once puppeteer-firefox is no longer experimental, npm i puppeteer
will install both browsers.
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 @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 What would your short-term solution be?
@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');\""
Note that this is blocked by issue #6371.
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.
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.
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)