I am using signalR core with angular6 and I am receiving messages but in console I alwazs get this error.
What does it mean?
System.IO.InvalidDataException: Invocation provides 1 argument(s) but target expects 0.
at Microsoft.AspNetCore.SignalR.Protocol.MessagePackHubProtocol.BindArguments(Byte[] input, Int32& offset, IReadOnlyList`1 parameterTypes, IFormatterResolver resolver)
at Microsoft.AspNetCore.SignalR.Protocol.MessagePackHubProtocol.CreateInvocationMessage(Byte[] input, Int32& offset, IInvocationBinder binder, IFormatterResolver resolver)
fail: Microsoft.AspNetCore.SignalR.Client.HubConnection[57]
Failed to bind arguments received in invocation '(null)' of 'Send'.
System.IO.InvalidDataException: Invocation provides 1 argument(s) but target expects 0.
at Microsoft.AspNetCore.SignalR.Protocol.MessagePackHubProtocol.BindArguments(Byte[] input, Int32& offset, IReadOnlyList`1 parameterTypes, IFormatterResolver resolver)
at Microsoft.AspNetCore.SignalR.Protocol.MessagePackHubProtocol.CreateInvocationMessage(Byte[] input, Int32& offset, IInvocationBinder binder, IFormatterResolver resolver)
warn: Microsoft.AspNetCore.SignalR.Client.HubConnection[14]
I stumbled upon the same error; although my Hub in my C# code had the right number of parameters.
Turned out that the Hub my javascript script code was connected to was the wrong one.
i.e., this error can occur if your javascript client is connected to a server Hub that
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With