You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also if the server has a bug and doesn't expose the hub properly, you get an "Error negotiating: error" which makes you think its actually communicated with the server when in fact it hasn't.
I'd think messing up the hub definition on the server is quite common for newbies.
I think @ptallett means when you incorrectly configure map hub and the client try to a wrong hub url.
We get an unexpected status code returned from negotiate: 404.
There's nothing we can do about that. If you point your client at www.google.com, we don't get a chance to handle it properly. Maybe we could log the mapped hubs at startup and the URL they are bound to. I'm not sure what we could do on the client side besides improve the error message to say we didn't find the negotiate response?
I think the ask here is to have an error that actually says we got a 404. At the moment I believe we have a very obscure error. That seems entirely legitimate.
The easiest fix here is to detect the kind of 404 we get. Once a 404 is received:
Have the client detect the Connection ID Required error message and throw an error that points to docs on Sticky Sessions. Something like The server does not have a record of the current connection. This usually occurs when you are using multiple server instances and don't have Sticky Sessions enabled. See https://aka.ms/[something] for more information.
If the Connection ID Required message is not in the body, it's a more "standard" 404. Throw an error like A SignalR Hub could not be found at '[url]'.. Usually this will be caused by bad routing configuration.
We should do this in all the clients. The JS client is the worst because it has no 404 error (it just says "Error"), but the Java and .NET clients could use the detection logic in 1 above.
Activity
ptallett commentedon Oct 10, 2018
Also if the server has a bug and doesn't expose the hub properly, you get an "Error negotiating: error" which makes you think its actually communicated with the server when in fact it hasn't.
I'd think messing up the hub definition on the server is quite common for newbies.
Cheers,
Paul
analogrelay commentedon Oct 10, 2018
Can you elaborate on what you mean by "doesn't expose the hub properly"?
mikaelm12 commentedon Oct 10, 2018
I think @ptallett means when you incorrectly configure map hub and the client try to a wrong hub url.
We get an unexpected status code returned from negotiate: 404.
davidfowl commentedon Oct 11, 2018
There's nothing we can do about that. If you point your client at www.google.com, we don't get a chance to handle it properly. Maybe we could log the mapped hubs at startup and the URL they are bound to. I'm not sure what we could do on the client side besides improve the error message to say we didn't find the negotiate response?
analogrelay commentedon Oct 11, 2018
I think the ask here is to have an error that actually says we got a 404. At the moment I believe we have a very obscure error. That seems entirely legitimate.
davidfowl commentedon Oct 11, 2018
I see. This is across all the clients right?
analogrelay commentedon Oct 11, 2018
The JavaScript client is the one with the worst error messages :). The others are pretty good already.
analogrelay commentedon Nov 19, 2018
The easiest fix here is to detect the kind of 404 we get. Once a 404 is received:
Have the client detect the
Connection ID Requirederror message and throw an error that points to docs on Sticky Sessions. Something likeThe server does not have a record of the current connection. This usually occurs when you are using multiple server instances and don't have Sticky Sessions enabled. See https://aka.ms/[something] for more information.If the
Connection ID Requiredmessage is not in the body, it's a more "standard" 404. Throw an error likeA SignalR Hub could not be found at '[url]'.. Usually this will be caused by bad routing configuration.analogrelay commentedon Nov 19, 2018
We should do this in all the clients. The JS client is the worst because it has no 404 error (it just says "Error"), but the Java and .NET clients could use the detection logic in 1 above.
37 remaining items
jogibaeratvega commentedon Jul 30, 2019
You receive a 404 when your JWT-Token you send in the query param is to large:
Error during WebSocket handshake: Unexpected response code: 404