-
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 v3.3.0 hangs #4247
Comments
Hey @kweiberth, could you provide details about your CI server? Also, if you could, please try to run the tests using We will definitely need more information here as the information given is not helpful in isolating the problem unfortunately. |
I had the same issue today. The whole cypress window hangs e.g. the timer stops. For me I fixed it by rearranging my test that caused cypress to hang and it seem to work fine... |
Same here. If I run it locally the iframe that displays the UI in the middle is completely frozen.
The UI won't stuck if I ran the test in Chrome. Here is the log:
|
I see a bunch of these errors throughout my tests:
Interestingly, like @randing89 mentions, this has to do with an iframe, specifically a YouTube iframe. My test suite suite consistently hangs at the start of the fourth Also, during this first describe block, the Cypress UI "hangs" in that the tests pass and the test runner moves on, but the UI would suggest it's still stuck on the first test: All of this is happening with Electron 61. Everything runs smoothly with Chrome 74. Last, this is happening not only on CI like my original post suggested, but locally too. I've updated my original post to remove references to my CI server. |
@kweiberth I am able to reproduce this console.error index.html <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cypress.io YouTube</title>
</head>
<body>
<iframe width="560" height="315" src="https://www.youtube.com/embed/dr10Z-HpsCQ" frameborder="0"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</body>
</html test.js describe('youtube', () => {
beforeEach(() => {
cy.visit('index.html')
})
it('test', () => {
expect(true).to.eq(true)
})
}) Open the DevTools console to see the console errors: On initial thought, I thought it had something to do with Chrome's Autoplay policy changes that maybe some of it took effect in Chromium 61, but I don't know why these errors would then disappear when running the tests in Chrome 74. Plus it doesn't look like much of this was implemented for Chromium 61. Am going to do some more research. |
Also, I'm not sure if the issue @kweiberth described is the same 'hanging' issue everyone else is having. Can anyone confirm if they are using video embedded in iframes? If not, we should probably move these autoplay problems to a new issue. |
My tests are also hanging in CI, but I'm not using video or iframes. |
Same problem here. that xhr request is requested (with slightly different variables) multiple times in all tests. |
Same problem. Failed at Electron 61 but work well with Chrome. I don't have either video embedded or iframes. After trying these steps, it's now working for me.
|
We'll need something we can run to reproduce the hanging issue. Can't debug this without that. |
My case has been the opposite - Chrome will sometimes hang whereas Electron never seems to. I've had this happen on 3.1.0, 3.2.0 and 3.3.1. I don't have a reproducible example I can share at the moment other than my DEBUG logs, which I would rather share privately. @jennifer-shehane if you think those could help let me know and please advise how I could share them. |
@jennifer-shehane What additional information would be helpful here? We have the same issue when running on Linux (Ubuntu) containers but the same code works fine on Mac. |
Hello everyone. I've been seeing this issue for a while now (originally reported it in Aug '18 #2377) and haven't been lucky to figure it out. Though yesterday I found out that when video encoding seems to hang it's in fact due to browser not being killed properly. Just after test finishes I see following in debug:
followed by request to tracking scripts that are fired on "unload" event from JS. And what I've noticed is, that when the request is fired (browser is not killed fast enough?) in video it looks like that:
When the request isn't fired (and only then) I receive Edit: I've just figured out a PoC to behaviour I've described, which is also consistent with problem I have on my page:
<html>
<head>
<script>
window.onbeforeunload = function (e) {
e = e || window.event;
if (e) {
e.returnValue = 'Sure?';
}
return 'Sure?';
};
</script>
</head>
<body>
<div id="test">test</div>
</body>
</html>
describe('poc', function () {
it('should hang | @olxpl @olxua @olxkz @olxbg @olxpt', function() {
cy.visit('/index.html');
cy.get('#test').should('exist');
});
}); Can't believe I didn't notice that earlier but we do, in fact, have a prompt before closing the window on last page the test is visiting. Here's a video https://www.youtube.com/watch?v=2GjGaJI93Ow that's being recorded. @jennifer-shehane please have a look |
Something similar to the above is happening for me as well. When I run with 3.2.0, everything is working as it should. Seems unrelated to When running 3.3.2, the left side of my screen (with all the steps and assertions) eventually stops working, even though the test is continuing in the browser side of the screen. After the test completes (and passes), further tests are not run anymore. |
Not sure if this helps anyone: We also run into issues with hanging builds. |
@tkociemba-olx Your issue is a known issue here: #2118 |
Thanks Jenny
On Thu, 18 Jul 2019 at 2:13 pm, Jennifer Shehane ***@***.***> wrote:
@tkociemba-olx <https://github.com/tkociemba-olx> This issue is a known
issue here: #2118 <#2118>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4247?email_source=notifications&email_token=AFRBXUFO7PG7YHWTTFGSINLQAACXRA5CNFSM4HN5WJEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2HN3TQ#issuecomment-512679374>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFRBXUHC7A6UMQYAMOIEXYDQAACXRANCNFSM4HN5WJEA>
.
--
Regards,
David
|
This happens in my docker container on 3.4 as well... is there any update on a workaround or fix? |
We chewed through like 3 hours of build minutes in my CI server because of this before anyone realized :( Running in the local macos gui, everything works fine, but running: |
same problem happen on CentOS7. run e2e test by vue-cli-service script "test:e2e:headless": "vue-cli-service test:e2e -- --headless" |
The original issue of seeing this warning in the console has been fixed since Cypress 3.5.0 when we updated Electron as part of #4720
Closing as resolved. |
Current behavior:
After upgrading to Cypress v3.3.0, I'm experiencing hanging tests, similar to the ones described in #1235 and #1333. The DEBUG=cypress:* logs continuously show the following logs once it hangs:
Desired behavior:
Tests shouldn't hang and all tests should pass. Desired behavior is restored when I revert to Cypress v3.2.0
Steps to reproduce: (app code and test code)
Unfortunately I don't have a chance right now to try and set up a reproducible example. However, v3.3.0 consistently hangs, and v3.2.0 consistently passes.
Versions
Cypress: 3.3.0
Browser: Electron 61
The text was updated successfully, but these errors were encountered: