Skip to content

missing libnspr4.so #69

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

Open
skilbjo opened this issue Mar 6, 2025 · 4 comments
Open

missing libnspr4.so #69

skilbjo opened this issue Mar 6, 2025 · 4 comments

Comments

@skilbjo
Copy link

skilbjo commented Mar 6, 2025

getting

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

wanted to flag Sparticuz/chromium#343 as an issue i'm getting, in case the issue is actually in this library. going to build a layer without chrome-aws-lambda-layer to confirm it's not in this library (i don't think it is)

@rhys-okane-instil
Copy link

rhys-okane-instil commented Apr 18, 2025

Hey, did you get a chance to validate this? Having the same issue on the Node 22 runtime (but not on 20.x)

@skilbjo
Copy link
Author

skilbjo commented Apr 18, 2025

here were my findings,

i tested it while bundling Sparticuz/chromium in the dependencies (not a layer, not in devDependencies) and it works fine with playwright. so it's either something wrong with the layer, or something else in my own personal stack, but either way is not a Sparticuz/chromium issue

i did not confirm the issue was in the layer, but if you are experiencing the issue too, then i think it's highly likely the problem is in the layer itself. the workaround i found is having Sparticuz/chromium be a dependency and not to use this layer.

@georgehb
Copy link

I believe I've found the issue. Node 22 wasn't supported in @Sparticuz/chromium until v131.0.1
https://github.com/Sparticuz/chromium/releases/tag/v131.0.1

But the version of the lambda layer listed in the README (50 for every region except ap-northeast-2) is for the release before this v131.0.0

This repo is set to automatically publish new versions of the layer when @Sparticuz/chromium updates but for some reason the job that is supposed to update the README is failing. See here
https://github.com/shelfio/chrome-aws-lambda-layer/actions/runs/13643344575/job/38137609997

Appears to be an issue in the sed command. Best guess is that list-layer-versions command is returning something unexpected.

The good news is that it's only the job to update the README that is failing. The new layer versions are still getting published. So you should be able to use the layer with the node 22 runtime if you use a more recent layer version. (53 is currently the latest version for every region except ap-northeast-2 which is always one version behind)

@skilbjo
Copy link
Author

skilbjo commented Apr 28, 2025

incredible, what a find

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

No branches or pull requests

3 participants