oqtane.framework icon indicating copy to clipboard operation
oqtane.framework copied to clipboard

NavigationManager Exception on Static Server Rendering

Open leigh-pointer opened this issue 2 years ago • 10 comments

Created a new module. Clicked the [x] code was halted.

CreateModuleDialog

leigh-pointer avatar Mar 01 '24 10:03 leigh-pointer

exact same issue as #3909 - closing as this is a Blazor issue within Visual Studio which is logged here: https://github.com/dotnet/aspnetcore/issues/53996

sbwalker avatar Mar 01 '24 15:03 sbwalker

@sbwalker maybe we should keep one of these open so that we don't get repeated issues?

thabaum avatar Mar 01 '24 15:03 thabaum

I tried to change the method to async to avoid the exception, please check whether it can be merged, thx.

zyhfish avatar Mar 03 '24 12:03 zyhfish

Re-opening so that we have a record of this known Microsoft Blazor issue

sbwalker avatar Mar 04 '24 15:03 sbwalker

@zyhfish you can try this suggestion: https://github.com/dotnet/aspnetcore/issues/53996#issuecomment-1976934727

sbwalker avatar Mar 04 '24 16:03 sbwalker

The error is in the AdminContainer.razor file in the Theme folder, line 27 when the NavigatorManager.NavigateTo method is called, it throw a ASP Exception. It happens ever a windows is closed (in the same way).

jaruiz1961-ual avatar Mar 31 '24 11:03 jaruiz1961-ual

@jaruiz1961-ual this is a known problem when running Static Blazor in the Visual Studio debugger - see https://github.com/dotnet/aspnetcore/issues/53996

sbwalker avatar Mar 31 '24 12:03 sbwalker

I'm not having this caught by vs.net all of the time with .net 9. Doesn't matter if I @inject or use the new constructor injection the error is always thrown and there is nothing in the exception settings that allows me to ignore this one either.

JohnGalt1717 avatar Dec 04 '24 15:12 JohnGalt1717

@JohnGalt1717 have a look here. I am sure this will help you https://www.youtube.com/watch?v=1lsjpfdqBk0&t=2321s

leigh-pointer avatar Dec 04 '24 15:12 leigh-pointer

@JohnGalt1717 have a look here. I am sure this will help you https://www.youtube.com/watch?v=1lsjpfdqBk0&t=2321s

Thanks.... gross.

JohnGalt1717 avatar Dec 04 '24 16:12 JohnGalt1717

This is fixed in .NET 10

sbwalker avatar Jul 28 '25 15:07 sbwalker

Hi Shaun Walker, it's OK

Image

So, what's about Oqtane? I have this issue with search module, the last Oqtane framework is for .NET 9.0.

Sergio

maccarilab avatar Aug 05 '25 15:08 maccarilab

It was already pointed that the issue is fixed in .NET 10, but I just read it in the docs and wanted to post it here, just to keep it close

https://learn.microsoft.com/en-us/aspnet/core/release-notes/aspnetcore-10.0?view=aspnetcore-9.0#opt-in-to-avoiding-a-navigationexception-during-static-server-side-rendering-with-navigationmanagernavigateto

mdmontesinos avatar Sep 17 '25 10:09 mdmontesinos