question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Failed to launch chrome! spawn /app/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome ENOENT

See original GitHub issue

Steps to reproduce

Tell us about your environment:

  • Puppeteer version: 1.11.0
  • Platform / OS version: MAC 10.14.3
  • URLs (if applicable):
  • Node.js version: v8.9.4

I have been trying to get my Node application, using Puppeteer as the testing framework to run via docker. It works perfectly well when running locally on my. However when running via container I keep running into the same issue.

I have tried almost every boiler-plate Dockerfile I have seen from other users online but none of them can address the issue Im seeing.

Error: Failed to launch chrome! spawn /app/node_modules/puppeteer/.local-chromium/linux-609904/chrome-linux/chrome ENOENT

When I see other people with this issue they all seem to show different linux versions and not the specific one I am seeing after download: linux-609904. What is the best way to audit whats wrong with this version?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:31
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

90reactions
ben-turnercommented, Aug 23, 2019

@arapocket Thanks for commenting—I forgot to follow up after I found a solution. It’s been a couple of weeks so I don’t remember exactly which change fixed it, but here’s the configuration I’m running:

In my Dockerfile I have

RUN apk add --nocache udev ttf-freefont chromium git
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV CHROMIUM_PATH /usr/bin/chromium-browser

// npm install, etc.

And then to launch the browser

puppeteer.launch({
  executablePath: process.env.CHROMIUM_PATH,
  args: ['--no-sandbox'], // This was important. Can't remember why
});

I also locked puppeteer to 1.17.0 in my package.json. I think that was to make the chromium and puppeteer versions match.

29reactions
ben-turnercommented, Aug 9, 2019

I’m running puppeteer on node:12-alpine. After building the container, I’ve been shelling into it with docker run -ti [container] /bin/sh. I can then see that there is indeed a binary at /home/node/node_modules/puppeteer/.local-chromium/linux-674921/chrome-linux/chrome, but if I try to run it, I get the error /bin/sh: ./chrome: not found, which matches up with the ENOENT error that I get from puppeteer. I’ll follow up here if I find a solution, but I just wanted to point out that it might not be a failed download in case anyone else comes across this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 - Stack Overflow
Failed to launch chrome ! spawn ...node_modules/puppeteer/.../chrome ENOENT TROUBLESHOOTING when using Puppeteer · Ask Question. Asked ...
Read more >
Troubleshooting - Puppeteer
You can run ldd chrome | grep not on a Linux machine to check which dependencies ... Error: Failed to launch chrome! spawn...
Read more >
Discussion of How to use Puppeteer inside a Docker container
... but throws the following error. "Failed to launch the browser process! spawn /usr/bin/google-chrome ENOENT\n\n\nTROUBLESHOOTING: ...
Read more >
Internal browser error: Failed to launch the browser process!
Internal browser error: Failed to launch the browser process! ... /puppeteer/.local-chromium/linux-756035/chrome-linux/chrome: error while ...
Read more >
Docker: puppeteer not working on a Express (NestJS) app
Error : Failed to launch the browser process! spawn /usr/src/app/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome ENOENT Nov 19 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found