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

Cypress randomly return CDP_COULD_NOT_RECONNECT error for spec being run in CI #26765

Closed
bilarallen opened this issue May 16, 2023 · 24 comments
Closed

Comments

@bilarallen
Copy link

bilarallen commented May 16, 2023

Current behavior

When running the tests in Jenkins CI, using 5 VM machines in parallel there are instances that it cannot report the run result because of the CDP_COULD_NOT_RECONNECT error and it cannot report the result of the spec that is affected by this error.

Desired behavior

Should be able to report the result of the spec that is affected by the error CDP_COULD_NOT_RECONNECT

Test code to reproduce

This only occurs in our private project repo but I have provided cypress debug logs and masked sensitive information.

Cypress Version

12.12.0

Node version

14.6.0

Operating System

linux Debian - 10.8

Debug Logs

Running:  dashboard/history/miscPosCashWithdrawalRevertTests.cy.js                        (4 of 4)
2023-05-10T19:54:42.604Z cypress:server:run about to run spec { spec: { fileExtension: '.js', baseName: 'miscPosCashWithdrawalRevertTests.cy.js', fileName: 'miscPosCashWithdrawalRevertTests', specFileExtension: '.cy.js', relativeToCommonRoot: 'dashboard/history/miscPosCashWithdrawalRevertTests.cy.js', specType: 'integration', name: 'cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js', relative: 'cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js', absolute: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js' }, isHeadless: true, browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106, isHeadless: true, isHeaded: false } }
2023-05-10T19:54:42.605Z cypress:server:run created videoRecording { videoRecording: { api: { onError: [Function (anonymous)], videoName: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/videos/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js.mp4', compressedVideoName: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/videos/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js-compressed.mp4', useFfmpegVideoController: [AsyncFunction: useFfmpegVideoController], useVideoController: [Function: useVideoController], onProjectCaptureVideoFrames: [Function: onProjectCaptureVideoFrames] }, controller: undefined } }
2023-05-10T19:54:42.605Z cypress:server:run waiting for socket to connect and browser to launch...
2023-05-10T19:54:42.605Z cypress:server:run waiting for socket connection... { id: '9rwgsdte8d' }
2023-05-10T19:54:42.605Z cypress:server:open_project resetting project state, preparing to launch browser electron for spec { fileExtension: '.js', baseName: 'miscPosCashWithdrawalRevertTests.cy.js', fileName: 'miscPosCashWithdrawalRevertTests', specFileExtension: '.cy.js', relativeToCommonRoot: 'dashboard/history/miscPosCashWithdrawalRevertTests.cy.js', specType: 'integration', name: 'cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js', relative: 'cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js', absolute: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js' } options { projectRoot: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress', shouldLaunchNewTab: true, onError: [Function (anonymous)], videoApi: { onError: [Function (anonymous)], videoName: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/videos/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js.mp4', compressedVideoName: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/videos/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js-compressed.mp4', useFfmpegVideoController: [AsyncFunction: useFfmpegVideoController], useVideoController: [Function: useVideoController], onProjectCaptureVideoFrames: [Function: onProjectCaptureVideoFrames] }, automationMiddleware: { onBeforeRequest: [Function: onBeforeRequest], onAfterResponse: [Function: onAfterResponse] }, onWarning: [Function: onWarning] }
2023-05-10T19:54:42.605Z cypress:server:project resetting project instance /tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress
2023-05-10T19:54:42.605Z cypress:proxy:http:util:buffers resetting buffers
2023-05-10T19:54:42.605Z cypress:network:cors Parsed URL { port: '443', protocol: 'https:', subdomain: 'xxxxxxxx', domain: 'xxxxxxxx', tld: 'cloud' }
2023-05-10T19:54:42.606Z cypress:network:cors Parsed URL { port: '443', protocol: 'https:', subdomain: 'xxxxxxxx', domain: 'xxxxxxxx', tld: 'cloud' }
2023-05-10T19:54:42.606Z cypress:server:remote-states setting remote state { auth: undefined, origin: 'https://xxxxxxxx.xxxxxxxx.cloud', strategy: 'http', fileServer: null, domainName: 'xxxxxxxx.cloud', props: { port: '443', protocol: 'https:', subdomain: 'xxxxxxxx', domain: 'xxxxxxxx', tld: 'cloud' } } for https://xxxxxxxx.cloud
2023-05-10T19:54:42.606Z cypress:network:cors Parsed URL { port: '443', protocol: 'https:', subdomain: null, domain: 'xxxxxxxx', tld: 'cloud' }
2023-05-10T19:54:42.606Z cypress:server:remote-states getting remote state: { auth: undefined, origin: 'https://xxxxxxxx.xxxxxxxx.cloud', strategy: 'http', fileServer: null, domainName: 'xxxxxxxx.cloud', props: { port: '443', protocol: 'https:', subdomain: 'xxxxxxxx', domain: 'xxxxxxxx', tld: 'cloud' } } for: https://xxxxxxxx.cloud
2023-05-10T19:54:42.606Z cypress:server:project_utils returning spec url https://xxxxxxxx.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js
2023-05-10T19:54:42.606Z cypress:server:open_project open project url https://xxxxxxxx.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js
2023-05-10T19:54:42.606Z cypress:server:project project has config { env: { nxApi: 'https://api.xxxxxxxx.xxxxxxxx.cloud/', currents_ws: true }, defaultCommandTimeout: 60000, requestTimeout: 60000, responseTimeout: 60000, viewportWidth: 1536, viewportHeight: 864, screenshotOnRunFailure: true, experimentalMemoryManagement: true, videoUploadOnPasses: false, modifyObstructiveCode: false, baseUrl: 'https://xxxxxxxx.xxxxxxxx.cloud/', experimentalRunAllSpecs: true, retries: { runMode: 1, openMode: 0 }, setupNodeEvents: '[Function setupNodeEvents]', projectRoot: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress', projectName: 'core-banking-frontend-tests-cypress', repoRoot: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress', rawJson: { env: { nxApi: 'https://api.xxxxxxxx.xxxxxxxx.cloud/' }, defaultCommandTimeout: 60000, requestTimeout: 60000, responseTimeout: 60000, viewportWidth: 1536, viewportHeight: 864, screenshotOnRunFailure: true, experimentalMemoryManagement: true, videoUploadOnPasses: false, modifyObstructiveCode: false, e2e: { baseUrl: 'https://xxxxxxxx.xxxxxxxx.cloud/', experimentalRunAllSpecs: true, retries: [Object], setupNodeEvents: '[Function setupNodeEvents]' }, baseUrl: 'https://xxxxxxxx.xxxxxxxx.cloud/', experimentalRunAllSpecs: true, retries: { runMode: 1, openMode: 0 }, setupNodeEvents: '[Function setupNodeEvents]', envFile: {}, projectRoot: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress', projectName: 'core-banking-frontend-tests-cypress', repoRoot: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress' }, configFile: 'cypress.config.js', morgan: false, isTextTerminal: true, socketId: '9rwgsdte8d', report: true, numTestsKeptInMemory: 0, trashAssetsBeforeRuns: false, isInteractive: false, animationDistanceThreshold: 5, arch: 'x64', blockHosts: null, chromeWebSecurity: true, clientCertificates: [], downloadsFolder: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/downloads', execTimeout: 60000, experimentalFetchPolyfill: false, experimentalInteractiveRunEvents: false, experimentalModifyObstructiveThirdPartyCode: false, experimentalSkipDomainInjection: null, experimentalOriginDependencies: false, experimentalSourceRewriting: false, experimentalSingleTabRunMode: false, experimentalStudio: false, experimentalWebKitSupport: false, fileServerFolder: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress', fixturesFolder: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/fixtures', excludeSpecPattern: '*.hot-update.js', includeShadowDom: false, keystrokeDelay: 0, nodeVersion: undefined, platform: 'linux', pageLoadTimeout: 60000, port: 36617, projectId: null, redirectionLimit: 20, reporter: 'spec', reporterOptions: null, resolvedNodePath: '/usr/local/bin/node', resolvedNodeVersion: '14.16.0', screenshotsFolder: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/screenshots', slowTestThreshold: 10000, scrollBehavior: 'top', supportFile: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/support/e2e.js', supportFolder: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/support', taskTimeout: 60000, testIsolation: true, userAgent: null, video: true, videoCompression: 32, videosFolder: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/videos', waitForAnimations: true, watchForFileChanges: false, specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', additionalIgnorePattern: [], autoOpen: false, browsers: [ { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106 } ], clientRoute: '/__/', cypressBinaryRoot: '/home/node/.cache/Cypress/12.12.0/Cypress/resources/app', devServerPublicPathRoute: '/__cypress/src', hosts: null, namespace: '__cypress', reporterRoute: '/__cypress/reporter', socketIoCookie: '__socket', socketIoRoute: '/__socket', version: '12.12.0', cypressEnv: 'production', resolved: { animationDistanceThreshold: { value: 5, from: 'default' }, arch: { value: 'x64', from: 'default' }, baseUrl: { value: 'https://xxxxxxxx.xxxxxxxx.cloud/', from: 'config' }, blockHosts: { value: null, from: 'default' }, chromeWebSecurity: { value: true, from: 'default' }, clientCertificates: { value: [], from: 'default' }, defaultCommandTimeout: { value: 60000, from: 'config' }, downloadsFolder: { value: 'cypress/downloads', from: 'default' }, env: { nxApi: [Object], currents_ws: [Object] }, execTimeout: { value: 60000, from: 'default' }, experimentalFetchPolyfill: { value: false, from: 'default' }, experimentalInteractiveRunEvents: { value: false, from: 'default' }, experimentalRunAllSpecs: { value: true, from: 'config' }, experimentalMemoryManagement: { value: true, from: 'config' }, experimentalModifyObstructiveThirdPartyCode: { value: false, from: 'default' }, experimentalSkipDomainInjection: { value: null, from: 'default' }, experimentalOriginDependencies: { value: false, from: 'default' }, experimentalSourceRewriting: { value: false, from: 'default' }, experimentalSingleTabRunMode: { value: false, from: 'default' }, experimentalStudio: { value: false, from: 'default' }, experimentalWebKitSupport: { value: false, from: 'default' }, fileServerFolder: { value: '', from: 'default' }, fixturesFolder: { value: 'cypress/fixtures', from: 'default' }, excludeSpecPattern: { value: '*.hot-update.js', from: 'default' }, includeShadowDom: { value: false, from: 'default' }, keystrokeDelay: { value: 0, from: 'default' }, modifyObstructiveCode: { value: false, from: 'config' }, nodeVersion: { value: undefined, from: 'default' }, numTestsKeptInMemory: { value: 0, from: 'cli' }, platform: { value: 'linux', from: 'default' }, pageLoadTimeout: { value: 60000, from: 'default' }, port: { value: null, from: 'default' }, projectId: { value: null, from: 'default' }, redirectionLimit: { value: 20, from: 'default' }, reporter: { value: 'spec', from: 'default' }, reporterOptions: { value: null, from: 'default' }, requestTimeout: { value: 60000, from: 'config' }, resolvedNodePath: { value: null, from: 'default' }, resolvedNodeVersion: { value: null, from: 'default' }, responseTimeout: { value: 60000, from: 'config' }, retries: { value: [Object], from: 'config' }, screenshotOnRunFailure: { value: true, from: 'default' }, screenshotsFolder: { value: 'cypress/screenshots', from: 'default' }, slowTestThreshold: { value: 10000, from: 'default' }, scrollBehavior: { value: 'top', from: 'default' }, supportFile: { value: 'cypress/support/e2e.{js,jsx,ts,tsx}', from: 'default' }, supportFolder: { value: false, from: 'default' }, taskTimeout: { value: 60000, from: 'default' }, testIsolation: { value: true, from: 'default' }, trashAssetsBeforeRuns: { value: false, from: 'cli' }, userAgent: { value: null, from: 'default' }, video: { value: true, from: 'default' }, videoCompression: { value: 32, from: 'default' }, videosFolder: { value: 'cypress/videos', from: 'default' }, videoUploadOnPasses: { value: false, from: 'config' }, viewportHeight: { value: 864, from: 'config' }, viewportWidth: { value: 1536, from: 'config' }, waitForAnimations: { value: true, from: 'default' }, watchForFileChanges: { value: false, from: 'config' }, specPattern: { value: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', from: 'default' }, browsers: { value: [Array], from: 'runtime' }, hosts: { value: null, from: 'default' }, isInteractive: { value: false, from: 'cli' } }, testingType: 'e2e', remote: {}, browser: null, specs: [], proxyUrl: 'http://localhost:36617', browserUrl: 'https://xxxxxxxx.xxxxxxxx.cloud/__/', reporterUrl: 'https://xxxxxxxx.xxxxxxxx.cloud/__cypress/reporter', proxyServer: 'http://localhost:36617', state: {} }
2023-05-10T19:54:42.607Z cypress:network:cors Parsed URL { port: '443', protocol: 'https:', subdomain: null, domain: 'xxxxxxxx', tld: 'cloud' }
2023-05-10T19:54:42.607Z cypress:server:remote-states getting remote state: { auth: undefined, origin: 'https://xxxxxxxx.xxxxxxxx.cloud', strategy: 'http', fileServer: null, domainName: 'xxxxxxxx.cloud', props: { port: '443', protocol: 'https:', subdomain: 'xxxxxxxx', domain: 'xxxxxxxx', tld: 'cloud' } } for: https://xxxxxxxx.cloud
2023-05-10T19:54:42.607Z cypress:server:open_project launching browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106, isHeadless: true, isHeaded: false }, spec: cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js
2023-05-10T19:54:42.607Z cypress:server:browsers getBrowserLauncher { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106, isHeadless: true, isHeaded: false } }
2023-05-10T19:54:42.607Z cypress:server:browsers:electron open { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106, isHeadless: true, isHeaded: false }, url: 'https://xxxxxxxx.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js' }
2023-05-10T19:54:42.607Z cypress:server:saved_state noop saved state
2023-05-10T19:54:42.616Z cypress:server:browsers:electron received saved state {}
2023-05-10T19:54:42.617Z cypress:server:browsers:electron browser window options { browser: { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106, isHeadless: true, isHeaded: false }, url: 'https://xxxxxxxx.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js', browsers: [ { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106 } ], userAgent: null, proxyUrl: 'http://localhost:36617', proxyServer: 'http://localhost:36617', socketIoRoute: '/__socket', chromeWebSecurity: true, isTextTerminal: true, downloadsFolder: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/downloads', experimentalModifyObstructiveThirdPartyCode: false, experimentalWebKitSupport: false, projectRoot: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress', shouldLaunchNewTab: true, videoApi: { onError: [Function (anonymous)], videoName: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/videos/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js.mp4', compressedVideoName: '/tmp/jenkins-638ac000/workspace/core-banking-frontend-tests-cypress/cypress/videos/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js-compressed.mp4', useFfmpegVideoController: [AsyncFunction: useFfmpegVideoController], useVideoController: [Function: useVideoController], onProjectCaptureVideoFrames: [Function: onProjectCaptureVideoFrames] }, 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-856', 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 }
2023-05-10T19:54:42.617Z cypress:lifecycle:EventRegistrar plugin event registered? { eventName: 'before:browser:launch', isRegistered: false }
2023-05-10T19:54:42.617Z cypress:server:browsers:electron launching browser window to url: https://xxxxxxxx.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscPosCashWithdrawalRevertTests.cy.js
2023-05-10T19:54:42.626Z cypress:server:request aborting { requestId: 'request1500' }
2023-05-10T19:54:42.627Z cypress:server:request aborting { requestId: 'request1501' }
2023-05-10T19:54:42.628Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 34312 }
2023-05-10T19:54:42.628Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 34298 }
2023-05-10T19:54:42.630Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 40320 }
2023-05-10T19:54:42.630Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 40286 }
2023-05-10T19:54:42.631Z cypress:server:socket-base socket-disconnecting transport close
2023-05-10T19:54:42.631Z cypress:server:socket-base socket-disconnect transport close
2023-05-10T19:54:42.639Z cypress:server:browsers:cri-client encountered closed websocket on send { command: 'Page.screencastFrameAck', params: { sessionId: 1 }, err: Error: WebSocket is not open: readyState 2 (CLOSING) at O (<embedded>:2460:506410) at A.send (<embedded>:2460:501736) at _._enqueueCommand (<embedded>:2460:522212) at <embedded>:2460:519727 at new Promise (<anonymous>) at _.send (<embedded>:2460:519701) at k.send [as sendDebuggerCommandFn] (<embedded>:4619:314465) at _.<anonymous> (<embedded>:4619:287914) at _.emit (node:events:527:28) at _._handleMessage (<embedded>:2460:522065) at A.<anonymous> (<embedded>:2460:521673) at A.emit (node:events:527:28) at g.U (<embedded>:2460:506953) at g.emit (node:events:527:28) at g.dataMessage (<embedded>:2460:487328) at <embedded>:2460:486860 at <embedded>:2460:478182 at <embedded>:2460:479134 at afterWrite (node:internal/streams/writable:497:5) at onwrite (node:internal/streams/writable:477:7) at Zlib.<anonymous> (node:internal/streams/transform:202:7) at Zlib.processCallback (node:zlib:611:8) }
2023-05-10T19:54:42.639Z cypress:server:browsers:cri-client disconnected, attempting to reconnect... { closed: false }
2023-05-10T19:54:42.641Z cypress:server:browsers:cri-client connecting { target: '08EC0A493E3EE05FA97F3576A5757366' }
2023-05-10T19:54:42.648Z cypress:server:cypress exiting with err TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
    at _._fetchDebuggerURL (<embedded>:2460:520933)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async _._start (<embedded>:2460:520232) {
  isCypressErr: true,
  type: 'CDP_COULD_NOT_RECONNECT',
  details: "TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')\n" +
    '    at _._fetchDebuggerURL (<embedded>:2460:520933)\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
    '    at async _._start (<embedded>:2460:520232)',
  messageMarkdown: 'There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.',
  originalError: TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
      at _._fetchDebuggerURL (<embedded>:2460:520933)
      at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async _._start (<embedded>:2460:520232),
  stackWithoutMessage: '    at _._fetchDebuggerURL (<embedded>:2460:520933)\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
    '    at async _._start (<embedded>:2460:520232)',
  isFatalApiErr: true
}
There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.

TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
    at _._fetchDebuggerURL (<embedded>:2460:520933)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async _._start (<embedded>:2460:520232)
2023-05-10T19:54:42.649Z cypress:server:cypress calling exit 1
2023-05-10T19:54:42.649Z cypress:server:cypress about to exit with code 1
2023-05-10T19:54:42.652Z cypress:server:browsers killing browser process
2023-05-10T19:54:42.691Z cypress:proxy:http:util:prerequests metrics: { browserPreRequestsReceived: 1731, proxyRequestsReceived: 497, immediatelyMatchedRequests: 229, unmatchedRequests: 11, unmatchedPreRequests: 1202 }
2023-05-10T19:54:42.785Z cypress:cli child event fired { event: 'exit', code: 1, signal: null }


### Other

_No response_
@nagash77
Copy link
Contributor

Hi @bilarallen , Can you provide more context? What troubleshooting steps have you tried? Does this test run locally fine? I understand you can't share this private repo, but can you make a reproducible example in https://github.com/cypress-io/cypress-test-tiny? Without a reproducible example it is unlikely we will be able to help with your problem.

@bilarallen
Copy link
Author

Hi @nagash77 yes this works fine on my local but when running in the CI using Jenkins it randomly occurs in some spec. Apologies but this issue seems to be just on our project and can't reproduce it outside of our test. Would it be okay if I'll just put the whole Cypress debug logs in a file including the environment info, these would be huge logs but I guess this will suffice for your investigation.

@nagash77
Copy link
Contributor

@bilarallen I see in your description you are using 5 VMs to run these in parallel. What happens when you run the suite on a single VM in jenkins? I have a feeling whatever mechanisms you are using to try and run in parallel might be adding noise to the possible problems.

@bilarallen
Copy link
Author

@nagash77 Yes we're using AWS ec2 fleet with 5 instances running in our Jenkins where our automation run in parallel. I haven't tried to run our test only in one VM as our test count is really huge and this occurs randomly in a single different VM, perhaps I can share it here the full logs. The error occurs in lines 18325 to 18373
Cypress_Issue_26765_Full_Logs.txt

Here's the envi info:

System:
    OS: Linux 5.15 Debian GNU/Linux 10 (buster) 10 (buster)
    CPU: (4) x64 Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50GHz
    Memory: 11.19 GB / 15.44 GB
    Container: Yes
    Shell: 5.0.3 - /bin/bash
  Binaries:
    Node: 14.16.0 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 6.14.11 - /usr/local/bin/npm
  npmPackages:
    @babel/eslint-parser: ^7.21.8 => 7.21.8 
    @currents/cli: ^4.0.3 => 4.0.3 
    @cypress/angular:  0.0.0-development 
    @cypress/mount-utils:  0.0.0-development 
    @cypress/react:  0.0.0-development 
    @cypress/react18:  0.0.0-development 
    @cypress/svelte:  0.0.0-development 
    @cypress/vue:  0.0.0-development 
    @cypress/vue2:  0.0.0-development 
    @cypress/webpack-batteries-included-preprocessor: ^2.4.0 => 2.4.0 
    @cypress/webpack-preprocessor: ^5.17.0 => 5.17.0 
    @faker-js/faker: ^7.6.0 => 7.6.0 
    babel-eslint: ^10.1.0 => 10.1.0 
    cypress: ^12.12.0 => 12.12.0 
    cypress-cloud: ^1.7.4 => 1.7.4 
    cypress-network-idle: ^1.14.2 => 1.14.2 
    cypress-real-events: ^1.7.6 => 1.7.6 
    cypress-recurse: ^1.27.0 => 1.27.0 
    eslint: ^8.39.0 => 8.39.0 
    moment: ^2.29.4 => 2.29.4 
    numeral: ^2.0.6 => 2.0.6 
    swagger-client: ^3.18.5 => 3.18.5 
    uuid: ^9.0.0 => 9.0.0 (8.3.2)
    xvfb: ^0.4.0 => 0.4.0 
  npmGlobalPackages:
    npm: 6.14.11
    yarn: 1.22.10

@wawer77
Copy link

wawer77 commented May 18, 2023

Since 2 days after last upgrade (12.11 -> 12.12) I have been experiencing the same issue on CircleCI. It fails randomly, but always exactly the same test. Running Cypress tests in 5 environments simultaneously with 2 additional environments for other tests. It's a private repo too. It's rather hard to try running tests in a single environment and check the behaviour, as the test fails randomly.

Not sure what other info I can provide to help, cannot create an example, but maybe can add something?

@headfox23
Copy link

We face the same issue, running tests on our Jenkins. The problem occurs randomly and even on random tests...

@nagash77
Copy link
Contributor

Hi @bilarallen , I see you are using cypress-cloud. This package in spite of its name is not a Cypress library and has known issue with Cypress. I would suggest you explore alternatives or try removing that dependency and seeeing if that solves your problem.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale May 22, 2023
@nagash77 nagash77 removed their assignment May 22, 2023
@bilarallen
Copy link
Author

Hi @nagash77 I understand that we're not using the official reporting tool of cypress but the issue itself based on my provided logs is obviously from the cypress:server, so I'm wondering why we need to close this issue. not to mention that @wawer77 and @headfox23 also experience this.

@JeremieDoctrine
Copy link

Same issue for us on CircleCI after upgrading to 12.12.0

@bilarallen
Copy link
Author

Hi, @JeremieDoctrine @headfox23 @wawer77 you guys can create a new issue for this problem that we are experiencing as cypress peeps keeps closing this issue since in the logs that I have provided we used an "unofficial" cypress library even though the problem based on my logs was obviously on cypress side which I firmly believe you are also encountering. Thanks!

@wawer77
Copy link

wawer77 commented May 25, 2023

Hey @bilarallen , I can see it was reopened and moved to new issue today. I don't think it's useful to litter them with identical issues. We'll see :)

@bilarallen
Copy link
Author

bilarallen commented May 26, 2023

@wawer77 this issue status is Closed as not planned. Let's see most likely they will close this again.

@spagnon7
Copy link

We have this same issue as well, both when running Cypress locally as well as in a GitHub Action. It is also a flaky error for us (occurs maybe one out of every 3-4 times?). We only started experiencing this after upgrading from 12.11 to 12.12, and after updating to 12.13 we still get the same error occasionally. We have reverted to 12.11 for the time being, since this recurring error prevents us from effectively using the newer versions. It also always seems to happen when one particular spec file is reached.
image

It seems #26573 may have introduced this issue in the upgrade to 12.12?

@bilarallen
Copy link
Author

@spagnon7 please create a new ticket for this as the Cypress team keeps closing this ticket I filled, there you can include an example of the test that will show the error. @nagash77 please consider this issue as this doesn't only occur to 1 or 2 users of Cypress. 🤦 Thanks!

@nagash77
Copy link
Contributor

@spagnon7 please open a new issue with a reproducible example and the Cypress team will be happy to investigate.

@DukeVoldemar
Copy link

Also have this problem since 12.12, it repeats in 12.13 and in 12.14

downgrading to 12.11 helps and works well as usual

image

@bilarallen
Copy link
Author

Hi @DukeVoldemar please comment on this ticket #26900 regarding this issue and include reproducible example if you can so they can investigate this properly, else we will stick to 12.11 and can't upgrade to future versions which are not ideal for us cypress users.

@Pipul-Pant
Copy link

Pipul-Pant commented Jun 12, 2023

Hello everyone. I am experiencing a similar problem. The following are the observations I made during the Jenkins run and local testing:

  1. The browser frequently crashes when performing typing actions, such as entering input in a checkbox.
  2. There are frequent redirections to other pages, mostly using cy.visit().
  3. Nested describe blocks seem to be causing issues. Currently, I believe that Cypress does not handle nested describe blocks well, and this sometimes leads to browser crashes.
  4. I have also encountered a similar issue with the strip payment iframe. Sometimes, entering credit details results in a crash.

Cypress v12.12.0
The following specification intermittently passes and fails in the CI environment. Please prioritize resolving this issue as it is negatively impacting productivity.

Same Specs :
Screenshot 2023-06-13 at 12 40 57 AM

Screenshot 2023-06-13 at 12 50 06 AM

@nagash77
Copy link
Contributor

@Pipul-Pant In order to give our engineers the best chance at recreating your problem, please create a reproducible example using a fork of Cypress Test Tiny. This gives us the best chance of seeing exactly what you are seeing and being able to investigate effectively. Are you able to provide such an example that replicates this behavior?

@nagash77 nagash77 self-assigned this Jun 12, 2023
@awallat
Copy link

awallat commented Jun 13, 2023

We have the same problem with Cypress 12.12. The test execution randomly stops with the above error. It cannot be reproduced since it only happens every now and then. It also doesn't happen always at the same test ... it's just random after a new test suite is started. We run our tests inside a Windows VM manually and automatically.

We switch back to 12.11 to see if it solves this issue in the meantime.

@nagash77 nagash77 removed their assignment Jun 13, 2023
@alfaproject
Copy link

I've just updated from latest Cypress 11 to Cypress 12.13 and got this error as well ):

@mike-plummer
Copy link
Contributor

@alfaproject This issue has been closed for a while - since we didn't receive a reproducible example we weren't able to troubleshoot or diagnose the issue. If you are encountering the same problem and are able to provide an example project that demonstrates the failure I would invite you to open a new issue so we can take another look

@colin0117
Copy link

colin0117 commented Jun 30, 2023

@mike-plummer I'm seeing it fairly regularly in one of my tests, using Cypress 12.14.0. It's too infrequent to demonstrate the failure consistently, only once in 20 or so runs, but I'll see if I can pin it down more.

  Running:  registration.cy.js                                                              (3 of 3)
There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.

TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
    at _._fetchDebuggerURL (<embedded>:2404:524567)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async _._start (<embedded>:2404:523866)
Last command failed
Running website link test
Last command succeeded
Build step 'Execute shell' marked build as failure
Finished: FAILURE

@bilarallen
Copy link
Author

@Pipul-Pant @awallat @alfaproject @colin0117 please take a look at this #26900 issue related to this one, they provided a test binary you can use to see if the possible fix is working.

ivangabriele added a commit to MTES-MCT/monitorfish that referenced this issue Nov 27, 2023
## Linked issues

- Le downgarde à la version `12.11.0` corrige l'erreur (voir
cypress-io/cypress#26765 (comment)):
```
There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.

TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
    at _._fetchDebuggerURL (<embedded>:2404:524567)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async _._start (<embedded>:2404:523866)
```
- Upgrade de Firefox pour être à jour
- Mise sous silence de l'erreur : `AbortError: The operation was
aborted` qui apparait seulement avec un `reload()` sous Cypress
- Ajout d'un script pour tester le comportement d'un flaky test à
répétition


----

- [x] Tests E2E (Cypress)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests