Cypress: Entire test runner redirects to app's login page

Created on 18 Feb 2019  路  7Comments  路  Source: cypress-io/cypress

Current behavior:

In our app when running tests, the test runner itself redirects to our login page, as per the below GIF.

escaping-iframe

Desired behavior:

Redirects only happen within the ifrrame, not the entire test runner.

Note: I cannot reproduce this bug in a sterile environment, but was wondering if anyone has come across it before

framebusting

Most helpful comment

Thanks for the help @jennifer-shehane

I managed to fix it by updating Cypress 3.1.4 -> 3.1.5, which seems strange that it should fix it if it was indeed a framework issue.

For anyone who finds this in the future, I was using [email protected]. I couldn't find any specific reference to framebusting code. My colleague running Linux didn't have this issue.

All 7 comments

Having the same problem. I'm unable to run any of our e2e specs anymore due to this problem.
https://stackoverflow.com/questions/54750440/cypress-e2e-test-dock-closing-on-cy-visit

@ryanlangton i've upvoted your s.o. question for visibility

This behavior usually happens when the application under test has some code to prevent framebusting. Cypress tries to work around this situation by replacing common code used to prevent framebusting - see https://on.cypress.io/configuration#modifyObstructiveCode

See if your application implements anything similar to common framebusting patterns and let us know what this code is so we can extend Cypress to handle this situation.

Otherwise, we'll need a url to visit ourselves to investigate.

Thanks for the help @jennifer-shehane

I managed to fix it by updating Cypress 3.1.4 -> 3.1.5, which seems strange that it should fix it if it was indeed a framework issue.

For anyone who finds this in the future, I was using [email protected]. I couldn't find any specific reference to framebusting code. My colleague running Linux didn't have this issue.

Hmm this is not fixed for me and I am on 3.1.5. I will investigate for framebusting code

This was happening for us because we were importing hammerjs. Once I removed that import it works fine.

Thanks for the help @jennifer-shehane

I managed to fix it by updating Cypress 3.1.4 -> 3.1.5, which seems strange that it should fix it if it was indeed a framework issue.

For anyone who finds this in the future, I was using [email protected]. I couldn't find any specific reference to framebusting code. My colleague running Linux didn't have this issue.

Updating to 3.1.5 also worked for me. I don't think I was using any specific 'framebusting' code. Just a simple vue js app with Vuex.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brian-mann picture brian-mann  路  3Comments

rbung picture rbung  路  3Comments

weskor picture weskor  路  3Comments

scottcrowe picture scottcrowe  路  3Comments

igorpavlov picture igorpavlov  路  3Comments