SignalR Value cannot be null. (Parameter 'userName')

Viewed 17

I am using SignalR behind a node.js proxy and I get this error:

{"error":"An unexpected error occurred during connection handshake. AggregateException: One or more errors occurred. (Value cannot be null. (Parameter 'userName'))"}

Is SignalR trying to authenticate the connection because I already added [AllowAnonymous] or proxy server causes messages to be malformed because I used JSON transfer format to make sure messages are readable so I can see if there is any issue.

enter image description here

Firefox logs: enter image description here

Backend

        services.AddSignalR(config =>
        {
            config.MaximumReceiveMessageSize = 10 * 1024 * 1024; // 10 mega-bytes
            config.StreamBufferCapacity = 50;
            config.EnableDetailedErrors = true;
        }).AddNewtonsoftJsonProtocol();

React-Native SignalR

const signalR = new signalRBuilder.HubConnectionBuilder()
  .withUrl(prefixUrl('/log'))
  .configureLogging(LogLevel.Trace)
  .withAutomaticReconnect()
  .withHubProtocol(new JsonHubProtocol())
  .build();

signalR.start();

React-native project:

.NET web application

0 Answers
Related