cypress-io / cypress

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

Cypress 13 Hanging During Runs #27722

Closed angiedaley closed 11 months ago

angiedaley commented 1 year ago

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.

cfuller1985 commented 1 year 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.

jennifer-shehane commented 1 year ago

@cfuller1985 @angiedaley Could you run Cypress in debug mode mode and print the entire set of logs here (extracting any private info)?

funkadelic commented 1 year ago

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

egucciar commented 1 year ago

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)

vincezipparro commented 1 year ago

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

nagash77 commented 1 year ago

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.

joshuajtward commented 1 year ago

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
vincezipparro commented 1 year ago

@nagash77 still experiencing the same issues.

sillicon commented 1 year ago

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.

javgarr commented 1 year ago

Also experiencing this after updating to Cypress 13. Rolling back.

jan-trynda-crustlab commented 1 year ago

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

sowardskimberly commented 1 year ago

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],
nagash77 commented 1 year ago

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.

nagash77 commented 1 year ago

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

billxlong commented 1 year ago

For my case, it hangs after tests are completed

detailed logging The log is very repetitive, after ``` 6 passing (56s) [mochawesome] Report JSON saved to /Users/XXXX/xxx/cypress/results/.jsons/mochawesome.json ``` The logs start to see repetitive stuff like this ``` cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.responseReceivedExtraInfo +199ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.responseReceived +1ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.loadingFinished +1ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining DOM.attributeModified +1ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining DOM.attributeModified +5ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +2ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.requestWillBeSent +925ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.requestWillBeSentExtraInfo +2ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining DOM.attributeModified +2ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining DOM.attributeModified +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +1ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining DOM.attributeModified +4ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +2ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.responseReceivedExtraInfo +197ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.responseReceived +3ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.loadingFinished +1ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining DOM.attributeModified +2ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining DOM.attributeModified +5ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Runtime.bindingCalled +3ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.requestWillBeSent +6s cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.requestWillBeSentExtraInfo +4ms ``` Nothing else was seen and starts hanging.
ryanthemanuel commented 1 year ago

Thanks @billxlong, can you share the last log that is prefixed with cypress:protocol:capture? (And maybe the surrounding logs)

billxlong commented 1 year ago

Thanks @billxlong, can you share the last log that is prefixed with cypress:protocol:capture? (And maybe the surrounding logs)

There you go:

detailed logging ``` cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress:protocol:capture afterTest: draining cdp client, allowSpilloverEvents: true +708ms cypress:protocol:capture afterTest: flushing pending timestamp sync events +0ms cypress:protocol:capture afterTest: done +0ms cypress-verbose:protocol:capture:tracked-cdp handling spillover event while draining DOM.attributeModified +5ms cypress-verbose:protocol:capture:tracked-cdp handling spillover event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp handling spillover event while draining Runtime.bindingCalled +1ms cypress-verbose:protocol:capture:tracked-cdp handling spillover event while draining Runtime.bindingCalled +0ms cypress-verbose:protocol:capture:tracked-cdp handling spillover event while draining Runtime.bindingCalled +0ms 6 passing (51s) cypress-verbose:protocol:capture:tracked-cdp handling spillover event while draining Runtime.bindingCalled +19ms cypress-verbose:protocol:capture:tracked-cdp handling spillover event while draining Runtime.bindingCalled +0ms [mochawesome] Report JSON saved to /Users/XXXXX/cypress/results/.jsons/mochawesome.json cypress:protocol:capture afterSpec: draining cdp client +1s cypress:protocol:capture afterSpec: resolving network body promises +0ms cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.requestWillBeSent +3s cypress-verbose:protocol:capture:tracked-cdp skipping event while draining Network.requestWillBeSentExtraInfo +2ms ```

FWIW I'm running this locally with my Mac not in CI @ryanthemanuel

sowardskimberly commented 1 year ago

Here is the logging for my run that is hung up in the ci/cd pipeline

detailed logs ``` cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +6s PowershellResult { stdout: '', stderr: '', code: 0 } cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +2ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +4ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +19ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +2ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +73ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Network.requestWillBeSent, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Network.requestWillBeSent, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for DOM.attributeModified, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for DOM.attributeModified, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Network.requestWillBeSentExtraInfo, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Network.requestWillBeSentExtraInfo, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Network.responseReceivedExtraInfo, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Network.responseReceivedExtraInfo, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Network.responseReceived, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Network.responseReceived, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Network.loadingFailed, pending callbacks: 1 +7ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Network.loadingFailed, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +3ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +0ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms cypress-verbose:protocol:capture:tracked-cdp adding outstanding callback for Runtime.bindingCalled, pending callbacks: 1 +1ms cypress-verbose:protocol:capture:tracked-cdp removing outstanding callback for Runtime.bindingCalled, pending callbacks: 0 +0ms ```
ryanthemanuel commented 1 year ago

Thanks @sowardskimberly can you share the last log that is prefixed with cypress:protocol:capture? (And maybe the surrounding logs)

sowardskimberly commented 1 year ago

@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.

image ![image](https://github.com/cypress-io/cypress/assets/45640608/b5bc7de4-1c7e-4bb0-9e76-418df0900a0f)
ryanthemanuel commented 1 year ago

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.

muratkeremozcan commented 1 year ago

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

cbookg commented 1 year ago

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.

maisano-patreon commented 1 year ago

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.

JakeBradenPro commented 1 year ago

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

javgarr commented 12 months ago

Seems this would have solved the issue on our side as well, thanks!

joshuajtward commented 12 months ago

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

This appears to have resolved the issue for us too, thanks! πŸ™Œ

nagash77 commented 12 months ago

Hi @angiedaley have you been able to try using 13.1.0 to see if your issues are resolved?

ghost commented 12 months ago

hi all, can confirm that it happens in Cypress 13.1.0 when using selectFile with a big file (we have a 117MB one)

vincezipparro commented 11 months ago

Confirmed it is still happening in 13.2.0 as well using selectFile

jennifer-shehane commented 11 months ago

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.

angiedaley commented 11 months ago

@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.

jennifer-shehane commented 11 months ago

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.

bcata11 commented 3 months ago

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?