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
We upgraded to Cypress 12 recently and our tests started breaking. After running through some tests it seems that cypress 12 is adding a extra cookie with same site set to Lax but with a extra period before the subdomain.
For instance:
A cookie like this
TestCookie testsubdomain.testdomain.com
Will get another cookie like this if the cookie is set again
TestCookie .testsubdomain.testdomain.com
I can also confirm that all of these extra cookies have SameSite = lax even if the original cookie did not contain it.
If you downgrade to 11.2 this behavior goes away. I can confirm that no cookies with a leading period before the subdomain are created when running this outside of cypress
Looking through some of the tests around this behavior I tried to get it to happen by visiting the page twice - no luck. A redirect is also not needed for this to occur.
Running through some combinations this did work
Navigate to a page, set cookies, subdomain.domain.com/test
Navigate to another page, set cookies, subdomain.domain.com/test2
There should be a duplicated cookie.
Desired behavior
Cypress should only add one cookie.
Test code to reproduce
I don't have a reproducible copy mainly because of time concerns but I can circle back into this if someone doesn't have an easy way of getting this setup.
Cypress Version
12+
Node version
16.15.1
Operating System
Windows 10 Pro 19045.2546
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered:
Hi @o3-steven , I believe this issue is a duplicate of #25174. I am going to close this issue as a duplicate. Please follow the other issue for updates.
Current behavior
We upgraded to Cypress 12 recently and our tests started breaking. After running through some tests it seems that cypress 12 is adding a extra cookie with same site set to Lax but with a extra period before the subdomain.
For instance:
A cookie like this
TestCookie testsubdomain.testdomain.com
Will get another cookie like this if the cookie is set again
TestCookie .testsubdomain.testdomain.com
I can also confirm that all of these extra cookies have SameSite = lax even if the original cookie did not contain it.
If you downgrade to 11.2 this behavior goes away. I can confirm that no cookies with a leading period before the subdomain are created when running this outside of cypress
Looking through some of the tests around this behavior I tried to get it to happen by visiting the page twice - no luck. A redirect is also not needed for this to occur.
Running through some combinations this did work
Navigate to a page, set cookies, subdomain.domain.com/test
Navigate to another page, set cookies, subdomain.domain.com/test2
There should be a duplicated cookie.
Desired behavior
Cypress should only add one cookie.
Test code to reproduce
I don't have a reproducible copy mainly because of time concerns but I can circle back into this if someone doesn't have an easy way of getting this setup.
Cypress Version
12+
Node version
16.15.1
Operating System
Windows 10 Pro 19045.2546
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: