Posted 30 January 2025, 6:21 pm EST
Hi Forum,
In a Blazor Server application, I want to be able to navigate to a razor page containing a ReportDesigner component and return to the previous page. When I navigate to the previous page, I get this javascript exception in the browser that forces me to reload the page :
blazor.server.js:1 [2025-01-30T21:59:07.459Z] Error: Microsoft.JSInterop.JSException: There is no DesignerAPI instance with id=ar-web-designer
Error: There is no DesignerAPI instance with id=ar-web-designer
at Si.of (http://localhost:5098/_content/MESCIUS.ActiveReports.Blazor.Designer/web-designer.js:285373:9)
at Object.SVo [as destroy] (http://localhost:5098/_content/MESCIUS.ActiveReports.Blazor.Designer/web-designer.js:293034:39)
at Module.destroy (http://localhost:5098/_content/MESCIUS.ActiveReports.Blazor.Designer/designerWrapper.js:393:17)
at http://localhost:5098/_framework/blazor.server.js:1:3047
at new Promise (<anonymous>)
at y.beginInvokeJSFromDotNet (http://localhost:5098/_framework/blazor.server.js:1:3004)
at Xt._invokeClientMethod (http://localhost:5098/_framework/blazor.server.js:1:60890)
at Xt._processIncomingData (http://localhost:5098/_framework/blazor.server.js:1:58279)
at Xt.connection.onreceive (http://localhost:5098/_framework/blazor.server.js:1:51920)
at s.onmessage (http://localhost:5098/_framework/blazor.server.js:1:80026)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSObjectReferenceExtensions.InvokeVoidAsync(IJSObjectReference jsObjectReference, String identifier, Object[] args)
at MESCIUS.ActiveReports.Blazor.Designer.I..DisposeAsync()
at GrapeCity.ActiveReports.Blazor.Designer.ReportDesigner.System.IAsyncDisposable.DisposeAsync()
at Microsoft.AspNetCore.Components.RenderTree.Renderer.<ProcessDisposalQueueInExistingBatch>g__GetHandledAsynchronousDisposalErrorsTask|79_0(Task result)
Attached is the sample BlazorDesignerServer, modified to reproduce the trouble.
What should I do to avoid this exception?
Thank you for your help. BlazorDesignerServer.zip