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
3.1.1 regression: cookie can't be set when visiting local devserver #2724
Comments
Hey @KoenCa, we'll need a reproducible example. Following your steps to reproduce will not reproduce the problem without having you app locally running - which you did not provide. |
Experiencing exact same issue now. Our builds are failing. Has been working fine for months.
|
Downgrading Cypress back to 3.1.0 fixed our issue as well |
This is definitely a regression in 3.1.1 and somehow made it through thousands of tests without surfacing. I can see where the problem is occurring but it's not obvious why this is occurring. This is likely due to the way you are either setting cookies via @mcarlotta or @KoenCa Do you happen to know if there's an external site that you can visit that causes this problem? Are either of you two using It looks like its failing in both: Could perhaps one of you post what you do under the hood via that visit or request? This may involve multiple server redirects. |
@brian-mann I don't know an external site that causes the problem. Production instances of our app work while the local version doesn't and there aren't any differences in what is send back by the webserver. I'm not using Under the hood nothing special is happening. It just goes to our login page without any redirects. |
We are also seeing the same issue on our builds. Locking to 3.1.0 fixed it. |
Our team had the same issue when calling
Can confirm that downgrading to |
We were having this same issue while running 3.1.1. Then I came across something that I'm wondering if you guys are as well. My build site is through Jenkins and when the url is something like my_test_branch.mysite.com it fails, but if my url is mytestbranch.mysite.com then it passes. Can anyone else confirm? |
@rshafakian we have a similar setup to the one you mentioned except ours is structured as ‘app-test.domain.com’ and built using Jenkins. However, even our local and CI tests started failing after update before getting to Jenkins process |
@mcarlotta yes our local is running 3.1.0 so that passes. build branch is using 3.1.1, but rolled back to 3.1.0 so it passes. but when our build branch has a url without any dashes or underscores it still passes on 3.1.1 (e.g. 'test.domain.com` instead of 'app-test.domain.com'). Not sure if this is the case for everyone else as well. can you setup your url that way to see if it still fails? might just get closer to solving the problem if that's the case. |
I believe this is happening when a server sends back invalid cookies, but I'm working on trying to reproduce it first. I understand how this is happening and should be relatively simple to fix. |
The code for this is done, but this has yet to be released. We'll update this issue and reference the changelog when it's released. |
Released in |
Can confirm this is fixed in 3.1.2 in our builds 🎉 Thanks @brian-mann @jennifer-shehane! |
Same for us as well. Thanks! |
Unfortunately both 3.1.1 and 3.1.2 break my tests (which work fine under 3.1.0). The initial issue description describes the following error: The other error in this thread is: I'm getting this latter one, so I'm unsure whether it's due to cookies or not. I'm testing Drupal 7 which supplies a session cookie like the following:
Perhaps that's invalid (I don't know how to tell). It does work though; in 3.1.0 it's enough to allow Cypress to "log in" to my app. In 3.1.1 I got the same error as above ( I also tried telling Drupal to remove |
Can also confirm that 3.1.2 fixed the issue for me! Thanks a lot! |
Fixed for us as well! |
Still looks like we're getting the same error with Looks like we can workaround this by not setting a cookie on development mode (this seems to be on us for setting a cookie incorrectly) |
Hey @jm2242 could you open a new issue detailing your test code and how you are setting cookies. A reproducible example would be best. |
Okay will open a new issue with details from #1321 |
Unfortunately v3.1.3 does not fix the issue I described in #2724 (comment) for me. I'm stuck on 3.1.0, as no subsequent versions manage to log into my Drupal instance. |
Hi @jeff-h, could you open a new issue? Since several users have confirmed their issue was resolved with the 3.1.2 release - we will be considering any issues persisting through 3.1.2 as separate issues (or edge cases of this issue) that we'd like to address directly. We will be closing this issue to further discussion as this specific use case is seen as resolved. Please open a new issue if you are experiencing similar behavior. |
I was just following the tutorial and trying to setup simple tests for our app and an error stopped me.
Current behavior:
The very simple test case:
Generates the following error in the test runner:
Desired behavior:
I want Cypress to open my page so I can start writing tests 😄
Steps to reproduce:
Reproduce is probably going to be hard, because visiting a production version of our app with Cypress worked correctly.
Versions
Workaround
I first asked a question about this on the Gitter channel and downgrading to 3.1.0 made the test case above work and my page was loaded correctly.
Extra
I think something goes wrong here: request.coffee
The text was updated successfully, but these errors were encountered: