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

[CSR-833] cy.task('dumpEvents') task is timing out for 15 min+ spec runs #63

Open
3 tasks done
akashroshan135 opened this issue Sep 15, 2023 · 1 comment
Open
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@akashroshan135
Copy link

Before opening, please confirm:

  • I have searched for duplicate or closed issues and discussions.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I acknowledge that I will attach a full debug log, otherwise the issue will be closed with no response.

Environment information

# Put output below this line
  System:
    OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 2.79 GB / 15.49 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.19.0 - /usr/bin/node
    npm: 8.19.3 - /usr/bin/npm
  Browsers:
    Chrome: 108.0.5359.124
  npmPackages:
    eslint: ^8.46.0 => 8.48.0 
    prettier: ^3.0.0 => 3.0.3 
  npmGlobalPackages:
    corepack: 0.15.1
    npm: 8.19.3

Describe the bug

When executing a spec which exceeds past 10-15 mins of runtime, the cy.task('dumpEvents') task is timing out on the default 60000ms task timeout. We increased the timeout to 300000ms (5 mins) and set failedTestsOnly: true parameter so only the failed test (which is only a couple mins long) will be stored but we are still getting the same issue.

image

Expected behavior

The cy.task('dumpEvents') should not timeout for the failed test even if the complete spec file execution exceed 15 mins+ of runtime.

Command and Setup

Command (share the exact cypress or cypress-cloud command you're running)

# Put output below this line
cypress-cloud run --spec cypress/e2e/test.spec.js --parallel --record --key xxxxxxxxxxxx --ci-build-id test-1

Setup files cypress.config.j|ts|json

# Put output below this line
// eslint-disable-next-line no-undef
const { defineConfig } = require('cypress');
// eslint-disable-next-line no-undef
const { cloudPlugin } = require('cypress-cloud/plugin');

// eslint-disable-next-line no-undef
module.exports = defineConfig({
  viewportWidth: 1500,
  viewportHeight: 1200,
  chromeWebSecurity: false,
  watchForFileChanges: false,
  redirectionLimit: 100,
  defaultCommandTimeout: 60000,
  pageLoadTimeout: 100000,
  reporter: 'mochawesome',
  reporterOptions: {
    reportDir: 'cypress/reporters',
    overwrite: true,
    html: false,
    js: true,
  },
  video: false,

  e2e: {
    setupNodeEvents(on, config) {
      // eslint-disable-next-line no-undef
      require('./cypress/plugins/index.js')(on, config);
      return cloudPlugin(on, config);
    },
    specPattern: ['cypress/e2e/**/*.spec.js'],
  },
});

Full log and debug output

# Put your logs below this line
       "after each" hook: P for "test":
     CypressError: `cy.task('dumpEvents')` timed out after waiting `300000ms`.

https://on.cypress.io/api/task

Because this error occurred during a `after each` hook we are skipping all of the remaining tests.
      at <unknown> (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:151131:78)
      at tryCatcher (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:18744:23)
      at <unknown> (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:13866:41)
      at tryCatcher (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:18744:23)
      at Promise._settlePromiseFromHandler (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:16679:31)
      at Promise._settlePromise (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:16736:18)
      at Promise._settlePromise0 (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:16781:10)
      at Promise._settlePromises (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:16857:18)
      at _drainQueueStep (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:13451:12)
      at _drainQueue (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:13444:9)
      at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:13460:5)
      at Async.drainQueues (https://app3.syscloud.com/__cypress/runner/cypress_runner.js:13330:14)
  From Your Spec Code:
      at Context.P (webpack:///./node_modules/@currents/cypress-debugger-support/index.js:1:67245)

@akashroshan135 akashroshan135 added the bug Something isn't working label Sep 15, 2023
@agoldis agoldis changed the title cy.task('dumpEvents') task is timing out for 15 min+ spec runs [CSR-833] cy.task('dumpEvents') task is timing out for 15 min+ spec runs Sep 25, 2023
@smarigowda
Copy link

smarigowda commented Oct 4, 2023

I am also observing the same in our overnight run.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants