-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
DoneThis issue has been fixedThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.
Milestone
Description
This is a regression in preview 9 - it works in preview 8. After a reconnection, navigation via clicking links no longer works and logs a JS error Error: Cannot send data if the connection is not in the 'Connected' State.
.
I tracked it down, and this problem was introduced when we switched from navigation working through JS interop to making it a first-class hub method in PR #12425.
The previous code maintained a single "event dispatcher" that got replaced with a newer one on each reconnection. The newer code skips updating the navigation callback entirely if it was already set. So, after reconnection, we try to dispatch a navigation method call to the old connection instead of the new one, and that fails because it's not connected.
Metadata
Metadata
Assignees
Labels
DoneThis issue has been fixedThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.This issue describes a behavior which is not expected - a bug.