alixaxel / chrome-aws-lambda

Chromium Binary for AWS Lambda and Google Cloud Functions
MIT License
3.22k stars 293 forks source link

[BUG] libnss3.so: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: #305

Open hkmsadek opened 3 months ago

hkmsadek commented 3 months ago

Hi there, it was working fine in nodejs 14 but aws lambda now no longer support 14. With version 20.x we get this error


{
    "errorType": "Error",
    "errorMessage": "Failed to launch the browser process!\n/tmp/chromium: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md\n",
    "stack": [
        "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:531:35)",
        "    at Interface.emit (node:domain:488:12)",
        "    at Interface.close (node:internal/readline/interface:528:10)",
        "    at Socket.onend (node:internal/readline/interface:254:10)",
        "    at Socket.emit (node:events:531:35)",
        "    at Socket.emit (node:domain:488:12)",
        "    at endReadableNT (node:internal/streams/readable:1696:12)",
        "    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"
    ]
}
aoropeza commented 2 months ago

Getting the same error when upgrade to node 20