puppeteer failed to launch browser process
Hi, i am using puppeteer to create PDFs from HTML and the service works fine but every once and then i get this error:
Error: Failed to launch the browser process!
[1229/174125.129057:ERROR:bus.cc(397)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[1229/174125.155350:ERROR:platform_thread_posix.cc(148)] pthread_create: Resource temporarily unavailable (11)
sometimes the service finally crashes because of the acumulation of errors. I read something about browserless solution but i didnt understand. Please can someone help me?
proyect ID: 3732fa00-baf1-4b91-bc1d-cd832d86a4bc
8 Replies
Project ID:
3732fa00-baf1-4b91-bc1d-cd832d86a4bc
send your package.json please
"dependencies": {
"@aws-sdk/client-s3": "^3.395.0",
"@aws-sdk/client-ses": "^3.395.0",
"@ironsoftware/ironpdf": "^2023.11.2",
"aws-sdk": "^2.1360.0",
"axios": "^1.2.2",
"bcryptjs": "^2.4.3",
"blob-to-buffer": "^1.2.9",
"config": "^3.3.7",
"cors": "^2.8.5",
"dotenv": "^16.0.2",
"emailjs-mime-builder": "^2.0.5",
"exceljs": "^4.3.0",
"express": "^4.18.2",
"handlebars": "^4.7.8",
"html2pdf": "^0.0.11",
"html2pdf.js": "^0.10.1",
"jsonwebtoken": ">=9.0.0",
"jspdf": "^2.5.1",
"mongoose": "^6.0.12",
"multer": "^1.4.5-lts.1",
"node-cron": "^3.0.2",
"node-fetch": "^2.6.1",
"nodemailer": "^6.8.0",
"nodemailer-express-handlebars": "^6.0.0",
"puppeteer": "^12.0.1",
"tls": "^0.0.1",
"ts-node": "^10.9.1"
},
are you specifying the location of chrome anywhere in your code?
this is my only puppeteer related code
looks fine to me, I'm sorry I have no clue, have you tried researching your error? it would not be specific to a deployment on railway
i have, but i did not find anything. What about the browserless alternative, do you think it my solve the issue?
i have never used browserless myself