Grove/Puppeteer with Docker

Hello guys,

I am having problems trying to use Grove/Puppeteer to generate PDFs with Docker.

When I run my app in my machine (without Docker), I have no errors. I tested on Manjaro, Ubuntu and Debian.

But when tried with Docker, I’ve got this error:

Failed to launch the browser process! spawn /app/node_modules/puppeteer/.local-chromium/linux-782078/chrome-linux/chrome ENOENT TROUBLESHOOTING: puppeteer/docs/troubleshooting.md at main · puppeteer/puppeteer · GitHub

I tried the solutions suggested in puppeteer github docs, but no success.

Does anyone used Grove/Puppeteer with Docker?

Your exact problem is described in the Puppeteer doc you reference, as a Node 14.0.0 bug. What version of Node do you have in your Docker image? It says you can fix it by going to 14.1.0 or even downgrading to v12

Thanks for your response @specious .

I saw this note. I think it isn’t the case because I’m using nodes 12.18.4.

According the research until now, it’s probably a problem related to run puppeteer as root. They recommend run it as a non-root user. I tried create an non-root user but I had problems running the Rails app with this user.

I will dig more into this and try to figure out how to run a Rails app with a non-root user using Docker.