-
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
Cypress hangs on empty tests files #1905
Comments
Related to the "running" status part of this: #1891 Looks like that may be fixed |
We're updating this entire view in the Dashboard pretty soon. We've been using it and also have not been satisfied with various things like the spec name being cut off! I created a repo with an empty test file and am unable to recreate an 'error' state. The tests show up as status 'No Tests':
|
We didn't have any code in the file.. however now i'm seeing it on files with code as well.
The problem is inconsistent, but when it does fail it seems to be in the same spots. It always seem to fail prior to any tests starting in a new file. There's nothing else really in the log currently. Anyway to force more output for travis? |
Definitely this one: #1934 |
The only logging information can be printed by setting |
welp if I turn on debug in travis I get |
tried just logging |
not sure what to log.. can't log everything as travis can't handle it.. without logging nothing is displayed and no tests start for the file it crashes on.. doesn't happen on any particular file consistently. Always after |
@paulfalgout I don't think you need to do anything. We've collected data from about 4 other situations that are experiencing the same bug. We're working on it now. We believe it has to do with a file lock never releasing, which causes a Promise to hang that never resolves. Can you try to run your tests in Chrome? We believe this problem only has to do with Electron, but don't quote me on that just yet. |
Most definitely the same issue as this: #1912 and withspectrum/spectrum#3334 (comment) which failed in Circle job: https://circleci.com/gh/withspectrum/spectrum/8642 We also have reports from two other organizations with the same problem. |
👍 ok trying chrome |
@brian-mann yep so this time a couple of times it said |
v3 never fails with the browser set to chrome, but runs are averaging between 15-18 mins. In v2 we were getting between 5-7 mins. For the moment we're reverting. |
We have noticed that Chrome does indeed run faster. The v3 performance problems are a separate issue altogether that we are looking at. We believe we have the fixes for the spec file just hanging as per this PR: #2020 |
Good deal thanks. I'll follow that PR and re-upgrade when it's released |
Released in |
I'm sorry to be the bearer of bad news, but I think this remains an issue on Our build hang 4 times out of 10 runs today. Here are some clues I've noticed (or might be useful):
All the subsequent log statements are like this:
We're using Bamboo, with Cypress running within a Docker container (custom image, not based on images provided by Cypress). We can't upgrade to Cypress |
Oh, I actually managed to capture logs on Here's the log for the suite that hanged:
|
@brian-mann @jennifer-shehane I see this issue has been removed from |
@kamituel The fix did not make it into 3.0.2 and is instead included in version 3.0.3 - which is pending release. We close issues that have a closed PR associated with it, so be on the lookout for 3.0.3 official release here soon. |
So I've tried upgrading to So far I haven't seen any outright failures, but I'm still getting quite a bit of:
And when these happen the tests are way slower than they were in 2.x. It's usually over double the run time, but I'm not sure why. Any ideas? Insights says Also as far as I can tell the time outs are unrelated to what's in the spec file. Some had 1 test some had many. Multiple runs has timeouts on different spec files. I get timeouts basically every time, but it's not consistently reproducible. |
Found one thing. If chrome stable isn't explicitly set on travis it uses chromium 62 which seems to perform much worse than chrome 68. https://docs.travis-ci.com/user/chrome#selecting-a-chrome-version It seems to be doing a little bit better.. though I'm not through the first run yet and it's still quite a bit slower. |
I think part of the reason it's slow is because it re-runs webpack every time. We are using quite a few plugins and so our webpack isn't exactly quick. Wasn't a problem in v2 I think because it packed at the beginning, but it's a lot of overhead to rerun it each time. |
No optimization I tried with the webpack preprocessor made any difference. It also ran quite a bit slower on CI than locally. I'm sure this defeats the purpose of the split in v3, and it certainly makes the dashboard less pretty but.. if I serialize all of the tests in one file like: describe('Integration Tests', function() {
const req = require.context('./', true, /^(.*\.(js$))[^.]*$/i);
req.keys().forEach(function(key) {
req(key);
});
}); ... the tests run at the same rate, maybe faster, but the overall cypress time goes from 18 mins down to under 8 which is faster than it was with 2.1.0. We're shooting for < 10min so I can move forward with this, but realistically it'd be ideal to get all of the tests preprocessed/built in one go and then split for the runner somehow.. |
By default travis comes with Chromium v61 which has some [significant performance issues](cypress-io/cypress#1905 (comment)) with Cypress v3. Users may also not expect that the tests are running in Chromium or understand that chrome is an option. Introducing this would add extra opinion to the example that isn't necessarily needed, but I think not mentioning this in some fashion will lead to headaches that could be avoided. https://docs.travis-ci.com/user/chrome#selecting-a-chrome-version
@brian-mann @jennifer-shehane I can confirm Kudos for fixing that! We can finally upgrade from |
Current behavior:
In v3 we have a few test files that don't yet contain tests. In v2 it wasn't a problem, and most of the time it's fine in v3. But occasionally Cypress will hang on these files. I've only seen this in CI so far.
In the dashboard these runs still say "running" with an increasing duration, even though they're not.
Further these panels aren't super useful as due to our folder structure every panel is labeled "assets/tests/integrati..." I can resize my screen to see a little more, but never the file name.
Otherwise really loving the v3 direction!
Desired behavior:
Shouldn't hang and should produce better errors if they do.
Steps to reproduce:
Unsure other than empty test files and multiple runs
Versions
Cypress 3.0.1
The text was updated successfully, but these errors were encountered: