SignalR client method calling C#/JS interop, hangs indefinitely.
Hey all, I have a project that I've been working on that involves heavy usage of SignalR and C#/JS interop.
The basic flow goes like this:
Code samples:
Client Receive Method
ScreenInfo class method:
Anything glaringly wrong? I can't figure out why this call would work on Linux, but it would hang on Windows.
dotnet version: 7.0.402
The basic flow goes like this:
- On SignalR connect, send the client a message
GetDimensionsthat the client acts on. - When client receives
GetDimensions, call C# service class that imports JS module - C# service class calls JS function to grab screen dimensions, await result
- Return result as
ValueTask<ScreenDimensions>from service class. - Call the SignalR hub
SetScreenDimensionsmethod with the return from the service class.
// THIS HANGS HERE won't run. I can see in teh JS console that I'm reaching that client method, but that call I'm awaiting hangs indefinitely.Code samples:
Client Receive Method
ScreenInfo class method:
Anything glaringly wrong? I can't figure out why this call would work on Linux, but it would hang on Windows.
dotnet version: 7.0.402