Using the eckinox/pdf-bundle in Symfony 6.4, I’m hitting an issue when calling he node script which calls Puppeteer.
2024-07-03T11:03:39.923Z puppeteer:browsers:launcher Launched 7250
2024-07-03T11:03:40.026Z puppeteer:browsers:launcher Trying to kill 7250
2024-07-03T11:03:40.026Z puppeteer:browsers:launcher Browser process 7250 exists
/home/platform.company.com/public_html/node_modules/@puppeteer/browsers/lib/cjs/launch.js:310
reject(new Error([
^
Error: Failed to launch the browser process!
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at Interface.onClose (/home/platform.company.com/public_html/node_modules/@puppeteer/browsers/lib/cjs/launch.js:310:24)
at Interface.emit (node:events:531:35)
at Interface.close (node:internal/readline/interface:528:10)
at Socket.onend (node:internal/readline/interface:254:10)
at Socket.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v20.15.0
I’ve stripped the whole thing back to just this command (to find the Chrome version) which produces the same error.
const puppeteer = require('puppeteer');
(async()=>{const x = require("puppeteer"); console.log(await(await(await x.launch()).newPage()).browser().version())})()
If I execute the js from command line, it works fine. Both use the same user, environment variables and permissions. The difference is that the PHP bundle calls node from EXEC.
New contributor
user25977261 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.