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

[BUG] Does Not Work With Node 16 or 18 #299

Open
CatfishKrenzer opened this issue Sep 5, 2023 · 10 comments
Open

[BUG] Does Not Work With Node 16 or 18 #299

CatfishKrenzer opened this issue Sep 5, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@CatfishKrenzer
Copy link

Environment

  • chrome-aws-lambda Version: latest
  • puppeteer / puppeteer-core Version:
  • OS:
  • Node.js Version: 16.x and 16.x
  • Lambda / GCF Runtime: Lambda nodejs16.x / nodejs18.x

Expected Behavior

Current Behavior

Not supported in Node 16 or Node 18

Error Stack

INFO 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. (/var/task/node_modules/puppeteer-core/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (node:events:526:35)
at Interface.close (node:internal/readline/interface:533:10)
at Socket.onend (node:internal/readline/interface:259:10)
at Socket.emit (node:events:526:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) |
-- | --

Possible Solution

@CatfishKrenzer CatfishKrenzer added the bug Something isn't working label Sep 5, 2023
@sumilraweng
Copy link

yes getting same issue

@veloware
Copy link

veloware commented Sep 7, 2023

#282

@fuchengli1024
Copy link

getting same issue

@8maxxam8
Copy link

Any update planned?

@talaikis
Copy link

Use @sparticuz/chromium

@vsateesh86
Copy link

Using this @sparticuz/chromium also getting same error. Could you please let me know any other solution for this.

@8maxxam8
Copy link

8maxxam8 commented Feb 12, 2024

@vsateesh86 Same on my side!

@talaikis I switched to @sparticuz/chromium, but after launching the browser the rest of the code is not exectuted as expected. The lambda runs into a timeout even though it is set to 60 seconds. When I used "chrome-aws-lambda" the code was working as expected. Any idea what might cause this?

EDIT
After updating the lambda node version to 20x the browser is launching as expected. The only issue I currently see is that the loading time is much longer than before. While my setup used to take like 25 seconds, it now takes around 50 seconds without major changes...

Which Lambda memory size do you recommend?

@sripraveens
Copy link

@8maxxam8 Which version of chrome-aws-lamda and puppeteer core you are using in the node20 runtime?

@8maxxam8
Copy link

@sripraveens yes I am using node20 runtime!

@sripraveens
Copy link

sripraveens commented Feb 20, 2024

@8maxxam8 Sorry I meant, which version of chrome-aws-lamda and puppeteer core you are using?

Because I was using the later version in node v14, now since v14 is not supported in lamda, In v20 this is not working for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants