cypress-io / cypress

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

Cypress gets killed automatically #30381

Open kushal-omnius opened 1 month ago

kushal-omnius commented 1 month ago

Current behavior

My test exeution gets stopped automatically sometimes

cypress version: 13.15.0

attached Logs with debug :

Desired behavior

Tests should complete the execution and shouldn't just end abruptly

Test code to reproduce

happens at a random time.

Cypress Version

13.15.0

Node version

22.6.0

Operating System

Ubuntu Linux

Debug Logs

────────────────────────────────────────────────────────────────────────────────────────────────────
  cypress:server:browsers browsers.kill called with no active instance +3s
  cypress:server:browsers getBrowserLauncher { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118, isHeadless: true, isHeaded: false } } +0ms
  cypress:server:browsers opening browser { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118, isHeadless: true, isHeaded: false } +0ms
  cypress:server:browsers:electron open { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118, isHeadless: true, isHeaded: false }, url: 'https://de-dca-dev.omnius.com/__/#/specs/runner?file=cypress/e2e/features/UI/payout-configuration-and-verification-flow-1.feature' } +3s
  cypress:server:browsers:electron received saved state {} +0ms

  Running:  UI/payout-configuration-and-verification-flow-1.feature                       (43 of 54)
  Estimated: 27 minutes, 49 seconds
  cypress:server:browsers:electron browser window options { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118, isHeadless: true, isHeaded: false }, url: 'https://de-dca-dev.omnius.com/__/#/specs/runner?file=cypress/e2e/features/UI/payout-configuration-and-verification-flow-1.feature', browsers: [ { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118 } ], userAgent: null, proxyUrl: 'http://localhost:44191', proxyServer: 'http://localhost:44191', socketIoRoute: '/__socket', chromeWebSecurity: false, isTextTerminal: true, downloadsFolder: '/home/azureuser03/actions-runner/_work/omnius-qa-cck-automation/omnius-qa-cck-automation/cypress/downloads', experimentalModifyObstructiveThirdPartyCode: false, experimentalWebKitSupport: false, protocolManager: N { _errors: [], _captureHash: 'YPy6_kVbyp1Z9bzBB5KYF9PXUu8frpGMlnJONOKSZA0', _runId: 'c0c39798-32f2-40c9-9eec-8f0db11caf10', _protocol: no { options: [Object], handlingAfterTest: false, cdpReconnect: [AsyncFunction (anonymous)], _cdpReconnect: [AsyncFunction (anonymous)], addScriptForNewDocument: [AsyncFunction (anonymous)], setupBindings: [AsyncFunction (anonymous)], teardownBindings: [AsyncFunction (anonymous)], beforeTestCallback: [AsyncFunction (anonymous)], _beforeTestCallback: [AsyncFunction (anonymous)], state: [rl], db: [gu], dbPath: '/tmp/cypress/protocol/5d7029fb-1a83-4040-89e3-36fe8eb86050.db', configPromise: [Promise], cdpClient: [eo], scriptToEvaluateId: '2', protocolErrorManager: [sl], autBroker: [Aa], cdpLogManager: [bu], runtimeManager: [Su], cssManager: [il], frameManager: [al], domManager: [_u], networkManager: [wu], cypressEventsManager: [ku], dbMetadata: [Object] }, _afterSpecDurations: undefined, _instanceId: '5d7029fb-1a83-4040-89e3-36fe8eb86050', _db: r { name: '/tmp/cypress/protocol/5d7029fb-1a83-4040-89e3-36fe8eb86050.db', open: true, inTransaction: false, readonly: false, memory: false }, _archivePath: '/tmp/cypress/protocol/5d7029fb-1a83-4040-89e3-36fe8eb86050.tar', _runnableId: undefined }, projectRoot: '/home/azureuser03/actions-runner/_work/omnius-qa-cck-automation/omnius-qa-cck-automation', shouldLaunchNewTab: false, videoApi: undefined, automationMiddleware: { onBeforeRequest: [Function: onBeforeRequest], onAfterResponse: [Function: onAfterResponse] }, x: null, y: null, width: 1280, height: 720, minWidth: 100, minHeight: 100, devTools: false, contextMenu: true, partition: 'persist:run-156188', trackState: { width: 'browserWidth', height: 'browserHeight', x: 'browserX', y: 'browserY', devTools: 'isBrowserDevToolsOpen' }, webPreferences: { sandbox: true, partition: null, webSecurity: true, nodeIntegration: false, backgroundThrottling: false }, show: false, resizable: false, frame: true, recordFrameRate: null } +1ms
  cypress:server:browsers:electron launching browser window to url: https://de-dca-dev.omnius.com/__/#/specs/runner?file=cypress/e2e/features/UI/payout-configuration-and-verification-flow-1.feature +0ms
  cypress:server:browsers:electron browser CRI is not set. Creating... +36ms
  cypress:server:browsers:cri-client creating cri client with {
  host: undefined,
  port: undefined,
  targetId: 'ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225'
} +3s
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 adding connection event listener for  cdp-connection-reconnect-error +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 adding connection event listener for  cdp-connection-reconnect +0ms
  cypress:server:browsers:cri-client connecting { connected: false, target: 'ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225' } +1ms
  cypress:server:browsers:cri-client connected { connected: true, target: 'ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225' } +5ms
  cypress:server:browsers:cri-client registering enable command Target.setDiscoverTargets +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Target.attachedToTarget +5ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Target.attachedToTarget' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Target.targetDestroyed +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Target.targetDestroyed' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Inspector.targetReloadedAfterCrash +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Inspector.targetReloadedAfterCrash' } +0ms
  cypress:server:browsers:browser-cri-client Target.attachedToTarget { targetId: 'B2CD7955BCEAF2202364CF5904BF1468', type: 'page', title: 'about:blank', url: 'about:blank', attached: true, canAccessOpener: false, browserContextId: '61DF98EDFCA8A93DE1C8CD10888A591E' } +3s
  cypress:server:browsers:browser-cri-client Not waiting for debugger (id: B2CD7955BCEAF2202364CF5904BF1468) +0ms
  cypress:server:browsers:browser-cri-client Attaching to target url about:blank +0ms
  cypress:server:browsers:cri-client creating cri client with {
  host: '127.0.0.1',
  port: '34959',
  targetId: 'B2CD7955BCEAF2202364CF5904BF1468'
} +1ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 adding connection event listener for  cdp-connection-reconnect-error +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 adding connection event listener for  cdp-connection-reconnect +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Target.targetCrashed +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Target.attachedToTarget +0ms
  cypress:server:browsers:cri-client connecting { connected: false, target: 'B2CD7955BCEAF2202364CF5904BF1468' } +1ms
  cypress:server:browsers:cri-client connected { connected: true, target: 'B2CD7955BCEAF2202364CF5904BF1468' } +3ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.requestWillBeSent +3ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestWillBeSent' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.requestWillBeSent +5ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestWillBeSent' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.responseReceived +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.responseReceived' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.responseReceived +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.responseReceived' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.requestServedFromCache +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestServedFromCache' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.requestServedFromCache +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestServedFromCache' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.loadingFailed +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.loadingFailed' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.loadingFailed +1ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.loadingFailed' } +1ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection ServiceWorker.workerRegistrationUpdated +1ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'ServiceWorker.workerRegistrationUpdated' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection ServiceWorker.workerVersionUpdated +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'ServiceWorker.workerVersionUpdated' } +0ms
  cypress:server:browsers:cri-client registering enable command Network.enable +0ms
  cypress:server:browsers:electron clearing cache +15ms
  cypress:server:browsers:cri-client registering enable command Page.enable +0ms
  cypress:server:browsers:cri-client registering enable command ServiceWorker.enable +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.enable +1ms
  cypress:server:browsers:cri-client registering enable command Runtime.enable +0ms
  cypress:server:browsers:cri-client registering enable command Page.enable +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +2ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +1ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.bindingCalled +6ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.bindingCalled' } +2ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.bindingCalled +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.bindingCalled' } +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.enable +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.addBinding +2ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.bindingCalled +9ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.bindingCalled' } +7ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.bindingCalled +6ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.bindingCalled' } +6ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.bindingCalled +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.bindingCalled' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.bindingCalled +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.bindingCalled' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Log.entryAdded +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Log.entryAdded' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.bindingCalled +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.bindingCalled' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Page.frameAttached +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Page.frameAttached' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Page.frameDetached +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Page.frameDetached' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.executionContextCreated +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.executionContextCreated' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.executionContextDestroyed +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.executionContextDestroyed' } +0ms
  cypress:server:browsers:cri-client registering enable command Runtime.enable +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.consoleAPICalled +1ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.consoleAPICalled' } +1ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Runtime.exceptionThrown +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Runtime.exceptionThrown' } +0ms
  cypress:server:browsers:cri-client registering enable command Network.enable +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.requestServedFromCache +1ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestServedFromCache' } +1ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.requestServedFromCache +23ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestServedFromCache' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.requestWillBeSent +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestWillBeSent' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.requestWillBeSent +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestWillBeSent' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.requestWillBeSentExtraInfo +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestWillBeSentExtraInfo' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.requestWillBeSentExtraInfo +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.requestWillBeSentExtraInfo' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.responseReceived +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.responseReceived' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.responseReceived +1ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.responseReceived' } +1ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.responseReceivedExtraInfo +1ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.responseReceivedExtraInfo' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.responseReceivedExtraInfo +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.responseReceivedExtraInfo' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.loadingFinished +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.loadingFinished' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.loadingFinished +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.loadingFinished' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Network.loadingFailed +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.loadingFailed' } +0ms
  cypress:server:browsers:cdp-connection:ws://127.0.0.1:34959/devtools/browser/254660a7-d42b-4015-97be-23f38fd82225 attaching event listener to cdp connection Network.loadingFailed +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Network.loadingFailed' } +0ms
  cypress:server:browsers:electron debugger: enable Console and Network +934ms
  cypress:server:browsers:cri-client registering enable command Console.enable +911ms
  cypress:server:browsers:cri-client registering enable command Fetch.enable +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Fetch.requestPaused +912ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Fetch.requestPaused' } +1ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Page.frameAttached +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Page.frameAttached' } +0ms
  cypress:server:browsers:cdp-connection:B2CD7955BCEAF2202364CF5904BF1468 attaching event listener to cdp connection Page.frameDetached +0ms
  cypress:server:browsers:cri-client registering CDP on event { eventName: 'Page.frameDetached' } +0ms
  cypress:server:browsers browser opened for launch 43 +2s

  cypress:server:browsers getBrowserLauncher { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118, isHeadless: true, isHeaded: false } } +1s
  Payout Configuration and Verification
    ✓ As a CCK, user I should be able to configure the payout action and other configurations for payout. (5166ms)
  cypress:server:browsers getBrowserLauncher { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '118.0.5993.159', path: '', majorVersion: 118, isHeadless: true, isHeaded: false } } +5s
Error: The operation was canceled.

Other

No response

jennifer-shehane commented 1 month ago

This doesn't look related to Cypress. Is there something on your machine that might be cancelling when some condition is met or something?

kushal-omnius commented 1 month ago

@jennifer-shehane this from GitHub actions runner, so I don't think there is something killing the cypress

YJDoc2 commented 1 month ago

Hey @kushal-omnius , is it possible that your tests are running into OOM issues? I see from your logs 43 out of 45 . Is the operation was cancelled part of cypresss logs or github CI?

kushal-omnius commented 1 month ago

@YJDoc2 hard to say, could be GitHUB CI. But I see this log as well (why would it show):

cypress:server:browsers browsers.kill called with no active instance +3s