question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature Request]: use CHROME_BIN if present as a source for configuration.executablePath

See original GitHub issue

Bug description

Currently Puppeteer forces the use of PUPPETEER_EXECUTABLE_PATH,

I think it’s subpar to name it _PATH either way, but the convention for images that also must host selenium, or protractor, karma, or other utilities is CHROME_BIN. I would suggest using or adopting this convention, or at the least sourcing from the environmental variable CHROME_BIN.

This request is to add CHROME_BIN to this https://github.com/puppeteer/puppeteer/blob/4bf338b26d6cceae2dc718074ed9839e905905f2/packages/puppeteer/src/getConfiguration.ts#L49

Puppeteer version

current

Node.js version

current

npm version

current

What operating system are you seeing the problem on?

Linux

Configuration file

No response

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 9 months ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
OrKoNcommented, Dec 21, 2022

So we think the cost is too high to enable this by default given that it’s easy for anyone to re-map one variable to the puppeteer-specific one. The only opportunity to ship it would by making this new behaviour an opt-in mechanism: e.g., PUPPETEER_USE_CHROME_BIN_CONVENTION=true would make Puppeteer look into CHROME_BIN & FIREFOX_BIN variables.

0reactions
EvanCarrollcommented, Dec 21, 2022

Opinion on this

Cool, I’ll close the issue then but I expect to see it pop up if CHROME_BIN or FIREFOX_BIN is set I’m going to guess 100% of people do not_want_ these utilities downloaded it so we’re at an impasse and have a different understanding. Even in this case where it is set in image creation, the reason is because no one is going to want their image to download a newer copy. And if they do want a newer copy, what they’d do is pull down ubuntu-latest, layer a newer chrome in the same place by rerunning the same google-chrome.sh and committing the container to a new baked image.

Images for runners are supposed to be fully baked. If they’re not the result isn’t reproducible. The idea that a testing framework has an environment not known until execution that based on the executable on Chrome’s server seems like an un-ideal defalt.

Remember, if CHROME_BIN and FIREFOX_BIN are NOT set nothing changes.

Other potential solution

I mean if they do want that… maybe some do. They should be setting the flag to enable the download regardless of CHROME_BIN set. For example, let’s say an image was baked with

CHROME_BIN=/foo/bar/baz
FIREFOX_BIN=/foo/bar/qux

What is puppeteer

  • default to CHROME_BIN
  • could be run with PUPPETEER_PRODUCT=firefox puppeteer to use to FIREFOX_BIN
  • could download as it currently does with PUPPETEER_FORCE_DOWNLOAD=1

Regardless I’m good now, I’m just trying to save everyone using this stuff in a pipeline at a company from running into these problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ChromeHeadless (Puppeteer) not captured when running ...
Trying to convert my karma config from phantomjs to puppeteer but I'm facing issues ... After debugging, the CHROME_BIN is available here: ...
Read more >
107006 - Feature request: ability to replay a previously ...
The network pane in devtools shows a list of all of the requests made, ... This feature is now available using network request...
Read more >
Feature Requests: What are they and how to manage them
Feature requests are a form of product feedback you may frequently encounter as a SaaS product manager. They typically come in the form...
Read more >
3 ways to manage software feature request
Feature requests are a great source of product ideas to improve software, but aggregating, analysing and prioritizing them can be a challenge. Whether...
Read more >
Cannot find Chrome. Try setting CHROME_EXECUTABLE ...
There are some errors in Flutter Doctor . How Could I solve this. That happen Afer Updated my Flutter Version. I am Using...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found