You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to trigger the exception handler middleware by throwing an exception from a Blazor Web App I get an exception about RemoveNavigationManager being already initialized.
In Index.razor add an OnInitialized method that throws an exception
Change the launch environment to Production
Run the app and browse to the home page
Expected result: Exception is thrown and handled by the exception handler middleware so the error page is rendered.
Actual result:
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[3]
An exception was thrown attempting to execute the error handler.
System.InvalidOperationException: 'RemoteNavigationManager' already initialized.
at Microsoft.AspNetCore.Components.NavigationManager.Initialize(String baseUri, String uri)
at Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager.Initialize(String baseUri, String uri)
at Microsoft.AspNetCore.Components.Endpoints.EndpointHtmlRenderer.InitializeStandardComponentServicesAsync(HttpContext httpContext, Type componentType, String handler, IFormCollection form)
at Microsoft.AspNetCore.Components.Endpoints.RazorComponentEndpointInvoker.RenderComponentCore()
at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<>c.<<InvokeAsync>b__9_0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.HandleException(HttpContext context, ExceptionDispatchInfo edi)
When I try to trigger the exception handler middleware by throwing an exception from a Blazor Web App I get an exception about
RemoveNavigationManagerbeing already initialized.Repro steps:
OnInitializedmethod that throws an exceptionExpected result: Exception is thrown and handled by the exception handler middleware so the error page is rendered.
Actual result: