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

Failed To Launch Browser Process #76

Open
zpottie opened this issue Oct 8, 2024 · 2 comments
Open

Failed To Launch Browser Process #76

zpottie opened this issue Oct 8, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@zpottie
Copy link

zpottie commented Oct 8, 2024

Hi there,

Apologies if I'm polluting your issues, but just wanted to put this here in case it helps someone else, as I came looking here first as we use your library.

Redeployed our code today and PDF generation broke. Looks like it may be a bug introduced by Chrome?
chrome-php/chrome#649

Uncaught PHP Exception Spiritix\Html2Pdf\ConverterException: "Binary error: file:///PATH/TO/PROJECT/vendor/spiritix/php-chrome-html2pdf/node_modules/@puppeteer/browsers/lib/esm/launch.js:301
    reject(new Error([                        
        ^  Error: Failed to launch the browser process! chrome_crashpad_handler: --database is required Try 'chrome_crashpad_handler --help' for more information. [1796849:1796849:1008/000936.708637:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)   TROUBLESHOOTING: https://pptr.dev/troubleshooting      at Interface.onClose (file:///PATH/TO/PROJECT/vendor/spiritix/php-chrome-html2pdf/node_modules/@puppeteer/browsers/lib/esm/launch.js:301:24)     at Interface.emit (node:events:529:35)     at Interface.close (node:internal/readline/interface:534:10)     at Socket.onend (node:internal/readline/interface:260:10)     at Socket.emit (node:events:529:35)     at endReadableNT (node:internal/streams/readable:1400:12)     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)  Node.js v18.20.4 " at Converter.php line 271...

Hope this helps someone else!

@zpottie
Copy link
Author

zpottie commented Oct 8, 2024

What ended up working for me, or at least a work-around for now, is to create the directories like mentioned in the linked issue:
chrome-php/chrome#649 (comment)

sudo mkdir -p /home/www/.config/google-chrome/Crashpad
sudo chown -R www-data:www-data /home/www/.config

@darkvovich
Copy link

Same problem on Debian (

@spiritix spiritix added bug Something isn't working help wanted Extra attention is needed labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants
@darkvovich @spiritix @zpottie and others