Replies: 2 comments
-
Hi you can use headless browser linux download here https://googlechromelabs.github.io/chrome-for-testing step:
then set your Browser to |
Beta Was this translation helpful? Give feedback.
0 replies
-
@blauweb I had the same error, and finally solved it! See this spatie/browsershot#844. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
I get this error when attempting to generate a PDF from view, using puppeteer version 22.* for laravel-pdf:
The command "PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH=
npm root -g
node '/var/www/[project]/vendor/spatie/browsershot/src/../bin/browser.cjs' '{"url":"file:///tmp/1258003998-0789288001709851462/index.html","action":"pdf","options":{"args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":false,"printBackground":true}}'" failed. Exit Code: 1(General error) Working directory: /var/www/[project]/public Output: ================ Error Output: ================ Error: Failed to launch the browser process! chrome_crashpad_handler: --database is required Try 'chrome_crashpad_handler --help' for more information. [103327:103327:0307/234423.046451:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104) TROUBLESHOOTING: https://pptr.dev/troubleshooting at Interface.onClose (/var/www/[project]/node_modules/@puppeteer/browsers/lib/cjs/launch.js:267:24) at Interface.emit (node:events:526:35) at Interface.close (node:internal/readline/interface:533:10) at Socket.onend (node:internal/readline/interface:259:10) at Socket.emit (node:events:526:35) at endReadableNT (node:internal/streams/readable:1359:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)Puppeteer was installed using the suggested config files, to have the chrome instances loaded into the projects folder, instead of the system user folder.
Puppeteer itself is not issue, because when attempting to read data from a page using the JS in a separate JS file, and then running it via node, puppeteer is able to open, read and close a page without issues.
The error does not happen with puppeteer version below <22.0!
When reading the changelog at puppeteer, it looks like something has changed with the browser sessions.
Environment:
Ubuntu 22.0
How to reproduce the bug
Package Version
1.4.0
PHP Version
8.2
Laravel Version
10
Which operating systems does with happen with?
Linux
Notes
No response
Beta Was this translation helpful? Give feedback.
All reactions