Skip to content

ISingleClientProxy.InvokeAsync<T> throwing System.Exception upon receiving return value from client invocations using messagepack protocol #45168

@steamedbuns

Description

@steamedbuns

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Upon receiving a result value from client invocation, ISingleClientProxy.InvokeAsync will throw a generic System.Exception exception. The exception is only thrown when using messagepack protocol.

Expected Behavior

No exceptions thrown when receiving return value from client invocation.

Steps To Reproduce

The issue can be reproduced with a minimal modified ChatHub project here:
https://github.com/steamedbuns/SignalRMessagePackInvoke.git

See ChatHub class for location of exception.
See chat.js for client implementation.

Exceptions (if any)

System.Exception
  HResult=0x80131500
  Message=Exception of type 'System.Exception' was thrown.
  Source=Microsoft.AspNetCore.SignalR.Core
  StackTrace:
   at Microsoft.AspNetCore.SignalR.DefaultHubLifetimeManager`1.<InvokeConnectionAsync>d__23`1.MoveNext()
   at Microsoft.AspNetCore.SignalR.Internal.HubCallerClients.SingleClientProxy.<InvokeCoreAsync>d__3`1.MoveNext()
   at SignalRInvoke.Hubs.ChatHub.<InvokeMessage>d__0.MoveNext() in C:\Development\test_projects\SignalRInvoke\SignalRInvoke\Hubs\ChatHub.cs:line 13

  This exception was originally thrown at this call stack:
    [External Code]
    SignalRInvoke.Hubs.ChatHub.InvokeMessage(string, string) in ChatHub.cs

.NET Version

7.0.100

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions