-
-
Notifications
You must be signed in to change notification settings - Fork 453
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
LaunchAsync throws WebSocket error on AWS Lambda #2785
Comments
Is your very same code running on .NET 7 and are you upgrading to .NET 8? Is your app working in production now on .NET 7? |
Can you try removing the |
i never went through net 7 since amazon does not support net 7 in lambda. So im upgrading from NET 6 to 8. Everything worked just fine in NET 6 in production. ill try removeing --single-process and see what happens |
I removed --single-process flag and i get similar errors:
|
ok. Can you try changing the package dependency to this?
|
did it, same error |
thanks for the update |
System.Net.WebSockets can you dig further for above dll used in puppeteersharp lib ? might causing a issue |
Yes. I think it's the |
i have tried by giving multiple target frameworks, but it seems to be not working as expected as many dependenies need to be downgrade, can't you upgrade PuppeteerSharp project to .net 8 ? i know as there are many ghost need to be thown out during update to .net 8 :) |
PuppeteerSharp is multi-target. It ships netstandard2.0 and .NET 8. |
let me try out by downgrading the projects dependencies and giving multiple target frameworks , hope it works |
fixed by below code .. string[] args = { var launchOptions = new LaunchOptions()
}; var browser = await new Launcher(new LoggerFactory().AddSerilog(Log.Logger)).LaunchAsync(launchOptions) |
@Coolgatty, Do you want to try that out? |
could you help me with the imports? im not sure what i have to import to make that work |
Thanks @satviktechie1986 and @kblok i got my scraper running on .NET 8 in AWS Lambda without having to use a layer by using the following code:
|
Im in the process of updating to .NET 8, and after #2784 resolved, now i deployed to lambda runtime dotnet8 but it says the following when doing LaunchAsync
In order of appearance
e0bbaeba-e1de-40c7-b78a-b9bfe87ff5cf info The WebSocket is in an invalid state ('Aborted') for this operation. Valid states are: 'Open, CloseReceived'
Code:
Ill attach the full cloudwatch logs:
log-events-viewer-result.csv
The text was updated successfully, but these errors were encountered: