ExecutablePath option ignored
See original GitHub issueMacOS / BigSur Node 16 (Head) puppeteer-core, 5.5.0
const puppeteer = require('puppeteer-core');
const browser = await puppeteer.launch({
product: 'chrome',
headless: false,
executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
});
Fails with
Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT
As I understand it, it should not be trying to launch chromium at all given the above options and use of puppeteer-core.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Configure Puppeteer executablePath chrome in your local ...
When I did a local development test in windows, happen was problem in executablePath. "Failed to launch chrome! spawn /usr/bin/chromium-browser ...
Read more >".NET Cli executable path" option is ignored for starting MSBuild.dll ...
NET Cli executable path" option is ignored for starting MSBuild.dll ... So Rider attempts to use /usr/share/dotnet/dotnet and ignores the setting.
Read more >fix(inspector): fall back to custom executable path for UI (#6214)
fix(inspector): fall back to custom executable path for UI (#6214. An error occurred. ) ... Pass "executablePath" option directly.`);.
Read more >Executable path is not absolute - linux - Super User
[/lib/systemd/system/sidekiq.service:30] Executable path is not absolute, ignoring: ... Service lacks both ExecStart= and ExecStop= setting.
Read more >Configuration — SQLFluff 1.4.5 documentation
Additionally, some rules have a special force_enable configuration option, ... Ignoring Jinja templating errors provides a way for users to use SQLFluff ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If however, one modifies the BrowserRunner directly to hardcode the executablePath as shown above, all works as expected. So it seems to be an issue with how the option is being passed to Puppeteer, or how it’s being handled.
This prints
>>>> /usr/bin/chromium-browserand then proceeds to launch Google Chrome as expected.This happens on Apple Silicon. The path is hardcoded at https://github.com/puppeteer/puppeteer/blob/d901696e0d8901bcb23cf676a5e5ac562f821a0d/src/node/Launcher.ts#L106-L109 introduced in https://github.com/puppeteer/puppeteer/commit/354f9424ae4014e0cd276a930d86a6dae8fe427e
Chromium can run natively on Apple Silicon. Puppeteer does not yet link to that binary, but if the developer uses
executablePathto point to another Chrome instance (that might not be compatible with Puppeteer), they already take on those risks and the library should just accept that path.