Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

CNRP's avatar
Level 1

Forge / Puppeteer - Failed to launch the browser process!

So i have a project that uses spatie-pdf for invoice generation, had to switch the project to a new server so i've setup the server and the website, everything there went smoothly until I had to then configure spatie-pdf,

I'm having some issue with the browser process however unsure how to address it, ive tried a lot of things but all seem to lead to nowhere, I believe it may be something todo with different newer versions being incompatible but im unsure.

has anyone else had a similar issue? any help at all would be appreicated im stumped with this.

The command "PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH=`npm root -g` /usr/bin/node '/home/forge/gibbons-removals.co.uk/vendor/spatie/browsershot/src/../bin/browser.cjs' '{"url":"file:\/\/\/tmp\/1605781920-0425016001721477685\/index.html","action":"pdf","options":{"args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":true,"headerTemplate":"<p><\/p>","footerTemplate":"<style>\n footer {\n font-size: 12px;\n text-align: right;\n padding-right: 64px;\n width: 100%;\n }\n <\/style>\n\n <footer>\n 07939 352 662 \/ [email protected]\n <\/footer>\n","printBackground":true}}'" failed. Exit Code: 1(General error) Working directory: /home/forge/gibbons-removals.co.uk/public Output: ================ Error Output: ================ Error: Failed to launch the browser process! [0720/121445.840739:FATAL:zygote_host_impl_linux.cc(117)] No usable sandbox! Update your kernel or see 

Worth noting this was perfectly fine before, its only on the new machine that the project no longer works, the code itself should be functional.

Attempting to run on Ubuntu 24.04 (LTS) x64

node -v v18.20.4

npm list -g puppeteer /usr/lib [email protected]

when running sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev libxshmfence-dev

I get the following notices at the end

E: Unable to locate package gconf-service
E: Package 'libasound2' has no installation candidate
E: Unable to locate package libgconf-2-4
E: Unable to locate package libappindicator1

Edit: After futher debugging, i have changed to no-sandbox and the issue is gone. $browsershot->setOption('args', ['--no-sandbox', '--disable-setuid-sandbox']);

When adding the path directly with ->setChromePath('/usr/bin/chromium-browser') It throws a different error. Error: net::ERR_FILE_NOT_FOUND

Which leads me to believe its an issue with the chromium side of things, possibly related to the dependencies not installing. However not really sure what steps to take to fix that.

Is running no sandbox potentially dangerous for production?

1 like
6 replies
Flu's avatar

I had exactly the same problem. I manually installed Chromium on my Forge / Hetzner server:

sudo apt-get install chromium-browser

Then everything worked...

X-Ray's avatar

I'm struggling with this issue now

ashleyevans's avatar

@rfgonzalezweb@gmail.com try installing all the dependencies needed for puppeteer:

Install libraries required for Chromium to work with Puppeteer

sudo apt-get update sudo apt-get install -y
libatk1.0-0
libatk-bridge2.0-0
libcups2
libdrm2
libxcomposite1
libxdamage1
libxrandr2
libgbm-dev
libasound2
libpangocairo-1.0-0
libpango-1.0-0
libcairo2
libnss3
libxss1
libx11-xcb1
libxcb1
libxext6
libx11-6
libxcursor1
libxfixes3
libxi6
libxtst6
libglib2.0-0

P-James's avatar

I tried everything in this thread but only the disable sandbox arg option worked as in OP's post

Please or to participate in this conversation.