hardkoded/puppeteer-sharp

Timeout errors since updating to 18.0.x with Chrome V124/125

ezanker opened this issue · 9 comments

Timeout errors since updating to 18.0.x with Chrome V124/125

Description

My code runs in a .net 4.8 executable which is launched by a Windows Service running under my Windows Admin account

    Dim opts As New LaunchOptions With {
        .Headless = True
    }
    Dim browserFetcher = new BrowserFetcher
    Await browserFetcher.DownloadAsync()

    Using browser = Await Puppeteer.LaunchAsync(opts)
    ...

It hangs on the LaunchAsync line and eventually gives the timeout error below. If I tell Puppeteersharp to use Chrome Version 123, things work as normal again, but with Versions 124/125 I get the errors. Packaging and delivering Chrome 123 is not an option for me. Any Ideas?

ERROR:

System.AggregateException: One or more errors occurred. ---> System.TimeoutException: Timeout of 180000 ms exceeded
   at PuppeteerSharp.Helpers.TaskHelper.<WithTimeout>d__12`1.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PuppeteerSharp.Cdp.CdpCDPSession.<SendAsync>d__13.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpCDPSession.cs:line 112
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PuppeteerSharp.CDPSession.<SendAsync>d__34`1.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/CDPSession.cs:line 44
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at PuppeteerSharp.Cdp.CdpPage.<PdfInternalAsync>d__88.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 829
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PuppeteerSharp.Page.<PdfAsync>d__203.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Page.cs:line 382
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at WFS.ReportTools.VB$StateMachine_5_RenderURL.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at WFS.ReportTools._Closure$__6-0.VB$StateMachine___Lambda$__0.MoveNext()
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at WFS.ReportTools.CreateReportGoJS_PDF_Puppeteer(String pageSize, String pageOrientation, Boolean multiPage, String mapType, String reportName, String userName, String mapDataFileName, Boolean bPackage, String PackageName)
---> (Inner Exception #0) System.TimeoutException: Timeout of 180000 ms exceeded
   at PuppeteerSharp.Helpers.TaskHelper.<WithTimeout>d__12`1.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PuppeteerSharp.Cdp.CdpCDPSession.<SendAsync>d__13.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpCDPSession.cs:line 112
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PuppeteerSharp.CDPSession.<SendAsync>d__34`1.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/CDPSession.cs:line 44
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at PuppeteerSharp.Cdp.CdpPage.<PdfInternalAsync>d__88.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 829
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at PuppeteerSharp.Page.<PdfAsync>d__203.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Page.cs:line 382
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
   at WFS.ReportTools.VB$StateMachine_5_RenderURL.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at WFS.ReportTools._Closure$__6-0.VB$StateMachine___Lambda$__0.MoveNext()

Versions

  • PuppeteerSharp 18.0.0 and 18.0.1
  • .NET framework 4.8

Seeing the same issue here on PuppeteerSharp 18.0.1 with Chrome 125 running on NET 8 in a Windows Service. Works fine on 18.0.0 with Chrome 124, so our suspicion is that this could be related to the Windows permissions issue in #2637.

Chrome V126 is now available but has the same errors with PuppeteerSharp 18.0.x. Interestingly, if I go back to PuppeteerSharp 10.1.0 and point at the Chrome V126 exe, it works fine with no errors... So, are there any change within Puppeteer that could solve this issue?

Thank you for the report. I'm on vacation right now. I'll take a look at it on Monday!