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
Redirected to chrome-error://chromewebdata/ when X-Frame-Options present on redirected domain #4220
Comments
Cypress cannot visit 2 superdomains within the same test. Although the I would suggest taking a look at one of our recipes testing clicking into links with a different domain and restructuring your test to account for this. |
I'm facing the same issue after upgrading cypress to cypress@3.4.0. Is there a solution found already? |
Have exactly the same issue. Cypress looks nice, but if such "simple" things do not work it's hard to work with it. |
We get the same error and we're on one superdomain. We are however using a subdomain for authentication. The last version that still worked for us was 3.2.0 When we install the latest Cypress (3.4.1) the tests run up until the first redirect (from https://bar.foo to https://login.bar.foo). It errors with the cross-origin error message. When we add
Cypress 3.3.0 throws the same errors so something in that changelog should have caused it. The one change that stands out are the proxy settings. We did find a proxy in the registry but adding it to Maybe it is not really a proxy issue ? (since we can login but the subdomain redirect fails) |
Also got that issue, Our app is redirecting directly to our auth(which is a seperated domain) if user is not logged in and then redirects back to the app. But it seems like it just shows that chrome-error://chromewebdata/ :/ |
We are facing the same issue - on 3.4.1 and see chrome-error://chromewebdata/ |
Same issue we are facing. Any solution?? |
I also have the same issue with chrome Version 78.0.3904.108 |
It seems related to chromium version, after installing chrome Version 78.0.3904.108-1 I was available to run tests without that error. |
Reporting in, I'm having this same issue and would love for Cypress to better handle/solve this. It's an annoying one especially when testing OAuth2 and other stuff that requires domain changing. These things are common nowadays and we should account for allowing us to test such cases. |
Turns out that our issue had to do with the domains not resolving properly in the container. I did some dnsmasq work and that resolved the issue. In short, we're using actual domains (not localhost) in our CircleCI tests now and set up a dnsmasq wildcard to catch everything for the domain. |
@jennifer-shehane is there any updates where it will be possible to access more domains at the same test? Cause it seems a lot of people try this. Me, for example, I can't open some modal in a table just because this modal verifies the user token to open it. I'm keeping having this issue and it is really annoying. Thanks |
Same issue here while testing Auth and other stuff that requires domain changing. |
I want to loop back and report that our issue was our own problem. I've updated my comment above. |
same issue here, it is very annoying! :( |
We are having the same issue on |
Unfortunately no one has provided enough information to reproduce the problem. This means that we do not have a path to move forward, so no, no progress has been made on this issue as we cannot see this error on our machines with no reproducible example. Please comment in this issue with a reproducible example so we can begin addressing the issue. |
Can this be a duplicate of #1506 maybe? |
Good day everyone! I have the same issue and wanna describe how I fixed it. Application features:
Strangeness:
How I fixed it: export const renterEmail = 'renter4booking@example.com';
export const renterFname = 'Renter';
export const renterLname = 'Book';
export const accountName = `bookings${Date.now()}`; Example of variables with which tests failed: export const accountName = `bookings_tests${Date.now()}`;
export const renterEmail = 'renter4bookings@example.com';
export const renterFname = 'Renter';
export const renterLname = 'Bookings'; I can`t explain this strange behavior. I tried to change variables import order but it changes nothing. Besides, if I write a new code it will be crashed. |
Thank you for taking the time to report this here! That's a strange issue indeed. Let's hope cypress team has some ideas. |
Facing the same issue , tried setting the cookies SameSite = none but haven't got any better results . Looking forward to hear back soon!! |
Reporting in, similar with adomyaty55foundry@ My website is for internal use and I use Cypress for testing OAuth2. |
Unfortunately no one has provided enough information to reproduce the problem. This means that we do not have a path to move forward, so no, no progress has been made on this issue as we cannot see this error on our machines with no reproducible example. Please comment in this issue with a reproducible example so we can begin addressing the issue. |
to reproduce the problem you really need to click the link with external resource like itunes, google play store, amazon etc.. Since Cypress does not support switching between tabs, we need to make it open in current tab resetting .invoke('removeAttr', 'target') or by setting it to _self : .invoke('attr', 'target', '_self') then source will be opened in current tab and another problem will appear as described in this ticket:
as you can see I expected Example of button to click: <a href="https://play.google.com/store/apps/details" test-id="google-play" target="_blank"> Example of test verification: cy.get('[test-id="google-play"]').invoke('attr', 'target', '_self').click();
cy.url().should('include', 'google.com'); PS: I also tried exporting hopefully this is something cypress team willing to implement sooner |
@Tay08 No, the issue will be closed and a comment will be made if it is part of a release. |
I'm experiencing this issue with only different subdomains in one test ( |
Hi @jennifer-shehane the fix is it included into v8.2.0? |
@Tay08 No, the issue will be closed and a comment will be made if it is part of a release. |
@jennifer-shehane - since this is happening during auth sequences, I doubt that very many are going to be willing or able to share the details you are asking for in a publicly visible GitHub issue. However, you should be able to setup a repro by having different subdomains login.exampledomain.com - hosts the login page with a username/password credential Cypress breaks for me starting at the STS step. There isnt any new windows or tabs being launched, or any popups, etc. Just one browser tab with some redirects. Electron works fine. its just chrome that shows the |
I also face the same problem, but its was solved by updating "cypress.json" according to @Jessica-Jiang-92 |
@DevPerers @Jessica-Jiang-92 How do we update "cypress.json"? |
|
Might be interesting to you: |
After upgrading to v 9.7.0 and making use of Here is the command I have so far: Cypress.Commands.add('loginAsUser', (email, password) => {
const args = { email, password };
cy.session(args, () => {
// visit homepage
cy.visit('/');
cy.get('button[data-cy=login]').click();
// redirects to Auth0
cy.origin('AUTH0 DOMAIN', { args }, ({ email, password }) => {
cy.get('#username').type(email);
cy.get('#password').type(password);
cy.get('button')
.contains(/^Continue$/)
.click();
});
// assert we've returned to the site
cy.url().should('contain', '/carousel');
});
}); |
So you can use Auth0's api to fetch your token and set the cookie. This is how I got around this issue with Auth0
The response will include the session and JWT you need. |
@Keenan144 I have tried this approach, but instead of setting the cookie I needed to set |
@bunge12 thats a bummer, the only other thing I could suggest is to make sure your ENV vars are being set correctly. With cypress you need to append CYPRESS_ to your variables in github actions. |
@bunge12 I have the exact same issue, trying to login to auth0. Only fails on CI. Did you come up with a fix? |
@sfrendpax8 we decided to run Cypress on CircleCI instead of GitHub Actions and it runs without a hitch :) |
I am facing the same issue for some time now. My org has internal support to Cypress 8.3.0 as of today. Interestingly my tests runs locally but when I push it to pipeline it fails. From the video recording it looks like initially it goes to My redirected url is in an iFrame element and I think that's what is causing the issue. My configs and versions: Anyone came with a fix? |
Are there any workarounds for the issue? I am facing this today using Cypress 12.7.0. |
sorry, your link cant be opened |
we're on the same boat, but im using drone. My code passed all the test in local but got an error in Drone |
This comment was marked as resolved.
This comment was marked as resolved.
@jaredtbates have you gone through our Auth0 Guide? Also, check out our community chat, it can be helpful for debugging or answering questions on how to use Cypress. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@jaredtbates glad you got it figured out! I am going to close this old issue since much has changed since the release of cy.origin. If folks have issues in the latest version of Cypress please open a new issue and we will be happy to investigate. |
For us, we got it running with
|
Hi everyone, We are also facing the issue right now with cypress 13.0.0 and Node 20.10.0 We've got an Angular 17 application that uses Keycloak for OIDC connection. When opening our app, the user is automatically redirected to the Keycloak home page for connection. It works fine when hand testing but when using Cypress the automatic redirection cannot be done and we got the chrome-error://chromewebdata/ page. Here is my code (for local test) with
In the cypress navigator web console, we can see the keycloak auth request but it fails
If you've got any clue I'll take it, thanks |
Current behavior:
I get this screen when I try to access certain pages:
This I can easily access on the same browser used by cypress
I have my "chromeWebSecurity": false on my cypress file just in case
Desired behavior:
Continue executing the test. Access the pages that are completely accessible when not accessed through cypress' chrome
Steps to reproduce: (app code and test code)
This is my code, I hope this one is reproducible:
┆Issue is synchronized with this Jira Epic by Unito
The text was updated successfully, but these errors were encountered: