puppeteer-sharp
puppeteer-sharp copied to clipboard
New headless chrome crashes when passing "--single-process"
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.
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.
Oh so we have moved from Chromium to Chrome? I did not even notice. Will the new headless mode work with chromium too?
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.
Since moving to Chrome I've experienced some instabilities. Occasionally a 100% cpu usage, and infinite logging of GPU errors. I had to pin the build number to stabilize it. Looks like Chromium is far more stable.