-
Notifications
You must be signed in to change notification settings - Fork 10.3k
RC1 Failed connection handshake after update from Preview 7 -> RC1 #36672
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
Comments
Update: here's what's in the chrome dev tools console at the time of the failure: Again, all I did was update from Preview 7 to RC1 with no other code changes. |
Could you capture a network trace https://docs.microsoft.com/aspnet/core/signalr/diagnostics?view=aspnetcore-5.0#network-traces Just confirming, this looks like this is server-side blazor? |
I've attached both the RC1 session and the Preview 7 session to this message @BrennanConroy |
And yes, this is Blazor Server. |
Huh, the preview7 trace doesn't seem to contain any info. If you know how to use Wireshark I actually prefer that over Fiddler for websocket connections. What I'm trying to figure out is if your preview7 app was falling back to longpolling, but as of RC1 blazor no longer allows that fallback by default #34644 so if you were having issues connecting to websockets before it might have been silently falling back. How are you hosting your app? Can you confirm that websockets was working in preview7? |
@BrennanConroy Let me try and get better logs. If it helps, here is the front end for the Preview 7 app (hosted on IIS) http://app.frdb.bscapps.ca - it does redirect to identity server quickly, but perhaps you can get the logs you need from it when it loads. |
FWIW, I did add the code suggested in the breaking change update for long polling and that didn't fix the issue on RC1. |
Ok, that one is using websockets successfully. I'm not able to repro the issue locally when running RC1.
Yes please. |
@BrennanConroy I went ahead and updated our Preview 7 staging site to the local code RC1 code that was failing -> https://app.frdb.bscapps.ca/ Same error now on the URL you were able to review above. |
However, if you actually click "login" you'll see you're redirected to the identity server (MVC Core RC1) just fine, and the login form works fine (calls the .net core APIs, etc). If I log in, the Blazor Rc1 app loads, but indeed I keep getting the same socket not open error within the app itself. |
Dug into this a little, and the issue seems to be related to someone replacing the browser websocket implementation so that the Searching the js files from your site I can see that vendors.min.js from BscTheme is overriding the websocket implementation incorrectly which is likely causing the issues. Is this a file of yours? |
@BrennanConroy yeah, it's just the static files in a shared razor library for our 4 applications (common CSS, common HTML, etc) - Nothing in there has changed in forever. I wonder if one of the theme JS files is now conflicting with something that changed in RC1? Are you able to tell me what JS to hunt for in the library that I can see if that's the case? |
I can only see the minified file, but the code looks like
And it looks like it's the |
I did a search for "websocket" in the theme files, and the 2 attached JS files showed matches. Vendors.js is loaded by the theme we purchased to drive the dashboard widgets and whatnot. We've been using this theme for a year and only RC1 is what broke it - super interesting. Can you suggest what code change needs to be made to the JS to fix this? Do I just comment out the noted JS above? I'm not at all a JS guy. |
Quick update: I commented out the reference to vendors.js, and the site works now (though the HTML theme itself is now completely broken without that Js loading) - so:
|
No idea, we haven't changed anything in SignalR in this area between preview7 and RC1, and blazor changes are very unlikely to have affected anything here either. In any case, this is a bug in your vendor package and should be brought to them.
There is a |
Thanks @BrennanConroy for all the support. I'll report the bug and this thread to the theme provider. In the meantime I've commented out the trackWebsockets pieces and all is well now. |
For anyone else that comes along to this thread, the theme in question is FREST by Pixinvent (https://www.pixinvent.com/demo/frest-clean-bootstrap-admin-dashboard-template/landing-page/), so the RC1 fix is to unminify vendors.js, and comment out the trackWebsockets references, and Blazor will start working again. |
Hi all,
I just updated my blazor applications to RC1 as well as all other nugets that were preview 7 -> RC1, and am now getting this on all of my blazor apps. My MVC apps are working fine after the update, but all 4 of my updated blazor apps are doing this. Should I revert back to Preview 7? Pretty blocked here.
Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager: Debug: New connection JKAjyXbT2EB55U85XkOndA created.
Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher: Debug: Sending negotiation response.
Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionDispatcher: Debug: Establishing new connection.
Microsoft.AspNetCore.SignalR.HubConnectionHandler: Debug: OnConnectedAsync started.
Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport: Debug: Socket opened using Sub-Protocol: '(null)'.
Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport: Debug: Waiting for the application to finish sending data.
Microsoft.AspNetCore.SignalR.HubConnectionContext: Debug: Failed connection handshake.
Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport: Debug: Socket closed.
Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager: Debug: Removing connection RyCTYkvlKdR_KNL529goQg from the list of connections.
The text was updated successfully, but these errors were encountered: