.netchromiumpuppeteer-sharp

Puppeteer LaunchAsync Hangs Without Opening Browser


I have a .Net application that uses PupperteerSharp to navigate to different web pages, I have only one browser running at a given time and once that browser process is completed, it's closed before opening a new browser

Previously I had the PuppeteerSharp V2.0.4 and I recently updated to PuppeteerSharp V10.0.0 and now it's hanging after while when trying to launch a browser, Once the application started it runs for a while and after opening and closing few browser instances, it hangs at the await Puppeteer.LaunchAsync() method.

I'm Running this on Windows 11 build version 22621.1702.

The Chromium version I'm currently using is HeadlessChrome/109.0.5412.0

I use the below configuration to launch the browser,

IBrowser browser = await Puppeteer.LaunchAsync(new LaunchOptions{
      Headless = true,
      IgnoreHTTPSErrors = true,
      Timeout = 60000,
      Args: [
        "--enable-automation",
        "--no-sandbox",
        "--disable-setuid-sandbox",
        "--disable-gpu", 
        "--disable-dev-shm-usage"
            ]
});

Solution

  • PuppeteerSharp V10.0.0 has an open issue regarding this browser closing behavior. Please find more in the above issue here.
    Until the issue is resolves Recommend downgrading to a version to a more stabler version. etc V8.0.0