puppeteer-sharp
puppeteer-sharp copied to clipboard
windows server 2019 puppeteer launch failed WebSocketException: The server returned status code '503' when status code '101' was expected.
Looking for some help? Get priority support by sponsoring the project/
Before you file a bug, have you:
- Tried upgrading to newest version of PuppeteerSharp, to see if your issue has already been resolved and released?
- Checked existing open and closed issues, to see if the issue has already been reported?
- Tried reproducing your problem in a new isolated project?
- Considered if this is a general question and not a bug?. For general questions please use StackOverflow.
Description
[Description of the issue] An error occurs when running the browser after downloading.
PuppeteerSharp.ProcessException: 'Failed to create connection'
Complete minimal example reproducing the issue
Complete means the code snippet can be copied into a unit test method in a fresh C# project and run. Minimal means it is stripped from code not related to reproducing the issue.
E.g.
// Arrange
using var browserFetcher = new BrowserFetcher();
await browserFetcher.DownloadAsync();
await using var browser = await Puppeteer.LaunchAsync(
new LaunchOptions { Headless = false });
await using var page = await browser.NewPageAsync();
await page.GoToAsync("http://www.google.com");
// Act
...
// Assert
...
Expected behavior:
[What you expect to happen]
Actual behavior:
PuppeteerSharp.ProcessException: 'Failed to create connection' WebSocketException: The server returned status code '503' when status code '101' was expected.
[What actually happens]
Versions
- Which version of PuppeteerSharp are you using?
- 6.2.0
- Which .NET runtime and version are you targeting? E.g. .NET framework 4.6.1 or .NET Core 2.0.
- dotnet 5
Additional Information
OS: Windows 2019 server Net version: NET Core 5 Puppeteer-Sharp Version: 6.2.0
Any additional information, configuration or data that might be necessary to reproduce the issue.