Skip to content

(BlazorServer) each navigation to external logs 2 errors a minute later #45267

Closed
@springy76

Description

@springy76

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Each time you leave the blazor circuit a minute later two exceptions are logged.

Expected Behavior

zero errors in log when no one does wrong things.

Steps To Reproduce

Run original sample created by dotnet.exe new blazorserver --name BlazorServerTemplate --output . -f net7.0 --auth Individual --use-program-main

On top right click on "Login" which is <a href="Identity/Account/Login">Log in</a> in LoginDisplay.razor.

Wait a minute (or maybe 2) then 2 errors are logged to console (or external logging apps like SEQ):

fail: Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager[4]
      Navigation failed when changing the location to https://localhost:7206/Identity/Account/Login?returnUrl=~/counter
      System.Threading.Tasks.TaskCanceledException: A task was canceled.
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager.<>c__DisplayClass13_0.<<NavigateToCore>g__PerformNavigationAsync|0>d.MoveNext()
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
      Unhandled exception in circuit 'XaCjYqsnL_QC9xVVeKm9IEojYbj1uBcoSgjuyHwtR7U'.
      System.Threading.Tasks.TaskCanceledException: A task was canceled.
         at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
         at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
         at Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager.<>c__DisplayClass13_0.<<NavigateToCore>g__PerformNavigationAsync|0>d.MoveNext()

Exceptions (if any)

TaskCancelledException

.NET Version

7.0.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions