Skip to content

SignalR uncaught exception in Blazor Webassembly using automatic reconnect #61184

@lamcyborg

Description

@lamcyborg

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Using Microsoft.AspNetCore.SignalR.Client in a client hosted Blazor Webassembly, using the following connection:

Image

Using the following retry-policy:

Image

When disconnecting the network between the client and the server multiple times, SignalR throws an exception and the client needs to be restarted.

The console log produce the following log messages:

Image

The Closed, Reconnecting, and Reconnected events are connected mainly for logging and the StartAsync() method on the connection is try-catced but we never end up in the catch section. The exception seem to be thrown in an uncatchable context.

Expected Behavior

The expected behavior would be that the connection tries to reconnect without exception.

Steps To Reproduce

No response

Exceptions (if any)

System.InvalidOperationException

.NET Version

8.0.13

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✔️ Resolution: AnsweredResolved because the question asked by the original author has been answered.Status: Resolvedarea-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions