-
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
Network delay in 13.3.1 running lighthouse in cypress #28113
Comments
Hey @metalix2, we're investigating. I'm pretty sure this is due to this change because we saw this situation in other cases and did the 13.3.2 patch release to address some of those in this PR. It seems like you have another case outside of that. Thanks for the repo! It helps a ton. |
Hey @metalix2, we have identified the issue, it was related to the work I mentioned. It also has to do with the lighthouse calls occurring in another tab. Historically we haven’t handled traffic from other tabs so great. Coincidentally enough though, we’ve been doing other work to address multiple tabs traffic, so it does look like this future PR fixes this issue: #27954 we hope this will go out in a release in ~2weeks. In the meantime I would suggest downgrading to 13.3.0. |
This is great news! Thanks for the investigation. I look forward to seeing how #27954 progresses! We'll stick to 13.3.0 in the meantime. Thank you! |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
Since Cypress 13.3.1 we have noticed another delay in the network layer when using the cypress browser for running lighthouse against. This isn't the first time this has happened - Related issue #17327 saw the same impact where the network request time was a minimum of 0.5 seconds to fetch any resource. Now as of 13.3.1 the minimum fetch time has jumped to massive 2.0 seconds! This renders our lighthouse tests redundant as they are not comparable to just a normal lighthouse test. For example the project we test against is a simlpe CreateReactApp with a simple data fetch that is intercepted. When testing outside of Cypress our score is 99. As of 13.3.1 the score has dropped to 56 due to these network latencies.
Desired behavior
Lighthouse Tests ran against a cypress browser using a devPort should not be subject to network penalities set by the Cypress browser.
Test code to reproduce
Code to repoduce
The reproducible tests in the repo below run a basic create react app which gets a lighthouse score of 56 our of 100. It should be 99/100.
Reproducible repo - https://github.com/metalix2/cypress-lighthouse-slow
Setup instructions in readme.
Some observations. On the cypress window with the UI. the Page loads as expected. It's just when its loaded in a different tab it seems to be very slooooooooooow.
See screenshots below.
(Last few assets are of the page being tested the size strangely don't align with the other tab's network resources.)Loading assets taking 2000ms 👎
Before 13.3.1
I have videos and Cypress recordings available please do not hesitate to ask. I'd love to see this resolved once and for all.
Cypress Version
13.3.2
Node version
v18.18.1
Operating System
macOS 13.5.2
Debug Logs
Other
From the original investigation in #17327 I created a diff in one of my comments perhaps someone more familiar with the cypress core will understand better.
The text was updated successfully, but these errors were encountered: