Failed to launch browser on AWS Lambda with Compatible Architectures x86_64 and with .NET 8 (C#/F#/PowerShell) Runtime Settings. #2938
Unanswered
Amit-Sethi-Lion
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am generating a PDF file from an HTML page using puppeteer-sharp library URL - https://github.com/hardkoded/puppeteer-sharp in .Net8.0 Web API project. It is working fine when I am running it on my local windows machine. However when I run the same solution on AWS Lambda it gives me the below mentioned error.
In AWS Lambda I have added Chromium as a layer from the below URL:
URL - https://googlechromelabs.github.io/chrome-for-testing/#stable
https://storage.googleapis.com/chrome-for-testing-public/138.0.7204.49/linux64/chrome-headless-shell-linux64.zip
"Failed to launch browser! /opt/Linux64/chrome-headless-shell: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
{"ClassName":"PuppeteerSharp.ProcessException","Message":"Failed to launch browser! /opt/Linux64/chrome-headless-shell: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory\n","Data":null,"InnerException":null,"HelpURL":null,"StackTraceString":" at PuppeteerSharp.States.ProcessStartingState.StartCoreAsync(LauncherBase p) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/States/ProcessStartingState.cs:line 83\n at PuppeteerSharp.States.ProcessStartingState.StartCoreAsync(LauncherBase p) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/States/ProcessStartingState.cs:line 89\n at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 77\n at PuppeteerSharp.Launcher.LaunchAsync(LaunchOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Launcher.cs:line 110\n"
Please guide from where to download all Chromium dependencies for AWS Lambda to make my solution work on AWS Lambda. I do not want to use any unreliable third party Chromium AWS Layers as this is an official project.
Please guide urgently.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions