dotnet / dotnet/aspnetcore

SignalR sends incomplete JSON in socket frames when using new System.Text.Json Serializer

Open
#13,651 23 comments 0 reactions 0 assignees View on GitHub
affected-most api-suggestion area-signalr enhancement severity-minor
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

_From @suedama1756 on Tuesday, September 3, 2019 5:02:57 PM_

3.0.100-preview8-013656

SignalR JS Client: 3.0.0-preview6.19307.2

We have an issue where SignalR is sending incomplete JSON in a socket frame to the browser which results in an error in the signalr client.

```js
if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {
throw new Error("Message is incomplete.");
}
```

The issue does not occur when using the NewtonSoft JSON serializer. It looks like the JSON buffer is not being flushed correctly

_Copied from original issue: dotnet/corefx#40770_

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.