-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cookie regression issue in 3.5.0 has not been resolved in 3.6.0 #5559
Comments
@jcheo1 Can you please link to the original issue that you believe was inaccurately closed in 3.6.0? |
There is a known issue where if your website is using service worker cache, then the old version of Cypress may continue to run against your tests when locally opened in the newer version. #702 Could you please follow these instructions to clear App Data and restart Cypress? We believe this should clear the cached version of Cypress and run your tests against the new version again. Please let us know the results! |
Tried clearing the App Data. That did not work. |
I have the same problem. |
I'm experiencing the exact same problem. Not operation on cookies works since Cypress 3.5.0 (also not fixed in 3.6.0) on both Electron or directly with Chrome (using Ubuntu) cy.setCookie('my-cookie', '')
cy.clearCookie('my-cookie')
cy.clearCookies()
cy.wait(1000)
cy.getCookie('eversports-manager.sid').should('be.null') |
We are using XSRF-TOKEN in combination with cookies. Since 3.5.0 this is not working any more. Not fixed in 3.6.0, not fixed in 3.6.1 So back to cypress 3.4.1 :( const options = {
method: 'DELETE',
url: 'api/v1/something-something-something',
headers: {
'X-XSRF-TOKEN': 'test123',
cookie: 'DWD_JWT_TOKEN=' + cookie.value + ';XSRF-TOKEN=test123'
},
failOnStatusCode: false
};
cy.request(options); |
I've upgraded to 3.6.1 and our login issue still exists as well. We have a pretty simple authentication endpoint that we are hitting which sets cookies. Once we get an HTTP status of 200, we assume the user is logged in and start a test but this is not working since 3.4.x. I can see that the |
Hi everyone, I'm trying to reproduce this problem currently. Can any of you supply me with the exact 'Set-Cookie' headers sent by your web server during normal operation? You can view these headers through the Network tab of the Chrome DevTools. |
|
@flotwig any updates around this? 🙃 |
@stevemckenzie There are 2 fixes to cookies bugs scheduled for 3.7.0:
I believe the latter will fix your issue since you're setting a cookie on a |
Thanks for the update @flotwig ! |
Hey @jcheo1 and others in this thread, version 3.7.0 of Cypress has been released with some fixes for cookie behavior. Please try it out and see if it fixes your issue. |
Thanks for another update @flotwig ! Unfortunately, I still have the same issue. Is there any other info I can get for you? |
@flotwig Much appreciated. cy.setCookie('UI', 'admin_ui'); Currently, in order to get around this, I need to specify the domain in the options.= > cy.setCookie('UI', 'admin_ui', { domain: Cypress.env("domain") }); |
Thanks @flotwig, but for us the issue is only partly resolved in 3.7.0 We are using
|
When I use Maybe domains with Cypress 3.7.0 |
Might be related with our issue: cookies with xsrf token contain a ';' (semicolon) |
Hi people still experiencing issues with cookies in Cypress 3.7.0, I've isolated & fixed a bug introduced in 3.5.0 which makes it so that explicit |
@PetMou I believe your issue will be resolved with #5894, since you are running into problems explicitly setting |
3.8.0 has been released, please check to see if it resolves any issues. |
Thank you Zach! For me, the issue is resolved in 3.8.0 |
@treylon I'm not able to reproduce that issue in 3.8.0, try updating. @stevemckenzie @bcholewinski @jcheo1 How go things? Have you guys tried using 3.8.0 to see if it resolves the issue? |
@flotwig we still have the same problem. Our login tests which use our login form work fine but our custom If I look at |
@flotwig I just tried 3.8.1 and still have this issue. |
Any updates or suggestions @flotwig ? |
@stevemckenzie at this point, it would be most helpful if you could provide a reproducible example of the bug that I can run locally. Unfortunately, my attempts to build one based off of the info in this issue have not been successful. Feel free to contact me via the email on my profile if your source code is private but you'd like to share it to help reproduce this. |
I know this thread was encompassing a variety of cookie issues. Many of which have been resolved since 3.8.0 aside from @stevemckenzie. I'll be closing this issue as resolved. If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run (or email to [email protected] if private). There may be a specific edge case with the issue that we need more detail to fix. I think this will cut down on the noise from the other resolved issues already in here. |
Current behavior:
Like in 3.5.0, the cookie cannot be set in the chrome browser when running cypress.
Desired behavior:
Like in 3.4.1, the cookie can be set in the chrome browser when running cypress.
Steps to reproduce: (app code and test code)
Versions
3.6.0, Linux mint, chrome
The text was updated successfully, but these errors were encountered: