Skip to content

SignalR: Failed to bind arguments when using Clients.All, but works with Clients.Group #62797

@appvity-danhpham

Description

@appvity-danhpham

When invoking the UpdateIncidentReport method on the SignalR server, the message is successfully sent using:
await Clients.All.SendAsync("incidentReportAction", incidentReport);

However, the BE logs the following error after the send is completed:

TState (Log Message):
Failed to bind arguments received in invocation '(null)' of 'incidentReportAction'

Exception message:
System.IO.InvalidDataException: Invocation provides 1 argument(s) but target expects 0.

Image

Additional Notes:

  • The client is properly registered to listen for incidentReportAction with 1 parameter, and it still receives the data correctly.
  • The error is logged only when using Clients.All. When using Clients.Group, the error does not occur.
  • This suggests there may be an issue in how Clients.All internally dispatches messages to clients compared to Clients.Group.

Reproduction:
I have created a minimal reproduction project for this issue on GitHub:

🔗 https://github.com/appvity-danhpham/signalr-incidentReportAction-repro

Additional Information:

  • ASP.NET Core SignalR Version: 8.0.18
  • .NET Version: 12.0
  • Hosting Environment: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions