chromium: [BUG] spawn Unknown system error -8
Environment
chromiumVersion: chromium-min 110.0.1puppeteer/puppeteer-coreVersion: puppeteer-core 19.6.3- Node.js Version: 18.14.1
- Lambda / GCF Runtime: running locally first
Expected Behavior
I tried to run the code here.
Current Behavior
Error: spawn Unknown system error -8
at ChildProcess.spawn (node:internal/child_process:413:11)
at Module.spawn (node:child_process:757:9)
at BrowserRunner.start (file:///app/node_modules/puppeteer-core/lib/esm/puppeteer/node/BrowserRunner.js:91:34)
at ChromeLauncher.launch (file:///app/node_modules/puppeteer-core/lib/esm/puppeteer/node/ChromeLauncher.js:68:16)
Steps to Reproduce
See above.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 8
- Comments: 17 (3 by maintainers)
Commits related to this issue
- Add docs on how to run locally and headfully fixes #63 fixes #69 fixes #38 fixes #55 fixes #42 fixes #28 — committed to Sparticuz/chromium by Sparticuz 4 years ago
For local development I did this and bow it’s working.
This happened for me because I was on the new macOS “Apple Silicon” in the terminal Apple will not prompt you to install Rosetta which is required for certain apps to run. Simply running
softwareupdate --install-rosettasolved the issue for me.More information about Rosetta here https://support.apple.com/en-gb/HT211861
on M1 you can do a
arch -x86_64 zshin your terminal prior to running and it should work. You’ll need to have the x86 packages installed prior to. You can do it by running this for example
npm install --arch=x86 --save puppeteer-core@18.0.5npm install --arch=x86 --save @sparticuz/chromium@106For me it works with next solution
install Chromium and make a fix because without it the error can happen when you try to launch Cromium. https://dev.to/pixelrena/installing-chromium-on-mac-apple-m2-pro-tutorial-4i4i
Use next code for launch pupeeter locally https://github.com/puppeteer/puppeteer/issues/6634#issuecomment-755430921
On my side it looks like.
Mac M1. Node.js v18.18.2
And from the package.json “@sparticuz/chromium”: “110.0.0”, “puppeteer”: “19.6.3”, “puppeteer-core”: “19.6.3”,
@Kal-Toh I’ve managed to make it work… with playwright. I’ve installed playwright-core as a dependency and playwright as a devDependency and now it knows how to spawn the browser. I’ve tried the same solution with puppeteer but I couldn’t make it work.
Yeah, the issue for me was that it wasn’t compatible with my systems architecture, thus wouldn’t work on a local environment. It functions as expected when deployed.
Best thing to do is code>deploy>test>code>deploy>test etc.