Trying to implement a chat function in my Blazor Server app with Azure identity platform. Locally I get the following error:
Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error. InvalidDataException: Reading 'target' as String failed.'.
I don't even know where the problem could be. I can't find anything online about this error. Been searching for days. Please can someone tell me what this could mean?
Also the connection is constantly attempting to reconnect (locally).
When I deploy to Azure App Service, the website immediately displays the generic "Error. An error occurred while processing your request."
Referring to the answer I got here: Authenticate HubConnection in Blazor Server with Microsoft Identity platform
For code reference: I have the exact same code in my project and it's not working. Does the error have something to do with Azure? Do I have to configure the app registration or the app service?
Please help me, trying to wrap my head around this for days.
Adjusting the
Microsoft.AspNetCore.SignalR.Clientversion to7.0.15can fix this issue.When I use
8.0.1can reproduce the issue.