Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome-Aws-Lambda Dependency Does not Support Node 16+/LTS #3

Closed
alexluongfm opened this issue May 22, 2023 · 2 comments
Closed

Chrome-Aws-Lambda Dependency Does not Support Node 16+/LTS #3

alexluongfm opened this issue May 22, 2023 · 2 comments

Comments

@alexluongfm
Copy link
Contributor

alexluongfm commented May 22, 2023

The Chrome AWS Lambda dependency is unmaintained and tied to node 14, see someone's PR on that.

Polotno-node latest doesn't work on Lambda with node-14, works with node 18, partially, except for shared library issues. This is tied to the outdated chrome aws lambda dependency.

Is it possible to change the Chrome AWS Lambda package to something updated for Node 18/LTS usage? Someone's suggestion of Sparticuz fork. Looks like the future updates has changed to https://github.com/Sparticuz/chromium

@lavrton
Copy link
Collaborator

lavrton commented May 22, 2023

Thanks for providing the links. Where did you try to host it? Amazon Lambda? Or something else?

@alexluongfm
Copy link
Contributor Author

alexluongfm commented May 23, 2023

Aws Lambda with the node-canvas lambda layer.

My errors come when trying to create a polotno instance.
If I stay on node-14, then versions 2.0.5+ time out when creating a polotno instance, which is fixed with node 18.

{
    "errorType": "Runtime.UnhandledPromiseRejection",
    "errorMessage": "Error: 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://pptr.dev/troubleshooting\n",
    "reason": {
        "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://pptr.dev/troubleshooting\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://pptr.dev/troubleshooting",
            "",
            "    at Interface.onClose (/var/task/node_modules/@puppeteer/browsers/lib/cjs/launch.js:262:24)",
            "    at Interface.emit (node:events:525:35)",
            "    at Interface.emit (node:domain:489:12)",
            "    at Interface.close (node:internal/readline/interface:533:10)",
            "    at Socket.onend (node:internal/readline/interface:259:10)",
            "    at Socket.emit (node:events:525:35)",
            "    at Socket.emit (node:domain:489:12)",
            "    at endReadableNT (node:internal/streams/readable:1359:12)",
            "    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)"
        ]
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants