puppeteer: Puppeteer not working with node 14

Steps to reproduce

Tell us about your environment:

  • Puppeteer version:3.0.1
  • Platform / OS version:docker (FROM:node:14.0.0-buster)
  • URLs (if applicable):
  • Node.js version: 14.0.0

What steps will reproduce the problem?

Please include code that reproduces the issue.

  1. Upgrade node image from 13.13.0 -> 14.0.0
  2. Run same codebase (puppeteer.launch())

What is the expected result? code runs without issues, just like on 13.13.0

What happens instead? Error: Failed to launch the browser process! spawn /opt/app/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome ENOENT

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 18
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Fixed by Node 14.1.0. Verified on Linux/Mac/Windows.

It looks like it’s a problem with extraction. A temporary workaround is to extract the downloaded chromium manually:

$ mv node_modules/puppeteer/.local-chromium/mac-737027 node_modules/puppeteer/.local-chromium/mac-737027.bak 
$ unzip node_modules/puppeteer/.local-chromium/chrome-mac.zip -d node_modules/puppeteer/.local-chromium/mac-737027

It also looks like the suspected bug might have been in Node: https://github.com/nodejs/node/pull/32968.

In which case we may have to sit tight for a Node patch release. In the mean time I’ll see if the error message from Puppeteer can be nicer.

Thanks for the debugging all; looks like extract-zip is indeed the culprit here. It would be nice if Puppeteer gave a more helpful message than /opt/app/node_modules/puppeteer/.local-chromium/linux-737027/chrome-linux/chrome ENOENT so I’ll try to look into that.

We’ll see if a fix lands in extract-zip and do some digging.

@DRoet you can install via the master branch on GitHub to get the very latest.

Can confirm it is working again on 14.1.0, but the new node14 timeout indeed fails sometimes on slower CI runs.

I have opened https://github.com/puppeteer/puppeteer/pull/5732 which at least fixes the silent failures and provides a helpful message.