-
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 Test Failures Running Headless Chrome 121 Or Greater #29036
Comments
@samdevaprasadvarde We've been tracking this issue here: #5016 We recently got a way to reproduce this, so are actively working on a fix for one root cause we've identified. What we've found in that case is that there is something in the test that causes the tab to be unfocused (clicking to open a new tab or clicking something that causes an alert to pop up). When the tab is no longer focused, the screenshot will timeout. The fact that something between Chrome 120 and 121 could have affected this is not completely suprising, but I haven't seen someone note this before. Does your test at some point call focus away from the tab in some way? |
Thanks Jennifer for the quick response! When you say
Thanks Jennifer for the quick response! There is a shift in focus with this test as we open up different dialog boxes and filter dropdowns, but don't switch tabs within our page. Does that answer your question? |
Maybe it's related. We'll be getting a fix out for the other issue in our next release so will see if that solves your situation also. |
Can you confirm if your issue is resolved in the latest cypress version |
Confirmed working on latest cypress version. Thank you! |
Current behavior
Ever since chrome upgraded to v121 we see the first test file fail and produce this error:
Note:
We have a few test files. It's always the first test file that fails even if we switch the order of which test file gets executed.
Other tests:
Fails for browser
edge
, but works on browserelectron
. Here’s the script we runcypress run –browser chrome –config video=false –config-file cypress/config/config.dev.js
Desired behavior
I tested and downloaded an older version of chrome v120 from here: https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Win/1217371/
Run it like this
cypress run –browser C:/Users/x/dev/projects/chrome-win/chrome.exe:chrome –config video=false –config-file cypress/config/config.dev.js
Basically following this guide: https://docs.cypress.io/guides/guides/launching-browsers and there are no issues.
Test code to reproduce
We are running our tests on our dev/qa/prod sites that are not eternally facing and authenticate with Azure like this:
So linking code for you to run may not work. Here's a sample test in the first test file that is failing:
Cypress Version
13.6.6
Node version
18.17.1
Operating System
Microsoft Windows 11 Enterprise (10.0.22631)
Debug Logs
Other
Running cypress desktop app (cypress open –config-file cypress/config/config.dev.js) and selecting chrome 121 works. All the tests pass for all tests.
The text was updated successfully, but these errors were encountered: