cypress-io / cypress

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

Tests in CI Github Actions and headless mode using npx cypress run will hang / time out in version 12.17.2 #27405

Closed adrian-maciuc closed 1 year ago

adrian-maciuc commented 1 year ago

Current behavior

I have notice that my tests will all time out when they run in github actions CI and I couldn't find a way to see any sort of error. The only thing that would happen was after a couple of hours they would just time out. I would check the CI and see that they would stop at different tests but with no error

example. In the picture below each of the 4 parallel runs have the same behaviour as seen below. A random test, with failed message (but these test pass and work if I open locally with npx cypress open)

Screenshot 2023-07-27 at 10 40 51

If I try to run them locally with npx cypress run I would either have them hang with Attempt 1 Failed, or with Test Failed

Those that are skipped I would see that they are skipped. So even if I skip some tests, to see maybe a test is the problem, the next one in line would have the same behaviour, just the message that it failed but with no further info.

If I downgrade to 12.17.1 this problem goes away and we are back to normal.

Desired behavior

Able to upgrade to latest and use CI

Test code to reproduce

.

Cypress Version

12.17.2

Node version

16.17.1

Operating System

latest-ubuntu

Debug Logs

No response

Other

No response

MikeMcC399 commented 1 year ago

@adrian-maciuc

MikeMcC399 commented 1 year ago

@adrian-maciuc

Since your log shows videos, this may be a hardware capacity issue.

Your options (see https://docs.cypress.io/guides/references/configuration#Videos):

nagash77 commented 1 year ago

@adrian-maciuc In order to give our engineers the best chance at recreating your problem, please create a reproducible example using a fork of Cypress Test Tiny. This gives us the best chance of seeing exactly what you are seeing and being able to investigate effectively.

marek-siemieniuk-morawski commented 1 year ago

Hi,

We experienced the same issue. The problem does not occur every time but after upgrading Cypress to the latest version, the jobs in Bitbucket Pipelines started hanging. After contacting the Bitbucket Support team, we checked if there is no memory leaks and there is not - the memory usage does not reach the maximum memory limit. What we observed though is that Cypress Cloud acknowledge that all the tests passed but the pipeline is still ongoing. After the very last test is executed, Cypress-related processes are still running on the remote machine.

The issue stopped when we downgraded Cypress back to the original version of 12.10.0.

Sadly, I can't share any reproducible example as it's a private project. If you need any details, please let me know.

adrian-maciuc commented 1 year ago

Upgraded to v13.0.0. this got fixed for me. Sorry I couldn't provide more details, the project does not allow me to disclose.