Ask questionsError: Server returned handshake error: Handshake was canceled.
Using Chrome Dev Tools (FYI - IE11 has same thing); console output: Information: Normalizing '/chatHub' to 'https://dw.example.com/chatHub'. signalr.js:2440 Debug: Starting HubConnection. signalr.js:2440 Debug: Starting connection with transfer format 'Text'. signalr.js:2440 Debug: Sending negotiation request: https://dw.example.com/chatHub/negotiate signalr.js:2440 Debug: Selecting transport 'ServerSentEvents' signalr.js:2440 Trace: (SSE transport) Connecting signalr.js:2436 Information: SSE connected to https://dw.example.com/chatHub?id=MoeAzDS7OtmeAylCN_vQEA signalr.js:2440 Debug: Sending handshake request. signalr.js:2440 Trace: (SSE transport) sending data. String data of length 32. signalr.js:1624 POST https://dw.example.com/chatHub?id=MoeAzDS7OtmeAylCN_vQEA 404 (Not Found) (anonymous) @ signalr.js:1624 DefaultHttpClient.send @ signalr.js:1583 HttpClient.post @ signalr.js:1563 (anonymous) @ signalr.js:2342 step @ signalr.js:2273 (anonymous) @ signalr.js:2254 fulfilled @ signalr.js:2245 Promise.then (async) step @ signalr.js:2247 (anonymous) @ signalr.js:2248 __awaiter @ signalr.js:2244 sendMessage @ signalr.js:2329 (anonymous) @ signalr.js:3452 step @ signalr.js:3364 (anonymous) @ signalr.js:3345 (anonymous) @ signalr.js:3339 __awaiter @ signalr.js:3335 ServerSentEventsTransport.send @ signalr.js:3447 HttpConnection.send @ signalr.js:2648 (anonymous) @ signalr.js:1765 step @ signalr.js:1708 (anonymous) @ signalr.js:1689 fulfilled @ signalr.js:1680 Promise.then (async) step @ signalr.js:1682 (anonymous) @ signalr.js:1683 __awaiter @ signalr.js:1679 HubConnection.start @ signalr.js:1750 (anonymous) @ chat.js:16 chat.js:19 Error: Not Found (anonymous) @ chat.js:19 Promise.catch (async) (anonymous) @ chat.js:18 signalr.js:2440 Trace: (SSE transport) data received. String data of length 36. signalr.js:2430 Error: Server returned handshake error: Handshake was canceled. ConsoleLogger.log @ signalr.js:2430 HubConnection.processHandshakeResponse @ signalr.js:2006 HubConnection.processIncomingData @ signalr.js:1948 HubConnection.connection.onreceive @ signalr.js:1730 eventSource.onmessage @ signalr.js:3412 signalr.js:2430 Error: Connection disconnected with error 'Error: Server returned handshake error: Handshake was canceled.'.
I used .NET Framework SignalR with no issues. Only issue is .NET Core SignalR.
Thanks!
Answer
questions
BrennanConroy
Could you provide the server logs? It would be useful to see what they say and if they match what the client is observing.
Another thing you could try is using the LongPolling transport instead of ServerSentEvents and see if you get a similar issue.
Related questions