SignalR sends incomplete JSON in socket frames when using new System.Text.Json Serializer
Open
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
Assessment
This issue has not been assessed yet.