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

New headless chrome crashes when passing "--single-process" #2512

Open
danielgindi opened this issue Mar 21, 2024 · 3 comments
Open

New headless chrome crashes when passing "--single-process" #2512

danielgindi opened this issue Mar 21, 2024 · 3 comments

Comments

@danielgindi
Copy link

Description

When passing --single-process - the headless chrome crashes. It worked before the new headless version.

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.

                                  var browser= await PuppeteerSharp.Puppeteer.LaunchAsync(new PuppeteerSharp.LaunchOptions
                                  {
                                      Args = new string[] {
                                          "--single-process", // Less processes -- Currently crashes chrome
                                      },
                                      Headless = true,
                                  });

.

Expected behavior:

chrome.exe should prevail.

Actual behavior:

chrome.exe crashes.

Versions

15.0.0, 15.1.0
.NET 7.0

Additional Information

When calling the new chrome.exe from cmd line with --single-process - it also crashes.

@kblok
Copy link
Member

kblok commented Mar 21, 2024

I think that --single-process was more a chromium flag than a chrome one. You could try using HeadlessMode = HeadlessMode.Shell to use the legacy browser or use the SupportedBrowser.Chromium instead of Chrome.

@danielgindi
Copy link
Author

Oh so we have moved from Chromium to Chrome? I did not even notice. Will the new headless mode work with chromium too?

@kblok
Copy link
Member

kblok commented Mar 25, 2024

Oh so we have moved from Chromium to Chrome? I did not even notice. Will the new headless mode work with chromium too?

Yes! Since v11. The new headless mode is prior to Chrome for testing in puppeteer. So I bet it works in chromium. That flag god renamed a few times, so that's why I'm not 100% sure.

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

No branches or pull requests

2 participants