Skip to content

[Preview 9] Navigation after reconnection is broken #13371

Closed
@SteveSandersonMS

Description

@SteveSandersonMS

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

Labels

DoneThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions