cypress: Whoops, there is no test to run error msg when visiting certain websites
Really weird crash - “Whoops, there is no test to run”
Cypress 3.1.4 on Mac, spec file
it('loads', () => {
cy.visit(
'https://stackoverflow.com/questions/379453/useful-add-ins-or-plug-ins-for-native-visual-studio-developer'
)
})
See movie below

Sometimes I see the red error message in the command log, but could not record it yet, and it flashes way too quickly to see
Final screenshot
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 65 (9 by maintainers)
hey all, I was facing the same problem and the workaround that works was to change the browser to another one than Chrome.
This another browser works for me. So, it looks like this is a chrome’s version problem. I think that could be related to the arrangement between chrome within cypress and the local chrome in the machine. And this could be the reason that this problem happens only for some people.
If someone has the correct versions that chrome should have on cypress and locally, please, share here.
Thanks.
Hi,
I had the same problem and it took me a long time to understand why. Indeed this is framebusting, and it’s not easy to find what’s wrong. Regarding my app, I commented on bits of code and I finally found it came from the google tag manager. So I added this to my cypress.json file :
"blacklistHosts": ["www.googletagmanager.com"]like @jennifer-shehane suggest it here : 2052. And now it works !!
Good luck !
Hi @eabusharkh0 , Can you plz tell me the solution for same problem and what changes should i do in my script.
Below is the current script i am using -
And, the error msg saying “Whoops, there is no test to run” comes up when clicked on button.
I had the same issue. I fixed the problem removing the target ‘_top’ attribute from a form that didn’t need it, as suggested here #3051
So I found a work around for this issue, instead of clicking on the emulate button that was taking me to a new page, I made an api call then I visited the page, code down below:
The issue in the OP is coming from code on StackOverflow that is causing frame busting. If I blacklist StackOverflow’s javascript, it works:
So it seems like there’s another frame busting case we need to identify and protect against.
Hello everybody, I have the same problem of @parliament718, I tried the suggest of @marinav however it is still happening. @jennifer-shehane do you know how is it going? I’m making some POC to present to my team to select a best tool to automated the tests however since we have this problem I cannot present for them cypress like an option. Thank you.
What happens is
If I run these example specs with Electron option it runs successfully.
Why does step 2 above happening? I once again notice that redirect to the route with a double underscore …What is this about? When the cy.visit(‘localhost:4200/some/url’) call ends up redirecting me to
localhost:4200/__, my application is obviously running on that port and will begin to bootstrap itself with an invalid route.I don’t understand what cypress expects to happen when it redirects to the url where my application is running with a double underscore route.
Additionally, if I run my example using Electron is just hangs trying to load the localhost:4200/some/url even though this exact url has no problem loading in a regular browser session.
Hi Cypress Team @jennifer-shehane @bahmutov, this issue still exists on Chrome 78 Canary 80 Electron 61 while using Cypress ^3.4.1.
As a workaround, can we identify Cypress in the browser using
window.Cypressall time?That way we can probably skip the iFrame busting for Cypress in our QA env.
Please confirm, thanks!