azure-signalr: Missing required property 'type'
We are regularly receiving the following error in our logs. Several times a second.
Error when processing requests.
System.IO.InvalidDataException: Missing required property 'type'.
at HubMessage Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.ParseMessage(Utf8BufferTextReader textReader, IInvocationBinder binder)
at bool Microsoft.AspNetCore.SignalR.Protocol.JsonHubProtocol.TryParseMessage(ref ReadOnlySequence<byte> input, IInvocationBinder binder, out HubMessage message)
at async Task Microsoft.AspNetCore.SignalR.HubConnectionHandler<THub>.DispatchMessagesAsync(HubConnectionContext connection)
at async Task Microsoft.AspNetCore.SignalR.HubConnectionHandler<THub>.RunHubAsync(HubConnectionContext connection)
I’m not positive, but it seems like it has to do with the Azure SignalR Service because as far as I can tell, all clients are including the ‘type’ property in all JSON messages. We are only seeing this in one of our subscriptions/environments.
Versions: JS client: 1.1.0 Microsoft.AspNetCore.SignalR: 1.1.0 Microsoft.Azure.SignalR: 1.0.6
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 16 (7 by maintainers)
Here you are. I am not sure this all lines relate to the error. I collected some of them before and some after.
We have the same issue. From time to time I see in logs the same error with stacktrace.
Versions: Android client: com.microsoft.signalr:signalr: 3.1.0 Microsoft.AspNetCore.SignalR: 1.1.0 Microsoft.Azure.SignalR: 1.4.3
We have now not so many clients (avg 10 simultaneous connections) but we got about 50 such errors per day.
I am not sure if your actual issue is a similar one, but in one of my projects we received the error as well.
The reason was this: When hosting on Azure, we forgot to activate WebSockets for the Azure App Service. This was Problem part 1. This lead to SignalR trying to fall back to Long Polling, which lead to problem part 2: We also had a misconfigured Service Worker active, which cached and disrupted SignalR traffic, leading to the “type” property missing exceptions.
Hopefully this can help anyone else encountering this problem.