-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No more websockets after upgrading to SignalR 1.1 & .net Core 2.2 #4389
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
but doesn't change behavior at all. trace looks like that:
negotiation response looks like that:
|
That looks like your server doesn't support WebSockets, what is your server environment? |
.net core (upgraded before creating this ticket from 2.1.5 to 2.2), i assume something has changed by this update, but 'ive no idea what. websockets are enabled like that:
and i'm using version 2.2 of all those Webpack packages available:
|
What OS? Are you hosting behind a proxy? IIS? |
Windows 10, No Proxy, No IIS (using the built in Webserver Kestrel). But as you mentioned it, i tried to switch to my local IIS and now it's working again. I'll have a deeper look into it. |
Finally i was not able to find the source of the problem, switched finally my dev-env. to IIS and now everything is working as usual again. |
Ok, to summarize, you're on Win 10 hosting with raw kestrel. You switched from 2.1.5 to 2.2 and now your SignalR connection no longer negotiates WebSockets. You then host behind IIS with the same machine/setup and are able to negotiate WebSockets on your SignalR connection? Could you try something really quickly for me, not using IIS try to connect to the server with let connection = new signalR.HubConnectionBuilder()
.withUrl("/myhub", {
skipNegotiation: true,
transport: signalR.HttpTransportType.WebSockets
})
.build(); |
cc @shirhatti |
This sounds like the HTTP/2 regression we fixed in RTM. Maybe it didn't make it in? |
Nupkg has the change so it's not that. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
oh, sorry i have not seen your reply :-( - is that test still necessary? |
This comment has been minimized.
This comment has been minimized.
@Cyrill1234 Your app doesn't work because CORS changed between 2.1 and 2.2, you can use @StefanKoenigMUC Yes that would be helpful, try it without hosting behind IIS. Also, is it possible for you to make a repro app? |
ok, might take until next week, as i'm off work at the moment - maybe i find some time in the evenings. |
Same problem here. Luckily I came upon this thread and stopped worrying so much. |
@Looooooka Are you seeing the issue where WebSockets isn't working when hosting from command line but is working behind IIS? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@nuteman1 Can you please open a new issue describing the problem you're having. It's definitely not the same issue as OP. |
@StefanKoenigMUC We haven't been able to repro this and haven't heard from you in a while. I'll close this issue tomorrow if there is no response. |
Sorry for not giving feedback for so long. Some troubles within the last months, so that i'm was not able to continue here. Your workaround changes the error to something else:
Currently used versions are:
using Windows 2016 with IIS 10. As there should now be more time, i will prepare an example during the next days. Edit: logs with trace:
data objects seems empty
|
What kind of environment are you running the client in? It looks like either |
We are also experiencing same issue that mentioned by @StefanKoenigMUC in last comment . Please help us...Thanks |
Regarding the "Error parsing handshake response: TypeError: Right-hand side of 'instanceof' is not callable" error I thought I would share with everyone what was causing this error for me, though I realize that some details of my problem are different. I am serving up both MessagePack and JSON capable endpoints using NetCore 3.Preview+ (debugged through Visual Studio 2019 Preview) while my Angular 7 client SPA is using signalR 1.1.2 / signalr-protocol-msgpack 1.1.0 via Chrome 72.0.3626.121. When I first enabled MessagePack on the client I had to introduce a work-around that @BrennanConroy and @andreatosato provided for issue aspnet/SignalR#2736 where a script block was added to the index.html and polyfills.ts files of Angular. Although that work-around solved my MessagePack error, I found that if I switch the client back to use JSON instead of MessagePack I had to remove the script block from index.html or the "Right-hand side of 'instanceof' is not callable" exception would be thrown. To summarize, the following script block in index.html will cause the error when using JSON but is required when using MessagePack. The pollyfill.ts modification can remain for both MessagePack and JSON enabled clients.
|
i finally figured it out, that error occurs for me: error occured only, when MessagePack is just installed on ServerSide of the application. |
Yeah, the MessagePack library brings along polyfills for We'll look improving the error messaging for this in a future release |
It looks like this polyfill is what causes the problem. We check I think we need a new approach to this one. Is someone able to provide a clonable sample that reproduces the problem? A longer term plan may be to consider a new MessagePack library that doesn't depend on |
Closing as this appears to be an issue with the polyfill that was provided in a comment above. If we can get more context on this polyfill as requested above we can see if there's something we can do to fix it. |
Hi all,
this morning i upgraded my application to SignalR 1.1 (by this i was force to upgrade from .net core 2.1.5 to .net core 2.2).
Since those upgrades, no more Websocket connections are negotiated between my Client (Angular, also using SignalR 1.1 Libs) and my .net core server.
I've honestly no clue whats causing the problem, as there are no significant changes to the application.
Due to the upgrades, some changes to my CORS policy where necessarcy, it looks like this right now:
SignalR is configured like this:
Does anyone have an idea regarding my problem?
Thanks in advance!
The text was updated successfully, but these errors were encountered: