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 the browser process! on AWS EC2 , working fine on local

See original GitHub issue

Bug description

/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory

this is the error I am facing when pushed code on AWS server. Code is working fine on local machine. Tried a lot of puppeteer version i.e 18.2.1, 18.0.5, 15.5.0.

Puppeteer version

18.2.1, 18.0.5, 15.5.0

Node.js version

16.10.0

npm version

7.24.0

What operating system are you seeing the problem on?

Linux

Relevant log output

Error: Failed to launch the browser process!
0|app      | /var/www/html/bptreat/api/node_modules/puppeteer/.local-chromium/linux-1002410/chrome-linux/chrome: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory
0|app      |
0|app      |
0|app      | TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
0|app      |
0|app      |     at onClose (/var/www/html/bptreat/api/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:286:20)
0|app      |     at Interface.<anonymous> (/var/www/html/bptreat/api/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:274:24)
0|app      |     at Interface.emit (node:events:539:35)
0|app      |     at Interface.close (node:internal/readline/interface:529:10)
0|app      |     at Socket.onend (node:internal/readline/interface:258:10)
0|app      |     at Socket.emit (node:events:539:35)
0|app      |     at endReadableNT (node:internal/streams/readable:1345:12)
0|app      |     at processTicksAndRejections (node:internal/process/task_queues:83:21)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
sakshibhatiaVEcommented, Oct 11, 2022

Its working finally. I tried there two commands.

sudo amazon-linux-extras install epel -y sudo yum install -y chromium

Thanks @OrKoN

0reactions
srigarcommented, Oct 11, 2022

Same happening in Jenkins step in docker and working fine in local with same node version. Node version: 14.20.0

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 >
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 >
Fix this error when using Puppeteer on Lambda - YouTube
Failed to launch the browser process - Fix this error when using Puppeteer on Lambda ... When you are working with Puppeteer on...
Read more >
Troubleshoot connecting to your instance - AWS Documentation
Common causes for connection issues; Error connecting to your instance: Connection timed out; Error: unable to load key ... Expecting: ANY PRIVATE KEY ......
Read more >
Error: Failed to launch the browser process puppeteer-node.js
For me an issue was due to I was running puppeteer.launch(..) on every request. I start the browser once and reuse the same...
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