dotnet / dotnet/aspnetcore

Enhanced Navigation does not reopen broken socket connection

Open
#55,127 10 comments 1 reaction 0 assignees View on GitHub
area-blazor bug feature-blazor-enhanced-navigation feature-blazor-server triaged
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

If WebSocket disconnects, then enhanced navigation goes to a page with another InteractiveServer components, the interactive component does not re-establish a connection

### Expected Behavior

If Blazor is navigating to a page with an InteractiveServer component, and there is no WebSocket connection, or the existing WebSocket connection is severed, Enhanced navigation should initialize a new WebSocket connection after navigating

### Steps To Reproduce

Create a StreamRendered component with an non-prerendered Interactive island

Disconnect from websockets

Navigate between SSR pages, which work over http
Navigate back to the InteractiveServer(prerender:false) component
- Will not appear
You can also try this with prerender:true component
- Component will appear, without interactivity

I have a private video I can share of this as well.

### Exceptions (if any)

_No response_

### .NET Version

8.0.4

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.