Open lmiller1990 opened 1 year ago
@lmiller, I had a very similar issue, so let me start by asking, are you by chance using pnpm?
I am, and it turns out that the thing causing my Cypress startup to hang was Cypress checking git for the latest changes to my test files.
That check was taking 4 minutes, and it was because in CircleCI, I was caching my pnpm store in my project workspace without gitignoring it. So when that git check was happening, it was inspecting LOTS more files than it thought it would need to.
After adding .pnpm-store
to .gitignore
, the startup delay was completely fixed.
My next step after that, FWIW, was to pull my .pnpm-store
into the my project's parent dir, so git
wouldn't try to track it at all.
That was it!! Amazing thanks @jrnail23 . How did you found out that was the problem?
@RobbeCl mostly grinding through lots of verbose cypress logs (DEBUG=cypress-verbose:*
and DEBUG=cypress:*
). I ran through the debug timings and among the innocuous +32ms
and +1s
values, a couple of +4m
timings started showing up.
From the +4m
entries I was able to rule out issues with Firefox loading, then I started seeing stuff involving git, and I dug into the Cypress source code.
Not gonna lie, that was a tough one to figure out though. I had lots of other extraneous factors to rule out leading up to that point.
Hello! We're having a kind-of-similar problem with cypress open hanging for a while at startup (see https://github.com/cypress-io/cypress/issues/29171). We're not using pnpm so it's probably not related, but you mentioned that at some point the issue occurred on your colleague's computer and not on yours. That's the case for our problem too. Have you been able to figure out what caused this difference by any chance?
Discussed in https://github.com/cypress-io/cypress/discussions/26901