Plotly.NET icon indicating copy to clipboard operation
Plotly.NET copied to clipboard

Plotly.NET.CSharp 0.12.1 - exception with new version

Open oriches opened this issue 1 year ago • 2 comments

Upgraded from 0.12.0 to 0.12.1 and generation now fails - I can't post any code or detailed exception stack but I'm seeing the following in the logs.

at PuppeteerSharp.Cdp.FrameManager.<>c__DisplayClass58_0.<<Client_MessageReceived>b__0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 206)))) ---> System.AggregateException: One or more errors occurred. (One or more errors occurred. (Protocol error (Performance.enable): Session closed. Most likely the Page has been closed.Close reason: Connection failed to process Page.frameStoppedLoading. Timeout of 1000 ms exceeded. at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185 at PuppeteerSharp.Cdp.FrameManager.<>c__DisplayClass58_0.<<Client_MessageReceived>b__0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 206 (Connection failed to process Page.frameStoppedLoading. Timeout of 1000 ms exceeded. at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185 at PuppeteerSharp.Cdp.FrameManager.<>c__DisplayClass58_0.<<Client_MessageReceived>b__0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 206))) ---> System.AggregateException: One or more errors occurred. (Protocol error (Performance.enable): Session closed. Most likely the Page has been closed.Close reason: Connection failed to process Page.frameStoppedLoading. Timeout of 1000 ms exceeded. at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185 at PuppeteerSharp.Cdp.FrameManager.<>c__DisplayClass58_0.<<Client_MessageReceived>b__0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 206 (Connection failed to process Page.frameStoppedLoading. Timeout of 1000 ms exceeded. at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185 at PuppeteerSharp.Cdp.FrameManager.<>c__DisplayClass58_0.<<Client_MessageReceived>b__0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 206)) ---> PuppeteerSharp.TargetClosedException: Protocol error (Performance.enable): Session closed. Most likely the Page has been closed.Close reason: Connection failed to process Page.frameStoppedLoading. Timeout of 1000 ms exceeded. at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185 at PuppeteerSharp.Cdp.FrameManager.<>c__DisplayClass58_0.<<Client_MessageReceived>b__0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 206 (Connection failed to process Page.frameStoppedLoading. Timeout of 1000 ms exceeded. at PuppeteerSharp.Helpers.TaskHelper.WithTimeout[T](Task1 task, TimeSpan timeout, Func2 exceptionFactory) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Helpers/TaskHelper.cs:line 185 at PuppeteerSharp.Cdp.FrameManager.<>c__DisplayClass58_0.<<Client_MessageReceived>b__0>d.MoveNext() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 206) at PuppeteerSharp.Cdp.CdpCDPSession.SendAsync(String method, Object args, Boolean waitForCallback, CommandOptions options) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpCDPSession.cs:line 78 at PuppeteerSharp.Cdp.CdpPage.InitializeAsync() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 1275 at PuppeteerSharp.Cdp.CdpPage.CreateAsync(CdpCDPSession client, CdpTarget target, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, TaskQueue screenshotTaskQueue) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 725 at PuppeteerSharp.Cdp.CdpPage.CreateAsync(CdpCDPSession client, CdpTarget target, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, TaskQueue screenshotTaskQueue) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 737 at PuppeteerSharp.Cdp.CdpPageTarget.PageAsync() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPageTarget.cs:line 50 at PuppeteerSharp.Cdp.CdpBrowser.CreatePageInContextAsync(String contextId) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpBrowser.cs:line 213 --- End of inner exception stack trace --- at <StartupCode$Plotly-NET-ImageExport>[email protected]() at <StartupCode$Plotly-NET-ImageExport>.$PuppeteerSharpRenderer.Plotly-NET-ImageExport-IGenericChartRenderer-RenderPNGAsync@150.MoveNext() at <StartupCode$Plotly-NET-ImageExport>.$PuppeteerSharpRenderer.Plotly-NET-ImageExport-IGenericChartRenderer-SavePNGAsync@162.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at [email protected](Task1 t) at Plotly.NET.ImageExport.AsyncHelper.runSync[a,b](FSharpFunc2 job, a input) at Plotly.NET.ImageExport.AsyncHelper.taskSync[a](Task1 task) at [email protected](GenericChart gChart) at Plotly.NET.ImageExport.GenericChartExtensions.SavePNG(GenericChart this, String path, FSharpOption1 EngineType, FSharpOption1 Width, FSharpOption`1 Height)

---> System.AggregateException: One or more errors occurred. (One or more errors occurred. (Object reference not set to an instance of an object.)) ---> System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.) ---> System.NullReferenceException: Object reference not set to an instance of an object. at PuppeteerSharp.IsolatedWorld..ctor(Frame frame, WebWorker worker, TimeoutSettings timeoutSettings, Boolean isMainWorld) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/IsolatedWorld.cs:line 39 at PuppeteerSharp.Cdp.CdpFrame.UpdateClient(CDPSession client, Boolean keepWorlds) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpFrame.cs:line 313 at PuppeteerSharp.Cdp.CdpFrame..ctor(FrameManager frameManager, String frameId, String parentFrameId, CDPSession client) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpFrame.cs:line 44 at PuppeteerSharp.Cdp.FrameManager.OnFrameNavigatedAsync(FramePayload framePayload, NavigationType type) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 400 at PuppeteerSharp.Cdp.FrameManager.HandleFrameTreeAsync(CDPSession session, PageGetFrameTree frameTree) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 468 at PuppeteerSharp.Cdp.FrameManager.InitializeAsync(CDPSession client) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/FrameManager.cs:line 137 at PuppeteerSharp.Cdp.CdpPage.InitializeAsync() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 1273 at PuppeteerSharp.Cdp.CdpPage.CreateAsync(CdpCDPSession client, CdpTarget target, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, TaskQueue screenshotTaskQueue) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 725 at PuppeteerSharp.Cdp.CdpPage.CreateAsync(CdpCDPSession client, CdpTarget target, Boolean ignoreHTTPSErrors, ViewPortOptions defaultViewPort, TaskQueue screenshotTaskQueue) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPage.cs:line 737 at PuppeteerSharp.Cdp.CdpPageTarget.PageAsync() in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpPageTarget.cs:line 50 at PuppeteerSharp.Cdp.CdpBrowser.CreatePageInContextAsync(String contextId) in /home/runner/work/puppeteer-sharp/puppeteer-sharp/lib/PuppeteerSharp/Cdp/CdpBrowser.cs:line 213 --- End of inner exception stack trace --- at <StartupCode$Plotly-NET-ImageExport>[email protected]() at <StartupCode$Plotly-NET-ImageExport>.$PuppeteerSharpRenderer.Plotly-NET-ImageExport-IGenericChartRenderer-RenderPNGAsync@150.MoveNext() at <StartupCode$Plotly-NET-ImageExport>.$PuppeteerSharpRenderer.Plotly-NET-ImageExport-IGenericChartRenderer-SavePNGAsync@162.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at [email protected](Task1 t) at Plotly.NET.ImageExport.AsyncHelper.runSync[a,b](FSharpFunc2 job, a input) at Plotly.NET.ImageExport.AsyncHelper.taskSync[a](Task1 task) at [email protected](GenericChart gChart) at Plotly.NET.ImageExport.GenericChartExtensions.SavePNG(GenericChart this, String path, FSharpOption1 EngineType, FSharpOption1 Width, FSharpOption`1 Height)

oriches avatar Aug 21 '24 11:08 oriches

On first look on that huge error stack that looks to me like an issue with PuppeteerSharp rather than Plotly.NET itself. Hard to know without seeing the code.

kMutagene avatar Aug 22 '24 07:08 kMutagene

They were definitely 2 separate exceptions with the PuppeteerSharp timing out first, I think the Plotly NRE are caused by the failure in PuppeteerSharp later in the process.

Unfortuanately I can't post any code.

oriches avatar Aug 22 '24 07:08 oriches

Upgrading to the latest version - 0.13 resolved the issue.

Image Export - 6.1.0

oriches avatar Sep 04 '24 08:09 oriches

Weird, but let's take that as a win :D

kMutagene avatar Sep 04 '24 09:09 kMutagene