Reputation: 33
Getting below errors in SignalR.
It should not throw any errors. We are not getting any Error messages. It only says Error. But what not about what error occurred?
Error: Failed to start the transport 'WebSockets': Error: There was an error with the transport. Error: Failed to start the transport 'ServerSentEvents': Error: Error occurred Error: Connection disconnected with error 'Error'. Error: Failed to start the transport 'LongPolling': Error signalr.js:4741 WebSocket connection to 'wss://tst.com/SignalRHub?id=ujZbbgfwN2nbPvjGTIpGBw' failed: [2023-05-22T12:36:24.679Z] Error: Failed to start the connection: Error: Unable to connect to the server with any of the available transports. WebSockets failed: Error: There was an error with the transport. ServerSentEvents failed: Error: Error occurred LongPolling failed: Error
new signalR.HubConnectionBuilder()
.withUrl(window.location.origin+\"/SignalRHub\", { skipNegotiations: true})
.withAutomaticReconnect([0, 0, 10000])
.configureLogging(signalR.LogLevel.Information)
.build()
All errors are coming at the same time.
It should not throw any errors.
Upvotes: 3
Views: 2088
Reputation: 21883
According your description and comment, it sometime works, so I believe there is no code issue in this case.
You can follow the official doc to check the 404 error first.
Troubleshoot connection errors - Response code 404
We can enable sticky sessions correctly to fix the issue.
Upvotes: 0