-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Whoops, there is no test to run error msg when visiting certain websites #3077
Comments
I have a bit of a different result ... My "final screenshot" is ending up on the actual stackoverflow website at a 404 page for the route That's what happens when using Chrome 71. If I use the Electron option, then cypress finally puts the URL into the integrated browser on the test page (instead of navigating away from the page entirely), however the page does not load (it just hangs forever on "Loading..."). To be clear this is happening to me regardless of what URL I use. Also I cannot show any screenshots because github it erroring out when I try to upload them and my company's strict browsing policies prevent me from doing it any other way easily. It's not a good look that I'm encountering blocking issues on the very first line of code trying to evaluate cypress. I'm actually the one that was pushing my company to switch to cypress. I received push-back but was able to convince them to give me just a view days to evaluate and prove it's good enough to purchase. If this doesn't get fixed fast I probably will not be able to convince anybody of anything. I'll try older versions for now and hope this bug doesnt exist. |
@parliament718 thank you for trying Cypress and reporting this bug. While unfortunate, I can promise that thousands of projects are successfully using Cypress every day locally and on CI to test a variety of sites. Where things can wrong in your case (and for StackOverflow) are custom proxies and redirects that prevent Cypress from correctly loading the site. When you have started Cypress for the very first time, did it scaffold examples folder and could you run any of the examples there? Something like
Then click on any spec file - what happens? |
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 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. |
Hey @parliament718, could you provide screenshots of these errors and also any test code you are running to get here? This would be most helpful in tracking the exact issue. I'm aware of 404 issues involving Chrome 72+ here #1872 Cypress does do some things that appear strange - like switching urls on first visit to the domain you intend use in your |
@bahmutov I've labeled all issues we've encountered previously with 'Whoops, there is no test to run' error within this label Some of them have been related to strange 'framebusting' kind of behavior - especially on large websites. Like this one for example #1517 |
@jennifer-shehane @bahmutov I have until the end of this week (max) to evaluate cypress for my company until we move on to other solutions. I still cannot get past this issue. Are the screenshots above expected behavior? |
@parliament718 something goes terribly terribly wrong in your case (remote URLs, framebusting, etc) that we do not have time figure out. We won't have time figure out this unfortunately in any urgent time frame. |
@bahmutov My company has strict browsing policies, are there any external calls that cypress makes to any domain other than *.cypress.io that I perhaps need to have whitelisted? |
Hey @parliament718, I've been unable to replicate this behavior on my end with Chrome 70 & 72. Did you narrow down the issue to Chrome 71? Or were you just mentioning that. Also, have you by chance set the Whitelisting only our domain (*.cypress.io) should be sufficient. |
@jennifer-shehane I've tried modifyObstructiveCode false with no success. Also, how can I try via Chrome 70/72? I only see the 71 option and Electron in my dropdown. Also, please note I am on a windows machine, do you have one to try on ? |
@jennifer-shehane Has anyone had a chance to test on windows? Also how can I test on Chrome 70/72 if I dont see the option in the dropdown? |
Hey @parliament718, you would need to download that specific Chromium version on your machine - adding it as an application, as you would any other browser - then it should be detected within Cypress for the dropdown. It's not great documentation, but this explains how to download a specific Chromium version. https://www.chromium.org/getting-involved/download-chromium |
This might be a silly question but you do have describe part also in your spec? |
Hi @jennifer-shehane , i get the same message 'Whoops, there is no test to run.' when i try to access any page using http. When i use https://google.com it works fine. But when i use http://localhost:8000 it opens the page, flashes for a second and then throws the above message. describe('Login page', () => {
it('Login', () => {
cy.visit('http://localhost:8000')
})
}) |
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 :
like @jennifer-shehane suggest it here : 2052. And now it works !! Good luck ! |
Hello everybody, I have the same problem of @parliament718, I tried the suggest of @marinav however it is still happening. |
This problem just started for me when I added |
The issue in the OP is coming from code on StackOverflow that is causing frame busting. If I blacklist StackOverflow's javascript, it works: {
"blacklistHosts": [
"cdn.sstatic.net"
]
} So it seems like there's another frame busting case we need to identify and protect against. |
I also find this issue when I am running my test code. |
This blocked me too! |
This issue is resolved using #992 code snippet in support/index.js |
@rangabarath perhaps for your case, would be great to know what that was. |
Hi good afternoon, I too something similar happens, I start my test the functions login correctly, then step test select from the menu and the other test filling information of the person I am referring, income type identification and the identity card (number), then I click on the button to consult and there in the 3rd test case is that it sends the message to me, however I'm not going to another url, just what you do when you click on the button is loading a component under the button with information from the person consulted. attached images, thank you in advance for your help. attentive to your prompt response. Greetings |
|
Would be great to get an update of the priority on this, actually thinking of migrating to another framework because of the issue. |
I am facing the same issue. I am using cy.visit() and cypress redirects to a double underscore url. I created a question about it on Stackoverflow for anyone interested in reproducing this issue: https://stackoverflow.com/questions/66613875/app-in-cypress-redirects-outside-does-not |
Hi, I also have this issue and it is a blocker to even start my first test with Cypress... |
@handriss did you try the workaround I posted in the stack overflow question? |
Facing same issue, none of the workarounds are working. |
Having the same issue when |
After removing modifyObstructiveCode working for me. |
My javascript runs this code after pressing a button. After removing "top" Cypress stopped behaving like this. //Doesn't work
window.top.location.href = '/helloworld/';
//Works
window.location.href = '/helloworld/'; |
@olitomas will this be applicable with my link @jennifer-shehane do we have other workaround that will work for this issue? |
I cant see why not. |
Hello, having the same issue here We are testing a payment module, and after entering informations (card number, cvc, expiry date) the payment is supposed to be successful and then we're supposed to be redirected to a success page. in the log: i can see the redirection but it leaves me with the same page you all have (there is no test to run)
none of the workaround have worked |
@mathiasvandaele Ive literally just found your comment because cypress has started bailing out after testing a stripe iframe to enter credit card info. Did you ever manage to solve this? |
This problem is killing us because our application redirect to Azure B2C for login/logout/identity management and the second it just redirected it just says "Whoops can't find tests". Really rough to deal with as none of the work arounds here work; Interestingly enough logging in through b2c its fine its just all the other flows that ruin us. |
We are experiencing the same issue when we select a different company id in our site and the site updates to bring in the company id settings for the user. The site is iframe structure. I didn't know if there was a way to make cypress to ignore the updating of the site in order to continue running the tests. |
Having the same crash trying to use cypress to test a Stripe Checkout payment flow. |
Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please open a new issue if there is new information to provide around this error in newer versions of Cypress. |
Really weird crash - "Whoops, there is no test to run"
Cypress 3.1.4 on Mac, spec file
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
The text was updated successfully, but these errors were encountered: