Skip to content

Multiple clients are not able to reconnect after Blazor server is restarted #62901

@oroztocil

Description

@oroztocil

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When you open multiple instances (tabs) of a Blazor app with server interactivity and then stop and re-run the server, the clients fail to reconnect. The browser console shows the error: The circuit state could not be retrieved. It may have been deleted or expired.

I have not done a full bisection but the issue does not happen on 450d6ef which is the last commit before 2ee09f5. The latter introduced circuit state persistence, including the error message shown above (emitted by ComponentHub.ResumeCircuit).

Image

Expected Behavior

All clients should be able to reconnect after the server app is stopped and restarted, even if it is not possible to restore the state.

Steps To Reproduce

  1. Start the sample BlazorUnitedApp in VS or using dotnet run.
  2. Open multiple tabs with the Counter page (the one with server interactivity), note which tab you opened the last.
  3. Stop the app.
  4. The app instances in the browser display the reconnection dialog (this is correct).
  5. Start the app again.
  6. The clients in the tabs fail to reconnect. The error UI is shown. The browser console contains: The circuit state could not be retrieved. It may have been deleted or expired.
  7. Sometimes the last tab you opened reconnects successfully, the other tabs seem to always fail.

Exceptions (if any)

No response

.NET Version

10.0.100-preview.7.25322.101

Anything else?

No response

Metadata

Metadata

Assignees

Labels

area-blazorIncludes: Blazor, Razor Components

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions