Skip to content

Chrome 143.0.7499.41 causes ERR_ABORTED in Page.GoToAsync() #3036

@benjaminhuang-elekta

Description

@benjaminhuang-elekta

I am trying to use Puppeteer 20.2.5 to generate PDFs (I just updated to the newest version today) from HTML. When I try to use page.GoToAsync() to set my base URL with Chrome 143.0.7499.41, I get the following error:

PuppeteerSharp.NavigationException: net::ERR_ABORTED at https://localhost:7010 at https://localhost:7010
 ---> PuppeteerSharp.NavigationException: net::ERR_ABORTED at https://localhost:7010
   at PuppeteerSharp.Cdp.CdpFrame.<>c__DisplayClass17_0.<<GoToAsync>g__NavigateAsync|0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpFrame.cs:line 129
--- End of stack trace from previous location ---
   at PuppeteerSharp.Cdp.CdpFrame.GoToAsync(String url, NavigationOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpFrame.cs:line 98
   --- End of inner exception stack trace ---
   at PuppeteerSharp.Cdp.CdpFrame.GoToAsync(String url, NavigationOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpFrame.cs:line 109

The code that is causing the issue:

var executablePath = _chromeInstallPath ?? (await _browserFetcherTask!).GetExecutablePath(); 
var localAppDataDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
await using var browser = await PuppeteerSharp.Puppeteer.LaunchAsync(new LaunchOptions
{
    Headless = true,
    ExecutablePath = executablePath,
    UserDataDir = Path.Combine(localAppDataDir, "Puppeteer", "UserData"),
    Args = ["--no-sandbox", "--disable-setuid-sandbox", $"--lang={cultureCode}"]
});
await using var page = await browser.NewPageAsync();
...
//code to set cookies
...
await page.SetCacheEnabledAsync(enableCache);
var navOptions = new NavigationOptions
{
    WaitUntil = [WaitUntilNavigation.Load],
};
await page.GoToAsync(baseUrl, WaitUntilNavigation.DOMContentLoaded);

//further PDF generation code follows, but the line above is the one that is causing the error. 

Previously I had been using Chrome 142.0.7444.176 with puppeteer 20.2.4 without issue. But after the Chrome upgrade, I can no longer generate PDFs from HTML, before and after upgrading to 20.2.5.

Thanks in advance! If there's any more detail I need to include, please let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions