Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac M1 stopped working #393

Open
avefalco opened this issue Jun 28, 2021 · 10 comments
Open

Mac M1 stopped working #393

avefalco opened this issue Jun 28, 2021 · 10 comments
Labels
M1Macs question Further information is requested

Comments

@avefalco
Copy link

I recently got an M1 Mac, it stopped recognising the chromium even tho i have chronium installed.

the error:
Launching headless Chrome to perform the OpenID Connect dance...

[ERROR] Error: Failed to launch the browser process! spawn /usr/bin/chromium-browser ENOENT

TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

at onClose (/Users/Steve/destreamer/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
at ChildProcess.<anonymous> (/Users/Steve/destreamer/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:185:85)
at ChildProcess.emit (node:events:394:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
at onErrorNT (node:internal/child_process:480:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

i have tried changing the path into chrome with following code and rebuild but still no luck
executablePath: '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser',

@snobu
Copy link
Owner

snobu commented Jun 28, 2021

Plugging in Brave should work, make sure executablePath is exactly what navigating to chrome://version shows in your browser.

@snobu
Copy link
Owner

snobu commented Jun 28, 2021

Also, i think you also need to replace puppeteer with puppeteer-core for M1 Macs. See this other issue which has the solution - #355

You may or may not have to do that, so try the simple solution first, getting the right executable path from chrome://version.

@snobu snobu added the M1Macs label Jun 28, 2021
@avefalco
Copy link
Author

avefalco commented Jun 28, 2021 via email

@notsuhas
Copy link

Hi, I'm also stuck here with the same error. Can I know what to change in those 2 lines? @snobu @lukaarma

@hidehiro98
Copy link

It works perfectly on Mac M1.

My steps are below.

  1. Changed puppeteer to puppeteer-core (Support for Apple Silicon (M1) #355 (comment))
  2. Update codes (Support for Apple Silicon (M1) #355 (comment))
  3. Commented out codes L. 13 to L. 18 in src/PuppeteerHelper.ts and added const browserPath = ''; on L. 19
  4. npm run build
  5. Yay!

@lukaarma
Copy link
Collaborator

I'm sorry for the late reply but life got in the way. Do you still need help?

@lukaarma lukaarma added the question Further information is requested label Oct 15, 2021
@niXta1
Copy link

niXta1 commented Aug 25, 2022

It would be nice with a pre fixed M1 version 🤷🏼‍♂️

@snobu
Copy link
Owner

snobu commented Aug 25, 2022

Happy to be gifted an M1 to build and test on. Let it be an Ultra just to make sure we cover that as well :)

But seriously though, if someone with an M1 sends a pull request with a fix, I'll merge it in.

@niXta1
Copy link

niXta1 commented Aug 25, 2022

Happy to be gifted an M1 to build and test on. Let it be an Ultra just to make sure we cover that as well :)

But seriously though, if someone with an M1 sends a pull request with a fix, I'll merge it in.

I’m just gonna win the lottery and it will be on it’s way 😉
Would it need to be in the old script or modified to a new separate m1 script?

@hidehiro98 seems to know what he’s doing. Any chances for a pull request?

@hakt0-r
Copy link

hakt0-r commented Jun 24, 2023

if ppl come looking for a fix on M1 macs and/or latest macOS see this #487 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M1Macs question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants