-
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
Yarn Modern (3) using default pnp hangs at Initializing config... #26676
Comments
I tried your steps here and a few others and was able to reproduce this. But interestingly its only under one condition: you install cypress locally then run yarn dlx. Likely theres something conflicting in yarn when you have cypress installed in the project locally but try to run dlx which like npx will download and run a different copy of cypress than the one installed in the repo. If I don't install cypress and just use yarn dlx or I install and use the installed copy, I don't get the infinite spinner. Not sure if this is helpful or not, but might help someone follow a lead to what might be the issue. These commands work (or at least get you to the bluebird error from #26567): mkdir cy-yarn-pnp
cd cy-yarn-pnp
yarn init -2 # shortcut to init a yarn app with berry by default
yarn dlx cypress open # download and run cypress, no cypress installed locally mkdir cy-yarn-pnp
cd cy-yarn-pnp
yarn init -2 # shortcut to init a yarn app with berry by default
yarn add -D cypress
yarn cypress open # run the locally installed cypress And like you posted, this one doesn't work: mkdir cy-yarn-pnp
cd cy-yarn-pnp
yarn init -2 # shortcut to init a yarn app with berry by default
yarn add -D cypress
yarn dlx cypress open # download and run a different cypress than the one in the package |
Thanks for pointing out that Is there some other way in Yarn PnP to start exactly the version of Cypress which has been install by |
Yeah, running |
Thank you! I've taken |
@MikeMcC399 Are you still seeing the error when running The only way I'm able to reproduce this specific bug is the combination of |
I can reproduce on Ubuntu 22.04 and Windows 11 with exactly mkdir cy-yarn-pnp
cd cy-yarn-pnp
npm install yarn@latest -g
yarn init -y
yarn set version berry # finds and installs 3.5.1
yarn add cypress@latest -D -E
yarn cypress open then
and on both operating systems I get the Cypress rotating spinner. It only hangs up the first time it is opened when immediately previously the config onboarding has been carried out. |
@MikeMcC399 Interesting. Well then, guess it's not just mismatched cypress versions. 🤷♂️ |
This is a regression from Cypress 12.9.0, so the workaround would be to revert to Cypress If Cypress has already been successfully set up using version
The |
The hang is also reproducible on Cypress On subsequent starts of |
Thanks for reporting and looking into this. I was able to reproduce it as well. I'll forward it to the appropriate team. They'll evaluate the priority of this ticket and consider their capacity to pick it up. Please note that this does not guarantee that this issue will be resolved. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
After installing Cypress with Yarn Modern (3.5.1) using the default Yarn Plug'n'Play the first start of
cypress open
hangs at "Initializing config..." after selecting E2E Testing.Edit: The issue also affects Component Testing. I have however only given repro steps for the simpler case of E2E Testing.
Desired behavior
If the app finds configuration errors it should not hang. Instead it should output an error message.
After opening the Cypress app for the first time, it should provide default configuration parameters and allow selection of example tests.
Test code to reproduce
Execute the following in a
bash
terminal window:Select E2E Testing
Click Continue (to accept addition of
cypress.config.js
,cypress/support/e2e.js
,cypress/support/commands.js
andcypress/fixtures/example.json
)Note that
.yarnrc.yml
contains only:Cypress Version
12.11.0
This issue is a regression from Cypress 12.9.0.
Node version
18.16.0
Operating System
Ubuntu 22.04
Debug Logs
Debug logs go into an endless loop including
Other
Workaround
Revert to Cypress 12.9.0.
The text was updated successfully, but these errors were encountered: