shawnliujw / puppeteer-lambda

Module for using Headless-Chrome by Puppeteer on AWS Lambda.
MIT License
117 stars 20 forks source link

error during run #24

Closed liorg2 closed 5 years ago

liorg2 commented 5 years ago

when I run on lambda I get the following error:

/tmp/headless-chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

at onClose (/var/task/node_modules/puppeteer/lib/Launcher.js:342:14) at Interface.helper.addEventListener (/var/task/node_modules/puppeteer/lib/Launcher.js:331:50) at Interface.emit (events.js:194:15) at Interface.EventEmitter.emit (domain.js:441:20) at Interface.close (readline.js:379:8) at Socket.onend (readline.js:157:10) at Socket.emit (events.js:194:15) at Socket.EventEmitter.emit (domain.js:441:20) at endReadableNT (_stream_readable.js:1125:12) at process._tickCallback (internal/process/next_tick.js:63:19) Failed to launch chrome! /tmp/headless-chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

image

shawnliujw commented 5 years ago

just confirmed , now the complied chromeless binary https://github.com/adieuadieu/serverless-chrome/releases doesn't support AWS lambda node 10.x , please use the version nodejs8.10

liorg2 commented 5 years ago

Thanks a lot for replying . For anyone that will face the same issue as mine, trying to work with google lighthouse 5 and puppeteer-lambda: Lighthouse requires Node 10 LTS (10.13) or later.

shawnliujw commented 5 years ago

You can have a try to build the chromium , i will also give a try

liorg2 commented 5 years ago

If you send me a guide I can do it

shawnliujw commented 5 years ago

I have updated the readme file, u can find from there

johnbalvin commented 4 years ago

just confirmed , now the complied chromeless binary https://github.com/adieuadieu/serverless-chrome/releases doesn't support AWS lambda node 10.x , please use the version nodejs8.10 Aws does not support 8.x version anymore

image

hansooms999 commented 3 years ago

The issue was fixed for me when I changed my node.js runtime from 14.x to 12.x

ghost commented 2 years ago

If you want to use 14.x you can download working Chromium binaries (packaged as a layer) here.