-
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
Login command using the cy.origin no longer works in 10.6 #23565
Comments
Hi @anbeck77 , thanks for opening an issue! Unfortunately I don't have enough information to assist you at this time - it appears some formatting/content was lost in the code snippet you included which makes it difficult to determine if there is a bug in Cypress or an issue with your test configuration. Issues with authentication flows are often related to cookies which are very browser-dependent, so it would be helpful to know precisely what browser & version you're using and whether the test fails on Chrome/Electron/Firefox/all browsers. There were a number of changes made to cookie handling in versions 10.3.0 and 10.3.1 so it is possible that one of those changes impacted you, but without a runnable reproduction it will be difficult to identify the precise cause. To best assist you with your problem a Git repository with a minimal reproduction of the issue would be the best way to identify what's going on, but if that can't be provided then screenshots and/or a video of the failure would also be helpful. If neither of those can be provided then we would need to rely on debug logs, please see our Troubleshooting Guide for instructions for enabling debug logs and attach the output here. |
I believe this is related to #23531. I’m experiencing the same issue as the OP. Rolling back to 10.3 fixes it for me. 10.3.1 breaks my login test in a unique way. Basically when I run the login sequence in a normal browser (and login works) a series of requests and redirects is fired off where some rely on the previous setting a particular cookie. On the final request 2 cookies are passed in and the request returns a 302 with embedded auth state (tokens and such) back to the application. When run from Cypress, this final request is missing 1 of those cookies. It seems that the missing cookie would have been set on the client side directly in document.cookies as a result of one of the previous requests in the login sequence (not as a direct result of a Set-Cookie) Its difficult to give more detail because the code under test during the login experience cannot be debugged as it lives in a federated identity provider and is minified. Sounds like the OP and I are using the same identity provider and thus experiencing the same test failures: Azure Active Directory B2C. |
@mike-plummer It is my intention to record a video, then upgrade and record the same video. It's just a matter of when. :) |
@anark I am going to go ahead and close this a duplicate of #23531 base on how you've describe how your application/login should work verse how it is working in Cypress. As I am sure you are aware of by now, there were several cookie-related issues logged where cookies stop working as expected after the 10.3.0 release. Once those are fixed and if you issue is not resolved, please comment & we can re-open and try to create a reproducible example and/or dig into your logs so can figure out why this is no longer working. Thank you for the details you have provided! 🙏 |
I think this comment was meant for @anbeck77 not me |
Current behavior
Using a login command that with cy.origin and with Cypress configured to use experimentalSessionAndOrigin: true,
I was previously (Cypress.10.2) able to use idaas to handle authentication.
After uprading to Cypress.10.6 this resulted in the browser loading a page labelled BAD REQUEST.
The console had no useful error message or details.
I'm not sure what happened here, and I'd like to be able to fix it myself as we need to be able to authenticate out test users via idaas.
Desired behavior
The Cross-origin request should be successful and I should be able to continue to navigate on the website under test.
Test code to reproduce
Cypress Version
10.6.0
Node version
v16.17.0
Operating System
Windows 10 Enterprise
Debug Logs
Other
No response
The text was updated successfully, but these errors were encountered: