Skip to content
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

Component specs sometimes don't live reload #25438

Closed
marktnoonan opened this issue Jan 12, 2023 · 5 comments
Closed

Component specs sometimes don't live reload #25438

marktnoonan opened this issue Jan 12, 2023 · 5 comments
Assignees
Labels
CT Issue related to component testing

Comments

@marktnoonan
Copy link
Contributor

Current behavior

So far I can only reproduce when running open with flags, like this:

npx cypress open --component --browser chrome

I was able to get this to happen in both 12.2.0 and 12.3.0, haven’t tested others.

If I do an open with no flags and click through the Launchpad UI to start component testing, reloading is fine, I’m not able to reproduce this.

Loom video demonstrating opening with/without flags.

As can be seen in the video, the recompilation happens as usual, it just never hits the browser. The is reminiscent of a similar bug that was previously traced down to a race condition at startup caused by dependencies in the v8 snapshot not being deferred properly (or something like that). Different behavior when opening with flags seems to suggest some sort of race condition also.

Likely we can narrow it down following the troubleshooting guidelines here: https://github.com/cypress-io/cypress/blob/develop/CONTRIBUTING.md#troubleshooting

Desired behavior

Cypress should always correctly live reload component specs after changes are saved in the test file or the component itself.

Test code to reproduce

I am testing in this Vue 3/Vite app on this branch.

Cypress Version

12.2.0, 12.3.0

Node version

16.18.0

Operating System

mac os monterey 12.6

Debug Logs

No response

Other

No response

@astone123
Copy link
Contributor

I haven't been able to reproduce this yet. I tested using the branch that you linked in the description and I opened Cypress using the flags. This might point to it being a race condition like you said @marktnoonan

@astone123 astone123 added the CT Issue related to component testing label Jan 17, 2023
@astone123 astone123 assigned ZachJW34 and unassigned astone123 Jan 17, 2023
@ZachJW34 ZachJW34 removed their assignment Jan 17, 2023
@marktnoonan marktnoonan self-assigned this Jan 18, 2023
@marktnoonan
Copy link
Contributor Author

Investigating this, so far I have been able to reproduce consistently in every release since 11.0.0 (including 11.0.0). I can only reproduce it when opening with flags. v10.11.0 works fine with flags, consistently, in the same conditions where other things fail.

This must have overlapped with the other live reloading bug from 11.0.0, since it is present both before and after the fixes made in #24630.

Conclusion so far is only that this was introduced at the same time as v8 snapshots and the GA of component testing.

Next I'm going to work from develop and see what circumstances allow it to be reproduced there.

@marktnoonan
Copy link
Contributor Author

Frustratingly I could not reproduce this again, after being able to consistently reproduce easily for several days. So I have not been able to do any of the troubleshooting guide in the monorepo. Cypress 12.3.0 works perfectly for me now, even with CPU under heavy heavy load.

I'm going to move this to blocked and will plan to pick up the troublshooting if I see this again in the wild.

The comments in #25477 about firefox make that issue seem like it is probably unrelated.

@marktnoonan
Copy link
Contributor Author

Just a documenting that @astone123 saw this as well yesterday, at least once.

@lmiller1990
Copy link
Contributor

I think we should close this - no update or reproduction, no work to be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CT Issue related to component testing
Projects
None yet
Development

No branches or pull requests

4 participants