cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.73k stars 3.16k forks source link

When exiting Cypress process from terminal, shows 'cypress quit unexpectedly' modal #22132

Closed sync-by-unito[bot] closed 11 months ago

sync-by-unito[bot] commented 2 years ago

Current Behavior

For some people, sometimes when quitting Cypress via the terminal, the modal displays saying that Cypress quit unexpectedly. It’s very annoying.

!Screen Shot 2022-05-13 at 11.29.34 AM.png|width=262,height=318!

Desired Behavior

Reproducible Steps

  1. Happens when running the binary and during development. It may be dependent on where you are in the App, running tests.
  2. ctrl+x in the terminal while Cypress is running.

┆Issue is synchronized with this Jira Bug by Unito ┆Attachments: Screen Shot 2022-05-13 at 11.29.34 AM.png ┆author: Jennifer Shehane ┆friendlyId: UNIFY-1761 ┆priority: High ┆sprint: Backlog ┆taskType: Bug

sync-by-unito[bot] commented 2 years ago

➤ Zach Bloomquist commented:

Possibly this is https://github.com/cypress-io/cypress/issues/20101

sync-by-unito[bot] commented 2 years ago

➤ Brian Mann commented:

Yeah we’ve had this come up with 9.x before and it’s always been related to not correctly killing all subprocesses in the binary and from the CLI

sync-by-unito[bot] commented 2 years ago

➤ Tyler Biethman commented:

Could also be related to https://cypress-io.atlassian.net/browse/UNIFY-1816 ( https://cypress-io.atlassian.net/browse/UNIFY-1816|smart-link ), but I didn’t see this prompt at all during my time investigating it.

sync-by-unito[bot] commented 2 years ago

➤ Mark Noonan commented:

I did a review with Tyler of his exploration around this issue, and got Peter’s confirmation ( https://cypressio.slack.com/archives/C02MYBT9Y5S/p1653674423819239?thread_ts=1652455819.218769&cid=C02MYBT9Y5S )that this is not happening in a more recent binary, since he reported seeing it in the final walkthrough.

I think in the short term we should not do anything about this since we can’t reproduce and it appears to be fixed for Peter as well. I’ve linked this issue to https://cypress-io.atlassian.net/browse/UNIFY-1816 ( https://cypress-io.atlassian.net/browse/UNIFY-1816|smart-link ) since the work-in-progress on Tyler’s branch for that seems to address something that could be responsible for this error. That work is not fully tested and ready to merge just yet, and Tyler is about to be on vacation for a week.

Jennifer Shehane Chris Baus I suggest we pull this out of the sprint and let Tyler pick back up when he returns from vacation. I could pull his branch from the other ticket and work on it, but would rather focus on reviewing and merging other outstanding work for release, unless you still feel this is a priority.

sync-by-unito[bot] commented 2 years ago

➤ Jennifer Shehane commented:

Mark Noonan sounds good. Will remove from sprint.

fusionshoes commented 2 years ago

Hey all. Dropping a comment here in case it could be helpful for this issue moving ahead. I'm seeing this crash regularly when closing cypress v10.0.3 (cntl+C or menu), after a test has run. Closing cy just after it opens, or after opening a browser window to show specs (but not running them) does not throw this exception/error. If a spec is ran,and then cy gets closed, it does show this error.

cy1003crashlog cy1003crashlog.txt .

tbiethman commented 2 years ago

It was thought that #22026 would correct this, but it appears that that this is still occurring for some users with the 10.3.1 release.

djstevenson commented 2 years ago

This is occurring for me on 10.3.1 - on most exits. I always run Cypress from the command line, sometimes I quite it via Cmd-Q and sometimes by Ctl-C back in the terminal. Is it worth me posting a crash report?

Apple M1 Max, macOS 12.5, node v16.16.0

hon2a commented 2 years ago

The issue occurs for me every time I quit Cypress, be it using [Ctrl]+c from terminal or [Command]+q from within the app itself.

Cypress version: 10.3.0 MacOS version: 12.3.1

JustineDev commented 2 years ago

Still happening for me when I close Cypress using the X, Ctrl-C, and Command + Q.

Cypress version 10.3.1 MacOS macOS 12.4

cypressCrashLog.txt

tit commented 2 years ago

Still happening for me when I close Cypress using the X, Ctrl-C, and Command + Q.

$ cypress --version                   
Cypress package version: 10.4.0
Cypress binary version: 10.4.0
Electron version: 19.0.8
Bundled Node version: 16.14.2

macOS: 12.5 (21G72)

image

cypress.crash.log.txt

natashaw commented 2 years ago

The test runner crashes with SIGABRT in the same manner as well in my environment, though not quite 100% of the time

Cypress package version: 10.6.0
Cypress binary version: 10.6.0
Electron version: 19.0.8
Bundled Node version: 16.14.2

macOS: 12.5 (21G72)
stclairdaniel commented 1 year ago

Any updates here? This is a minor issue but gets pretty frustrating having to see this multiple times a day.

KyleWMiller commented 1 year ago

Found only one "error" was found in the crash details. This was the code: Error Code: 0x02000148

Found a similar error code with a solution, and it was centered around file permissions. https://us.forums.blizzard.com/en/sc2/t/error-code-0x02000148/12579

Could the process not have permission to clean up?

UPDATE: If you sudo yarn cypress, Ctrl + C does not throw "cypress quit unexpectedly" ....

UPDATE 2.0: This solved my issue. Are these leftover folders from migrating to v10?

UPDATE 3.0: Only solved the issue for one cycle after deleting Cypress folder

richardkmichael commented 1 year ago

Still occurs on Cypress 12.2.0, quitting the GUI with CMD-Q, or CTRL-C in the terminal which launched the GUI. macOS 11.7 on an M1. Would be great if this could be tidied up.

cypress-app-bot commented 1 year ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

Flamenco commented 1 year ago

This seems to have been fixed as of the latest OSX and Cypress releases.

jennifer-shehane commented 11 months ago

Closing as resolved. If you’re facing a similar issue, please open a new issue.