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

CT onboarding hangs waiting for dependency installation #26685

Closed
MikeMcC399 opened this issue May 7, 2023 · 10 comments · Fixed by #26726
Closed

CT onboarding hangs waiting for dependency installation #26685

MikeMcC399 opened this issue May 7, 2023 · 10 comments · Fixed by #26726
Assignees
Labels
CT Issue related to component testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented May 7, 2023

Current behavior

When dependencies have been installed during CT onboarding, the Cypress App continues to wait showing a spinner with the text "Waiting for you to install the dependencies...". It does not exit this condition and requires the Cypress App to be restarted to continue. After restart, the Front-end framework is detected and onboarding continues successfully.

image

Desired behavior

Onboarding should automatically and dynamically check dependency installation as it did up until Cypress 12.7.0.

After choosing a front-end framework during CT onboarding, for instance Next.js, the Cypress App displays a command, such as npm install -D next react react-dom, together with a spinner with the text "Waiting for you to install the dependencies...".

Now if the command to install packages is executed in a separate terminal window, the spinner and text disappear. The message displaying the command to execute disappears and is replaced with a text saying "You've successfully installed all required dependencies"

image

Test code to reproduce

git init
npm init -y
npm install cypress -D -E
npx cypress open

Select Component Testing
Select Next.js, click Next step

In a separate terminal window copy and paste
npm install -D next react react-dom

The Cypress App waits showing a spinner with the text "Waiting for you to install the dependencies...". This does not change even when the dependencies have been installed.

Cypress Version

12.11.0 (and 12.12.0)

Node version

18.16.0

Operating System

Ubuntu 22.04 (also reproducible on Windows 11)

Debug Logs

`cypress:scaffold-config:frameworks` is not detecting the dependencies

Other

Workaround

Kill then restart the Cypress App after installing dev dependencies.

@nagash77 nagash77 added the CT Issue related to component testing label May 8, 2023
@marktnoonan
Copy link
Contributor

Thanks for the report... could not reproduce on Mac, I will try windows next!

Screenshot 2023-05-09 at 4 04 35 PM

@MikeMcC399
Copy link
Contributor Author

@marktnoonan

Your screenshot in #26685 (comment) shows Cypress 12.7.0. You need to be using at least 12.8.0, better still 12.11.0.

@marktnoonan
Copy link
Contributor

My bad @MikeMcC399 it caught my global Cypress install, confirmed. Thanks again, routing to the team.

Screenshot 2023-05-09 at 4 29 54 PM

@marktnoonan marktnoonan added the Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. label May 9, 2023
@marktnoonan
Copy link
Contributor

Confirmed it appears to have been introduced in 12.8.0.

@marktnoonan
Copy link
Contributor

marktnoonan commented May 9, 2023

Possibly related: #26033, #26066 which introduced changes related to detecting dependencies.

Noticed that refreshing the page seems to work, so this is an issue related to state not syncing correctly with GQL, not the "detecting" logic itself. A similar issue was noticed before and addressed in #26437. I wonder if we need a similar Subscription added to https://github.com/cypress-io/cypress/blob/develop/packages/launchpad/src/setup/InstallDependencies.vue.

Loom showing the problem and how refreshing fixes it:

https://www.loom.com/share/3da252d62a5c4a9fb794edd4fd9d8374

@marktnoonan marktnoonan removed their assignment May 9, 2023
@lmiller1990
Copy link
Contributor

lmiller1990 commented May 11, 2023

I suspect

I will take a closer look.

Ok, 189cd92 is the culprit. I will see why.

@lmiller1990
Copy link
Contributor

lmiller1990 commented May 11, 2023

I fixed it in #26726

Noticed that refreshing the page seems to work, so this is an issue related to state not syncing correctly with GQL

I wasn't able to reproduce this - I refreshed the page, but the dependency was not updated. I found it was related to a caching issue. I wonder if there is another unrelated issue.

@lmiller1990 lmiller1990 self-assigned this May 11, 2023
@MikeMcC399
Copy link
Contributor Author

Confirmed still an issue with Cypress 12.12.0 (I didn't expect otherwise).

None of the following changed the condition:

  • F5
  • Ctrl+F5
  • Ctrl+R

Looking forward now to seeing the rollout of

@lmiller1990
Copy link
Contributor

Yep, it'll be broken in 12.12.0 too - the fix will be in the next release, just need a few reviews on #26726 . This should be in 2 weeks, unless we do a patch release earlier.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 23, 2023

Released in 12.13.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.13.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CT Issue related to component testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants