-
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
Weird flicker in video for end to end test on updating to v10.10.0 #24377
Comments
Hi @lidiagc 👋 , thanks for logging this issue.
Yes, it does look like that though I can't think of anything that would cause this type of behavior. Does this happen on all browsers or just Chrome? If you run just a single spec does it happen? Does it also happen in Cypress 10.0.3? |
Hi @mschile, thank you for replying! We have in total 4 jobs that run our end-to-end tests:
First, I tested with version
Our tests are not prepared to run with Firefox, so they all failed but not because of the flicker. Then, I downgraded to version It's good to know that there is a version of Cypress 10 that doesn't have this issue; however, we wouldn't want to upgrade to this version because of the relative path issue that was fixed in version Let me know if there are other scenarios you want me to test! |
Thanks for the update @lidiagc! I would love to narrow in on which Cypress version caused the regression. My initial guess is Cypress 10.8.0 may have broke it. Would you be able to try 10.7.0 and 10.8.0? |
I tried versions |
@lidiagc, thanks for determining which version caused the regression. Unfortunately, I haven't been able to reproduce the flickering. I know you aren't able to provide a link to your private repository, but are you able to recreate the issue in a public one or possibly using the cypress-test-tiny project? |
Hi @lidiagc. We have a theory about things that might be causing video oddities. I created a 10.9 custom binary with some code tweaks to test out that theory. Can you try this binary to see if it works?
|
Hi @ryanthemanuel, thank you for looking into this. I installed the custom binary and ran the end-to-end tests on GitLab. The flicker still happens and it seems way more frequent than before. We have recently upgraded to version |
@lidiagc, given that you're seeing this less frequently on 11.0.1 would you be ok with us closing this issue? |
Hi @mjhenkes |
Hi @chasemgray , can you please open a new issue with your specific problem and a reproducible example? |
Hi, just wanted to update here that we are still experiencing what @chasemgray described in Cypress 12.1.0. We occasionally get failed tests in the CI with the video showing the same flickering behavior first described in #24377 (comment). |
We have an open internal ticket with cypress support (10338) just in case the team wants to reference it there. |
This issue also appears to be related to this problem #22825 Looking back through our logs it appears this issue has existed for a very long time in Cypress if Cypress fails to launch or terminate a browser. We have old runs that I looked back at and found the same symptoms. It got much worse on some minor version of 10.X.X. Here is a screenshot of where it fails to detect that chrome launched |
One big change I can see here is the change from Bluebird.join to Bluebird.all Bluebird.join last argument is supposed to be a function to call, and Bluebird.all is expecting an array of promises. It seems like this would significantly affect waiting properly for browser launch if this wasn't an intended change (which I'm assuming since the pull request was converting code to typescript)http://bluebirdjs.com/docs/api/promise.join.html Maybe I'm completely off. I was just looking at the code history to see what could have changed this to make it so much worse. |
@chrisbreiding @nagash77 any update on the issue? |
Hi @chasemgray , no update just yet. @chrisbreiding is hard at work diving in. |
@chasemgray Thanks for investigating this and I think you may be onto something, but unfortunately I don't think that exact change is what's causing the issue. The change from From the Bluebird.join doc:
Bluebird checks if the last argument is a function (as opposed to a promise) and uses the documented behavior. In the case of the code in question, both functions return a promise, so Bluebird uses the old semantics. I do think it's the originally intended behavior that we race the two promises of connecting to the socket and launching the browser before moving on, but that's not to say there isn't a bug or race condition there. The browser launching process is fairly complex, so there's a lot of potential for something to go wrong. I think it's a good area to poke at to determine the cause for this issue, so I'm digging into it more and will hopefully come up with the root of the problem. |
@chrisbreiding It seems like there are two issues:
|
@chasemgray @lidiagc do we have a definite way to reproduce this issue or get into this state where we can see the flickering? |
Significantly slow down the chrome launch seems to be the most common cause we see. Otherwise it might launch in time for the cypress logic to detect it. Isn't there a way for cypress to just fail when it detects messages coming in on multiple ports? |
Also, if you want to look at this over zoom I can walk you through a lot of the debug details that showed us this was due to chrome launching twice. |
@lidiagc and @chasemgray, I was able to reproduce the video flicker locally with cypress_api.cy.js.mp4
Yes, that is probably possible though my guess is the root cause is higher up and we'll want to figure out why the browser is not closing as expected in the first place. |
#25898 should fix this issue by preventing more than one browser from being connected at a time. It will be out with the next release, but if you'd like to check it out ahead of time, I'd recommend trying out the prerelease build for the latest commit on the develop branch. Thanks again, @chasemgray, for digging into this. Recognizing that multiple browsers were being connected helped pinpoint the root cause of the issue. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
We were previously using cypress version
9.7.0
and now want to update to version10.10.0
. However, we sometimes get an issue with the end-to-end tests when running on GitLab CI.As you can see from the video, a weird flicker happens during the test and it eventually fails. Does it seem that the test is jumping up and down the commands as it was running two instances of the test? The video is only showing the start of the test and is pixelated since this is a private project.
weird-video-e2e.mp4
We haven't been able to reproduce this behavior locally, and it doesn't constantly happen on the CI. It is also not specific to this test, sometimes the other end-to-end tests fail occasionally and the videos have the same weird flicker. These tests didn't have this issue before upgrading cypress version.
Desired behavior
We would like to be able to update cypress to version 10, but this issue is delaying the update since we cannot rely on the end-to-end tests for our CI.
Test code to reproduce
We can't provide the full test code since this is a private project.
cypress.config.ts
cypress-dockerfile
gitlab-ci.yml
Cypress Version
10.10.0
Node version
v16.14.2
Operating System
cypress/included:10.10.0
Debug Logs
No response
Other
Which debug logs would be more relevant for this?
DEBUG=cypress:*
has too many logs, so the GitLab job exceeds the maximum logs saved before the test finishes.The text was updated successfully, but these errors were encountered: