Error: Failed to launch the browser process with Puppeter

Hello There. I'm getting the following error:
file:///home/myuser/node_modules/@puppeteer/browsers/lib/esm/launch.js:268 reject(new Error([ ^ Error: Failed to launch the browser process![0813/134155.218723:FATAL:zygote_host_impl_linux.cc(127)] No usable sandbox! Update your kernel or see https://chromium.googlesource.com/chromium/src/+/main/docs/linux/suid_sandbox_development.md for more information on developing with the SUID sandbox. If you want to live dangerously and need an immediate workaround, you can try using --no-sandbox.
I'm using the standard template "Crawlee + Puppeteer + Chrome" Using the following code
import puppeteer from 'puppeteer'; const browser = await puppeteer.launch();
Any idea how I solve the error?
5 Replies
NeoNomade
NeoNomade2y ago
You are running locally or dockerized ?
xenial-black
xenial-blackOP2y ago
dockerized
NeoNomade
NeoNomade2y ago
use the --no-sandbox arg or like this :
const config = Configuration.getGlobalConfig();
config.set('disableBrowserSandbox', true);
const config = Configuration.getGlobalConfig();
config.set('disableBrowserSandbox', true);
xenial-black
xenial-blackOP2y ago
Thank @NeoNomade that solved my issue
NeoNomade
NeoNomade2y ago
My pleasure ! Good luck in your projects !

Did you find this page helpful?