Error: Failed to launch the browser process! on AWS EC2 , working fine on local
See original GitHub issueBug 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:
- Created a year ago
- Comments:6
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Its working finally. I tried there two commands.
sudo amazon-linux-extras install epel -y sudo yum install -y chromium
Thanks @OrKoN
Same happening in Jenkins step in docker and working fine in local with same node version. Node version: 14.20.0