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.

PUPPETEER_EXECUTABLE_PATH ignored on arm64 machines

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 8.0.0
  • Platform / OS version: MacOS Big Sur (Macbook Air M1)
  • URLs (if applicable): -
  • Node.js version: 15.11.0

What steps will reproduce the problem?

Please include code that reproduces the issue.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({ path: 'example.png' });

  await browser.close();
})();
  1. brew install chromium
  2. npm install puppeteer
  3. Save the above script as index.js
  4. PUPPETEER_EXECUTABLE_PATH="/opt/homebrew/bin/chromium" node index.js

What is the expected result?

It should try to use /opt/homebrew/bin/chromium as the path to the browser executable.

What happens instead?

Puppeteer always overwrites the executable path specified via the environment variable internally and falls back to /usr/bin/chromium-browser. Setting executablePath explicitly in launch options works though:

// works, only setting via env var doesn't work
await puppeteer.launch({ executablePath: "/opt/homebrew/bin/chromium" });

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:28
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
marvinhagemeistercommented, Jun 24, 2022

ping (to avoid stale bot)

0reactions
Saibamencommented, Dec 15, 2022

This same on PuppeteerSharp 8.0.0 and Google Chrome 100.0.4896.127-1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Puppeteer
Make sure all the necessary dependencies are installed. You can run ldd chrome | grep not on a Linux machine to check which...
Read more >
Failed Puppeteer/Chromium installation with Node.js, ARM64 ...
Setting Chromium executablePath. Chromium was installed to /usr/bin/google-chrome-stable on the EC2 instances, but this path doesn't ...
Read more >
Puppeteer documentation - DevDocs
Puppeteer 7.1.0 API documentation with instant search, offline support, keyboard shortcuts, mobile version, and more.
Read more >
Practical Puppeteer: Playing with Puppeteer Core package
Get the executable path for Chrome or Chromium browser. On my Ubuntu machine, I just type this. whereis google-chrome-stable.
Read more >
How to fix M1 Mac Puppeteer chromium arm64 bug
The chromium binary is not available for arm64: If you are on Ubuntu, you can install with: apt-get install chromium-browser path-to-project/node_modules/ ...
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