Skip to content

Conversation

BrennanConroy
Copy link
Member

@BrennanConroy BrennanConroy commented Aug 4, 2020

Fixes #23679

Blazor WASM tested and works as expected.

@BrennanConroy BrennanConroy added the area-signalr Includes: SignalR clients and servers label Aug 4, 2020
@BrennanConroy BrennanConroy added this to the 5.0.0-rc1 milestone Aug 4, 2020
@davidfowl
Copy link
Member

How many more of these do we need? Can we do this once?

@BrennanConroy
Copy link
Member Author

You mean what other options might need a similar change? I don't think any more do, it's only applies to settings that can be modified by the server, and I think the server can only modify cookies.

@davidfowl
Copy link
Member

I'd like that to be the definitive answer. Can we easily test Xamarin and WASM?

@BrennanConroy
Copy link
Member Author

You're asking two different things.

Yes we can test on Xamarin and WASM, it's easy just annoying and time consuming.

And as far as I know, Cookies is the only special option that we need special logic for WebSockets, the other options are already passed to WebSockets.

@davidfowl
Copy link
Member

Ok

@BrennanConroy
Copy link
Member Author

BrennanConroy commented Aug 6, 2020

Tested Blazor WASM, but can't test watchOS, XCode wont update on my Mac...

@BrennanConroy BrennanConroy modified the milestones: 5.0.0-rc1, 5.0.0-rc2 Aug 25, 2020
@BrennanConroy BrennanConroy changed the base branch from master to release/5.0-rc2 September 1, 2020 18:30
Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would still like the log.

@BrennanConroy
Copy link
Member Author

@Pilchie for RC2

@Pilchie Pilchie added the Servicing-approved Shiproom has approved the issue label Sep 11, 2020
@Pilchie
Copy link
Member

Pilchie commented Sep 11, 2020

Approved for .NET 5 RC2.

@Pilchie Pilchie merged commit 970d0f5 into release/5.0-rc2 Sep 11, 2020
@Pilchie Pilchie deleted the brecon/cookie branch September 11, 2020 01:22
@kuznero
Copy link

kuznero commented Sep 16, 2020

Any chance to get it available in dotnet 3.1 as a backport or perhaps as a nuget package to enable this in previous versions?

@Pilchie
Copy link
Member

Pilchie commented Sep 16, 2020

Before backporting anything we generally try to stick with workarounds, to avoid risking an unintended regression. Can you describe why the workaround in #23679 isn't sufficient for you?

@BrennanConroy
Copy link
Member Author

The workaround provided in the issue is specific to their scenario, the more general workaround is something like described here: #23350 (reply in thread)

Imagine connecting to Azure App Service where it uses affinity cookies with some hash/guid that it generates, I don't think you can hardcode a specific cookie in that case, you need to first get the cookie with an http request then set it on the hubconnection options.

@Pilchie
Copy link
Member

Pilchie commented Oct 2, 2020

@BrennanConroy let's open a 3.1 PR and consider for inclusion in 3.1.10.

@jaydrozd
Copy link

I feel like I am seeing this same issue with the javascript client.

We have an application using signalR behind an AWS app load balancer. We have configured the load balancer correctly using stickiness based on cookies. The problem is that often when signalR tries to initiate the web socket connection, it sends the id in the querystring, but does not pass along the cookies that the AWS load balancer has set on the negotiate request. Because of this, the load balancer sends it to any of the servers in the target group, and we're receiving a 404 because the id sent in the querystring does not match to any valid connection ids on that server.

Is there any way in the javascript client to make sure that the websocket request sends the same cookies sent in the negotiate request?

@ghost
Copy link

ghost commented May 27, 2022

Hi @jaydrozd. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@davidfowl
Copy link
Member

@jaydrozd The browser controls that. Are you using the same domain?

@jaydrozd
Copy link

It looks like it is not a signalR issue after more investigation. It is related to an iOS issue. I'm using this in an Ionic (Capacitor) based app, and it looks like it's related to a WKWebView issue, which happens to be a domain/trust issue.

This works correctly in a browser based (angular) app, so it is definitely not a signalR issue.

@ghost
Copy link

ghost commented May 27, 2022

Hi @jaydrozd. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-signalr Includes: SignalR clients and servers Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signalr client frequently getting 404 when trying to connect to ALB in AWS
7 participants