Closed angiedaley closed 11 months ago
I am having a similar issue that appears to have started yesterday where our CI/CD freezes when trying to upload results to Cypress Cloud. It's not happening on every spec but appears to be happening after the same spec. The spec nor config has changed recently. Seems odd that this started happening with the release of 13 which leads me to believe it's a bug with Cloud.
FWIW, We're on version 10 still and have never had this issue until yesterday.
@cfuller1985 @angiedaley Could you run Cypress in debug mode mode and print the entire set of logs here (extracting any private info)?
same. our cypress job has a timeout of 2 hours in Jenkins and when upgrading to 13 we are actually hitting this timeout, which never happened before.
will try to collect some debug logs
This is also happening to our team. I will try to get some logs. (Edit, didn't realize @funkadelic is also on our team π , will coordinate on getting those logs)
are any of your tests using selectFile
? I have also had some hanging specifically when trying to upload video files > 200mbs. One of the errors from the logs I got was a FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
Hi folks, we did make a change to make certain errors non-fatal in 13.1.0 which may help in some situations. Can folks please try upgrading to the latest version and see if that helps at all.
I am also seeing this with 13.0.0
and 13.1.0
. It seems to happen after certain tests, but also happens at inconsistent points in the test run, seems to crash before/while uploading the Test Replay, with DEBUG=cypress:server:*,cypress:https-proxy
I am seeing the expected onMocha
events:
cypress:server:project onMocha end +1ms
cypress:server:reporter got mocha event 'end' with args: [ undefined ] +1ms
1 passing (8s)
cypress:server:run received project end +11s
cypress:server:run received videoController { videoController: undefined } +0ms
cypress:server:run spec results: { error: null, reporter: 'spec', reporterStats: { suites: 0, tests: 1, passes: 1, pending: 0, failures: 0, start: 2023-09-01T15:02:59.932Z, end: 2023-09-01T15:03:08.138Z, duration: 8206 }, screenshots: [], spec: { absolute: '<filepath>/addToBag.test.ts', fileExtension: '.ts', fileName: 'addToBag', name: 'addToBag.test.ts', relative: '<filepath>/addToBag.test.ts' }, stats: { duration: 8211, endedAt: 2023-09-01T15:03:08.136Z, failures: 0, passes: 1, pending: 0, skipped: 0, startedAt: 2023-09-01T15:02:59.925Z, suites: 0, tests: 1 }, tests: [ { attempts: [Array], displayError: null, duration: 7263, state: 'passed', title: [Array] } ], video: null } +0ms
cypress:server:run execute after:spec +0ms
And then I get this seemingly infinitely:
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51198 } +616ms
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51519 } +5ms
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51448 } +90ms
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51529 } +3s
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51540 } +1s
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51537 } +0ms
cypress:server:util:process_profiler current & mean memory and CPU usage by process group:
cypress:server:util:process_profiler βββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββββββ¬βββββββββββ¬βββββββββββββββ¬ββββββββββββββ
cypress:server:util:process_profiler β (index) β group β processCount β pids β cpuPercent β meanCpuPercent β memRssMb β meanMemRssMb β maxMemRssMb β
cypress:server:util:process_profiler βββββββββββΌββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌβββββββββββββΌβββββββββββββββββΌβββββββββββΌβββββββββββββββΌββββββββββββββ€
cypress:server:util:process_profiler β 0 β 'Chrome' β 5 β '92794, 92803, 92811, 92805, 92806' β 16.5 β 69.45 β 768.86 β 685.05 β 768.86 β
cypress:server:util:process_profiler β 1 β 'cypress' β 1 β '91097' β 2.6 β 26.03 β 369.88 β 322.07 β 369.88 β
cypress:server:util:process_profiler β 2 β 'plugin' β 1 β '91120' β 0 β 23.8 β 225.86 β 292.57 β 359.28 β
cypress:server:util:process_profiler β 3 β 'electron-shared' β 2 β '91099, 91470' β 0.7 β 0.45 β 55.61 β 55.38 β 55.61 β
cypress:server:util:process_profiler β 4 β 'other' β 1 β '92834' β 0 β 0 β 1.89 β 1.83 β 1.89 β
cypress:server:util:process_profiler β 5 β 'TOTAL' β 10 β '-' β 19.8 β 88.5 β 1422.09 β 1012.57 β 1422.09 β
cypress:server:util:process_profiler βββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββββββ΄βββββββββββ΄βββββββββββββββ΄ββββββββββββββ +10s
@nagash77 still experiencing the same issues.
I figured out that for my case, that it has something relates to test isolation. My original tests were written with testIsolation disabled, and it takes 30+ minutes after test finish to let Cypress finish background processing and upload the test replay. Then I re-write my tests with testIsolation enabled, it finishes test replay processing immediately.
Also experiencing this after updating to Cypress 13. Rolling back.
Experiencing the same issue
I tried debugging it by running in a headed mode and I noticed, that my app redirects the whole page including the cypress runner and hangs then
Issue similar to: https://github.com/cypress-io/cypress/issues/23751
My team has been experiencing this as well with cypress 13.0.0 and now 13.1.0. Running it with our current settings with testIsolation: false
, all of our parallelization runners will hang up. Sometimes 1 or 2 runners will last for a couple spec files, but then it will hang up. It will show the tests that passed in that spec file (3 tests passed βοΈ ), but it wont post/show the results in the table and appears hung up.
After reading this I ran it with testIsolation:true
I was able to run all but 1 spec file that hung up.
Adding my info to add more data points:
Test code to reproduce
Code works when running in Desktop. Hangs between tests and stops running. No errors reported.
in my cypress.config.ts
file I have testIsolation: false,
in my .yml file I have this content (leaving out some private .env materials)
jobs:
cypress_run:
name: π§ͺ Cypress
environment: Preview
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
# run 5 copies of the current job in parallel
containers: [1, 2, 3, 4, 5]
steps:
- uses: actions/setup-node@v3
with:
node-version: 20.5.0
- name: Checkout
uses: actions/checkout@v3
- name: Sleep for 10 seconds
run: Start-Sleep -s 10
shell: powershell
- name: Cypress run
uses: cypress-io/github-action@v6
env:
Cypress Mode cypress run
Cypress Version 13.0.0 and 13.1.0
Browser Version default Electron browser
Node version v20.5.0
Operating System windows-latest
Memory Debug Logs
When running with testIsolation:true
cypress:protocol:capture:CSSManager Stylesheet changed but not tracked, not capturing +796ms
cypress:protocol:capture:wi Insertion attempt for network:request-will-be-sent +1ms
cypress:protocol:capture:wi Inserting network:request-will-be-sent into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:request-served-from-cache +1ms
cypress:protocol:capture:wi Inserting network:request-served-from-cache into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:response-received +0ms
cypress:protocol:capture:wi Inserting network:response-received into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:loading-finished +5ms
cypress:protocol:capture:wi Inserting network:loading-finished into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:NetworkManager Network.loadingFinished {
cypress:protocol:capture:NetworkManager request: {
cypress:protocol:capture:NetworkManager requestInformation: {
cypress:protocol:capture:NetworkManager requestId: '4864.13749',
cypress:protocol:capture:NetworkManager requestURLs: [Array],
cypress:protocol:capture:NetworkManager type: 'Font',
cypress:protocol:capture:NetworkManager requestWillBeSentTimestamp: 451.535366,
cypress:protocol:capture:NetworkManager requestWillBeSentWallTime: 1693944784045.773,
cypress:protocol:capture:NetworkManager isCached: true
cypress:protocol:capture:NetworkManager },
cypress:protocol:capture:NetworkManager responseInformation: { mimeType: 'font/woff2', type: 'Font' },
When running with testIsolation:false
the logs end at different times, but most commonly they freeze like the following. At the bottom of these logs I took out the hash numbers and put in *** because my team was not sure if that was a unique identifier or not:
cypress:protocol:capture:wi Insertion attempt for network:response-received +1ms
cypress:protocol:capture:wi Inserting network:response-received into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:loading-finished +1ms
cypress:protocol:capture:wi Inserting network:loading-finished into events table with runnableId undefined, attempt undefined +1ms
cypress:protocol:capture:NetworkManager Network.loadingFinished {
cypress:protocol:capture:NetworkManager request: {
cypress:protocol:capture:NetworkManager requestInformation: {
cypress:protocol:capture:NetworkManager requestId: '2768.11780',
cypress:protocol:capture:NetworkManager requestURLs: [Array],
cypress:protocol:capture:NetworkManager type: 'Font',
cypress:protocol:capture:NetworkManager requestWillBeSentTimestamp: 872.590465,
cypress:protocol:capture:NetworkManager requestWillBeSentWallTime: 1693938543412.073,
cypress:protocol:capture:NetworkManager isCached: true
cypress:protocol:capture:NetworkManager },
cypress:protocol:capture:NetworkManager responseInformation: { mimeType: 'font/woff2', type: 'Font' },
cypress:protocol:capture:NetworkManager responseFinishedInformation: {
cypress:protocol:capture:NetworkManager loadingFinishedTimestamp: 872.590524,
cypress:protocol:capture:NetworkManager runnableId: 'r3',
cypress:protocol:capture:NetworkManager attempt: 1
cypress:protocol:capture:NetworkManager }
cypress:protocol:capture:NetworkManager }
cypress:protocol:capture:NetworkManager } +4ms
cypress:protocol:capture:DOMManager DOM.childNodeRemoved { parentNodeId: 1811, nodeId: 1853 } +32ms
cypress:protocol:capture:Fn Insertion attempt for dom:node-removed +32ms
cypress:protocol:capture:Fn Inserting dom:node-removed into events table with runnableId r3, attempt 1 +0ms
cypress:protocol:capture:wi Insertion attempt for network:request-will-be-sent +1ms
cypress:protocol:capture:wi Inserting network:request-will-be-sent into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:request-served-from-cache +0ms
cypress:protocol:capture:wi Inserting network:request-served-from-cache into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:response-received +1ms
cypress:protocol:capture:wi Inserting network:response-received into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:loading-finished +1ms
cypress:protocol:capture:wi Inserting network:loading-finished into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:NetworkManager Network.loadingFinished {
cypress:protocol:capture:NetworkManager request: {
cypress:protocol:capture:NetworkManager requestInformation: {
cypress:protocol:capture:NetworkManager requestId: '2768.11818',
cypress:protocol:capture:NetworkManager requestURLs: [Array],
cypress:protocol:capture:NetworkManager type: 'Font',
cypress:protocol:capture:NetworkManager requestWillBeSentTimestamp: 872.597416,
cypress:protocol:capture:NetworkManager requestWillBeSentWallTime: 1693938543419.031,
cypress:protocol:capture:NetworkManager isCached: true
cypress:protocol:capture:NetworkManager },
cypress:protocol:capture:NetworkManager responseInformation: { mimeType: 'font/woff2', type: 'Font' },
cypress:protocol:capture:NetworkManager responseFinishedInformation: {
cypress:protocol:capture:NetworkManager loadingFinishedTimestamp: 872.597511,
cypress:protocol:capture:NetworkManager runnableId: 'r3',
cypress:protocol:capture:NetworkManager attempt: 1
cypress:protocol:capture:NetworkManager }
cypress:protocol:capture:NetworkManager }
cypress:protocol:capture:NetworkManager } +3ms
cypress:protocol:capture:wi Insertion attempt for network:request-will-be-sent +1ms
cypress:protocol:capture:wi Inserting network:request-will-be-sent into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:wi Insertion attempt for network:request-served-from-cache +18ms
cypress:protocol:capture:wi Inserting network:request-served-from-cache into events table with runnableId undefined, attempt undefined +0ms
cypress:protocol:capture:AssetManager writeToTarballFromFilePath indexed-tarball response {
cypress:protocol:capture:AssetManager err: undefined,
cypress:protocol:capture:AssetManager metadata: {
cypress:protocol:capture:AssetManager index: {
cypress:protocol:capture:AssetManager '***.gz': [Object],
cypress:protocol:capture:AssetManager '***.gz': [Object],
cypress:protocol:capture:AssetManager '***.gz': [Object],
cypress:protocol:capture:AssetManager '***.gz': [Object],
cypress:protocol:capture:AssetManager '***.gz': [Object],
Hi everyone on this thread. Just wanted to drop an update here to keep everyone in the loop on what we are doing around this issue. Unfortunately, the logs provided right now don't have quite enough information for us to pinpoint the problem. We are working on adding some more debugging information into the logs that will hopefully get us closer to understanding and addressing this problem. We are working on that change which will be part of a Cypress Cloud release. Once that is released I will comment back here asking for folks to run their tests again and posts the logs with the added debugging information. Stay tuned.
Hi everyone! We have deployed our changes to logging. If folks could run their tests with DEBUG=cypress:protocol:capture,cypress-verbose:protocol:capture:tracked-cdp
this will capture the new logging and hopefully help us diagnose the issue. Please post your logs back here when you have a moment. Quick guide for posting long things in a collapsable way
For my case, it hangs after tests are completed
Thanks @billxlong, can you share the last log that is prefixed with cypress:protocol:capture
? (And maybe the surrounding logs)
Thanks @billxlong, can you share the last log that is prefixed with
cypress:protocol:capture
? (And maybe the surrounding logs)
There you go:
FWIW I'm running this locally with my Mac not in CI @ryanthemanuel
Here is the logging for my run that is hung up in the ci/cd pipeline
Thanks @sowardskimberly can you share the last log that is prefixed with cypress:protocol:capture? (And maybe the surrounding logs)
@ryanthemanuel what I have shared is where my logs end. My test has been hung up for over 1 hour since the last test passed. In the logs I pasted, I included where it passed, and then the end where it is waiting. I assume you mean cypress-verbose:protocol:capture:tracked-cdp
because i'm not seeing a log for cypress:protocol:capture
.
Hello everyone. We just released something in the cloud that will hopefully help some of the hangings that people were seeing between specs. I'm not sure this covers everyone's issue, but I'm curious to see if it has helped anyone so far. We have a few additional fixes we are looking into as well.
For me, this can be reproduced locally,
I commented on a potentially duplicate issue.
Has an open repo, and repro steps anyone can try, as well as a public Cy Cloud project.
https://github.com/cypress-io/cypress/issues/27769#issuecomment-1710785602
Hello everyone. We just released something in the cloud that will hopefully help some of the hangings that people were seeing between specs. I'm not sure this covers everyone's issue, but I'm curious to see if it has helped anyone so far. We have a few additional fixes we are looking into as well.
Resolved the issue for me.
Hello everyone. We just released something in the cloud that will hopefully help some of the hangings that people were seeing between specs. I'm not sure this covers everyone's issue, but I'm curious to see if it has helped anyone so far. We have a few additional fixes we are looking into as well.
This also resolved the issue for me.
Hello everyone. We just released something in the cloud that will hopefully help some of the hangings that people were seeing between specs. I'm not sure this covers everyone's issue, but I'm curious to see if it has helped anyone so far. We have a few additional fixes we are looking into as well.
Resolved for us
Seems this would have solved the issue on our side as well, thanks!
I am also seeing this with
13.0.0
and13.1.0
. It seems to happen after certain tests, but also happens at inconsistent points in the test run, seems to crash before/while uploading the Test Replay, withDEBUG=cypress:server:*,cypress:https-proxy
I am seeing the expectedonMocha
events:cypress:server:project onMocha end +1ms cypress:server:reporter got mocha event 'end' with args: [ undefined ] +1ms 1 passing (8s) cypress:server:run received project end +11s cypress:server:run received videoController { videoController: undefined } +0ms cypress:server:run spec results: { error: null, reporter: 'spec', reporterStats: { suites: 0, tests: 1, passes: 1, pending: 0, failures: 0, start: 2023-09-01T15:02:59.932Z, end: 2023-09-01T15:03:08.138Z, duration: 8206 }, screenshots: [], spec: { absolute: '<filepath>/addToBag.test.ts', fileExtension: '.ts', fileName: 'addToBag', name: 'addToBag.test.ts', relative: '<filepath>/addToBag.test.ts' }, stats: { duration: 8211, endedAt: 2023-09-01T15:03:08.136Z, failures: 0, passes: 1, pending: 0, skipped: 0, startedAt: 2023-09-01T15:02:59.925Z, suites: 0, tests: 1 }, tests: [ { attempts: [Array], displayError: null, duration: 7263, state: 'passed', title: [Array] } ], video: null } +0ms cypress:server:run execute after:spec +0ms
And then I get this seemingly infinitely:
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51198 } +616ms cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51519 } +5ms cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51448 } +90ms cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51529 } +3s cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51540 } +1s cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 51537 } +0ms cypress:server:util:process_profiler current & mean memory and CPU usage by process group: cypress:server:util:process_profiler βββββββββββ¬ββββββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ¬βββββββββββββ¬βββββββββββββββββ¬βββββββββββ¬βββββββββββββββ¬ββββββββββββββ cypress:server:util:process_profiler β (index) β group β processCount β pids β cpuPercent β meanCpuPercent β memRssMb β meanMemRssMb β maxMemRssMb β cypress:server:util:process_profiler βββββββββββΌββββββββββββββββββββΌβββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌβββββββββββββΌβββββββββββββββββΌβββββββββββΌβββββββββββββββΌββββββββββββββ€ cypress:server:util:process_profiler β 0 β 'Chrome' β 5 β '92794, 92803, 92811, 92805, 92806' β 16.5 β 69.45 β 768.86 β 685.05 β 768.86 β cypress:server:util:process_profiler β 1 β 'cypress' β 1 β '91097' β 2.6 β 26.03 β 369.88 β 322.07 β 369.88 β cypress:server:util:process_profiler β 2 β 'plugin' β 1 β '91120' β 0 β 23.8 β 225.86 β 292.57 β 359.28 β cypress:server:util:process_profiler β 3 β 'electron-shared' β 2 β '91099, 91470' β 0.7 β 0.45 β 55.61 β 55.38 β 55.61 β cypress:server:util:process_profiler β 4 β 'other' β 1 β '92834' β 0 β 0 β 1.89 β 1.83 β 1.89 β cypress:server:util:process_profiler β 5 β 'TOTAL' β 10 β '-' β 19.8 β 88.5 β 1422.09 β 1012.57 β 1422.09 β cypress:server:util:process_profiler βββββββββββ΄ββββββββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββ΄βββββββββββββ΄βββββββββββββββββ΄βββββββββββ΄βββββββββββββββ΄ββββββββββββββ +10s
This appears to have resolved the issue for us too, thanks! π
Hi @angiedaley have you been able to try using 13.1.0 to see if your issues are resolved?
hi all, can confirm that it happens in Cypress 13.1.0 when using selectFile
with a big file (we have a 117MB one)
Confirmed it is still happening in 13.2.0 as well using selectFile
Closing this issue as most of this occurrence has been resolved. If youβre still encountering hanging in 13.x, please open a new issue detailing the exact error, debug logs, and reproducible example so we can track down the new situation that may be causing hanging in your specific situation.
@nagash77 Unfortunately this does not resolve our issue. I was out of the office for two weeks, apologies for not commenting sooner. I'll work with support.
Hey @angiedaley, sorry to hear this didn't resolve your issue. There are a lot of inputs that could influence hanging. Please reach out to support providing more details so we can focus it down more on what separates your issue from the other commenters.
Have the same problem, a test remains hanging when we are waiting for an apicall. Is there a method to fail the test or the pipeline if this happens?
Test code to reproduce
No code is failing. Code works when running in Desktop. Hangs between tests and stops running. No errors reported.
Cypress Mode
cypress run
Cypress Version
13.0.0
Browser Version
Chrome Version 116.0.5845.96 (Official Build) (64-bit)
Node version
v16.5.0
Operating System
Windows 11
Memory Debug Logs
No response
Other
We have 112 specs. Tests get to spec 55 and run the first two tests normally, then hangs and never progresses.