dotnet / dotnet/aspnetcore

Consider increasing SignalR log level if message size exceeds max

Open
#26,849 6 comments 0 reactions 0 assignees View on GitHub
affected-medium area-signalr Blazor ♥ SignalR cost: XS enhancement feature-blazor-jsinterop Priority:2 severity-major
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

In Blazor Server, when a JSInterop response is larger than the SignalR payload size, no information is available by default that indicates the invocation failed. You have to turn up the SignalR logs up to to Debug to see the actual error:

```
dbug: Microsoft.AspNetCore.SignalR.HubConnectionHandler[2]
Error when processing requests.
System.IO.InvalidDataException: The maximum message size of 32768B was exceeded. The message size can be configured in AddHubOptions.
```

SignalR calls Hub.OnDisconnectedAsync with this exception but Blazor does not do anything with the exception. Perhaps logging the exception with a higher log level would be helpful.

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.