Skip to content

ALB Target Group Stickiness Cookie on Google Chrome causing "ERR_TOO_MANY_REDIRECTS"

0

I have a problem that only surfaced this morning (despite no changes to my server's codebase, or changes to any settings within AWS).

When a user is directed to a particular target group of mine, I get ERR_TOO_MANY_REDIRECTS in the browser.

This behaviour seems limited to Google Chrome only - I haven't found another browser that allows me to replicate.

Upon inspecting the cookies, I had two of note: AWSALB and AWSALBCORS

Clearing all cookies allows me to access the target group, but the problem re-occurs a few minutes later.

Removing the cookies individually has allowed me to isolate AWSALBCORS as the cookie that is triggering this behaviour. Removing it, and reloading allows me access, but if it's already present in the browser, it causes the ERR_TOO_MANY_REDIRECTS error.

Turning Target Group Stickiness off has resolved the issue, but I need that feature active, so I would like to find a solution.

I know that Google Chrome are rolling out changes to Third Party Cookies, and this may be the cause of the issue.

Can anyone help me solve this behaviour, so that I can re-enable Target Group Stickiness?

asked 2 years ago771 views
1 Answer
1

Have you traced the requests from Chrome to the ALB, too many redirects means that in response to a request, the browser responded with a 3xx response code, usually containing a "Location" header which indicates the servers idea of where the resource should be requested from. The browser will then follow this redirect based on the contents of the "Location" header.

If following this response results in another 3xx response with the same location header, a redirect loop occurs, and after a few of those the browser spits out the error you are getting.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages

Tracing the behavior should be a start to isolate the problem.

AWS
EXPERT
answered 2 years ago
  • I cannot re-enable it to double check it, because it breaks the site for all chrome users, and it's a production architecture. I don't currently have the ability to spin up a duplicate system to do this testing on.

    However, I can confirm, the response is 302, with the URL for the redirect being the same URL it's redirecting from. Trying it with the Network panel of the Web Inspector open, I can see it just shows the same URL over and over until the browser opts not to continue processing them.

    My theory is that the ALB cookie is malformed somehow in Chrome, and thus it's not being handled correctly.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.