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.

Failed to launch the browser process!

See original GitHub issue

I get this error when I start my next app with yarn dev

error - Error: Failed to launch the browser process! spawn C:\Program Files (x86)\Google\Chrome\Application\chrome.exe ENOENT

I have chrome installed on my system but its, not in the path printed in the error. It is in the 64bit folder. C:\Program Files\Google\Chrome\Application

My ENV

  • Node 16.1.0.0
  • Next 12.1.0
  • chrome-aws-lambda 1.6.3
  • Windows

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Sumis34commented, May 25, 2022

same problem here. I used the following steps

  • yarn create next-app –typescript
  • yarn add next-api-og-image chrome-aws-lambda
  • Create github repo and push
  • added file pages/api/ogimage/index.js with code pasted from https://github.com/neg4n/next-api-og-image/blob/main/example/pages/api/basic.js
  • Create Vercel app and deploy
  • When i visit the url i see the generic Next home page
  • When i visit /api/ogimage,
  • Then it fails with 500 error and logs say
[GET] /api/ogimage
11:06:35:54
2022-05-23T15:06:40.106Z	6ea5bf36-a40a-4c0a-998e-891d7abd8541	ERROR	Error: Failed to launch the browser process!
/tmp/chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
    at onClose (/var/task/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
    at Interface.<anonymous> (/var/task/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
    at Interface.emit (node:events:532:35)
    at Interface.close (node:readline:586:8)
    at Socket.onend (node:readline:277:10)
    at Socket.emit (node:events:532:35)
    at endReadableNT (node:internal/streams/readable:1346:12)

@linojon I think your Problem is a different one. If you are using Node 16.x on Vercel try version 14.x. Because not all versions of chrome-aws-lambda support version 16

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: Failed to launch the browser process puppeteer
What works for me was to download chromium manually sudo apt-get install chromium-browser . And then, tell Puppeteer where chromium is located :...
Read more >
[Bug]: Failed to launch the browser process! #7917 - GitHub
An error is thrown when I use the following code! const browser = await puppeteer.launch({ headless: true });.
Read more >
Troubleshooting - Puppeteer
This means that the browser was downloaded but failed to be extracted correctly. The most common cause is a bug in Node.js v14.0.0...
Read more >
Puppeteer - Failed to launch the browser process! - DietPi
Puppeteer - Failed to launch the browser process! ... There seems to be a syntax error in one of the script you are...
Read more >
Failed to launch the browser process! spawn puppeteer Code ...
error failed to launch the browser process puppeteer ; 1. // Puppeteer Error on ubuntu 100% Correct Solution by Vivek ; 2. wget...
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