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 crash with "There was an error reconnecting to the Chrome DevTools protocol" #26900

Closed
StefanoBalzarottiNozomi opened this issue Jun 1, 2023 · 43 comments · Fixed by #27128
Assignees

Comments

@StefanoBalzarottiNozomi
Copy link

StefanoBalzarottiNozomi commented Jun 1, 2023

Current behavior

Cypress in version 12.12 and version 12.13, randomly crash with the following error

There was an error reconnecting to the Chrome DevTools protocol.
Please restart the browser.

Also reported in stackoverflow [https://stackoverflow.com/questions/76302675/cypress-there-was-an-error-reconnecting-to-the-chrome-devtools-protocol/76371091#76371091] and reproduced by different users.

Resolved downgrading to version 12.11

Desired behavior

Cypress should not crash

Test code to reproduce

Any test

Cypress Version

12.12 / 12.13

Node version

18.4.0

Operating System

MacOs 12.5 / Ubuntu 20.04.6 LTS

Debug Logs

No response

Other

No response

@nagash77
Copy link
Contributor

nagash77 commented Jun 1, 2023

Hi @StefanoBalzarottiNozomi Right now there doesn't seem to be enough information to reproduce the problem on our end. Unless we receive a reliable reproduction, we'll eventually have to close this issue until we can reproduce it. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.

Please provide a reproducible example of the issue you're encountering. Here are some tips for providing a Short, Self Contained, Correct, Example and our own Troubleshooting Cypress guide.

Forking Cypress Test Tiny makes sharing a reproducible example easier to share and easier for our engineers to replicate your issues. This method also keeps the reproduction as simple as possible, which helps us eliminate potential causes and noise from the investigation.

@nagash77 nagash77 self-assigned this Jun 1, 2023
@rbell-mfj
Copy link

Have run into this several times since upgrading to Cypress 12.12. Once it happened 5m42s into a test run, another time 7m6s in. May not be reproducible with a minimal example.

We are running cypress in a GitHub Actions runner as follows:

action: cypress-io/github-action@v5

startup output from cypress:

Cypress:        12.12.0
Browser:        Electron 106 (headless)
Node Version:   v16.16.0 (/home/runner/runners/2.304.0/externals/node16/bin/node)

@mrcrch
Copy link

mrcrch commented Jun 6, 2023

We faced this too. On both local and CI (CircleCI) environments
The solution was downgrade to 12.11.0

Cypress:        12.13.0
Browser:        Electron 106 (headless)
Node Version:   v18.16.0 (/usr/local/bin/node)

@StefanoBalzarottiNozomi
Copy link
Author

Sorry, I can't find a reproducible test case, I don't think it depends by the kind of test, because the error happens randomly with any test.
What I can say is that happens like after +10 min of execution, so I think it's not reproducible with a small test suite like Cypress Test Tiny.

Unlucky I can't share my test suite because it contains proprietary code.

Maybe there is a sort of memory leak, I see the memory increase during test execution, but I am not sure if related.

@nagash77
Copy link
Contributor

nagash77 commented Jun 7, 2023

Hi @StefanoBalzarottiNozomi , Unfortunately without a reproducible example we will not be able to investigate this any further at this time.

If you suspect memory problems may be causing this issue have you tried using the experimentalMemoryManagement flag? That may help but it is tough to say without being able to reproduce the problem.

I am going to close this issue for now until such time that we have a reproducible example. If you are able to reproduce the problem and share that with us please comment back here and we can reopen the issue.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2023
@nagash77 nagash77 removed their assignment Jun 7, 2023
@beatjost
Copy link

beatjost commented Jun 7, 2023

We also have this lately quite often - cypress test runs became very unstable...

09:52:14  There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.
09:52:14  
09:52:14  TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
09:52:14      at _._fetchDebuggerURL (<embedded>:2460:520933)
09:52:14      at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
09:52:14      at async _._start (<embedded>:2460:520232)

@yarrysmod
Copy link

yarrysmod commented Jun 7, 2023

using cypress 12.13.0, experiencing the same problem as the other posters with cypress run. For us it most notably happened during CI execution through Jenkins, there is no clear pattern as to when it happens but it's somewhen around the middle of the test suites when starting a new test suite fails.

  • 40 test suites, (283 test cases)
  • it runs into that issue after about 20 test suites went through (123 test cases)
  • I've used DEBUG=cypress:server:util:process_profiler flag to check for potential usage issues but the output was similar with a small margin of difference

downgrading it to 12.11.0 seems to have done the trick for now

Cypress: 12.13.0
Browser: Electron 106
Node Version: 18.16.0

System specs (I highly doubt it's related to memory constraints, but here goes)

Model Name:	MacBook Pro
Model Identifier:	MacBookPro18,3
Chip:	Apple M1 Pro
Total Number of Cores:	8 (6 performance and 2 efficiency)
Memory:	32 GB

@nagash77
Copy link
Contributor

nagash77 commented Jun 7, 2023

@beatjost and @yarrysmod have you tried using the config flag I mentioned in my previous comment? Memory issues can happen even if the machine is robust like in your case @yarrysmod because chrome limits the amount of memory it can use.

@nagash77
Copy link
Contributor

nagash77 commented Jun 7, 2023

Also if either of you can provide a reproducible example demonstrating this behavior it would be extremely useful in debugging this issue.

@yarrysmod
Copy link

@beatjost and @yarrysmod have you tried using the config flag I mentioned in my previous comment? Memory issues can happen even if the machine is robust like in your case @yarrysmod because chrome limits the amount of memory it can use.

yes, experimentalMemoryManagement has been applied along with reducing numTestsKeptInMemory to 10 (at one point I've set it to 0 running it with version 12.13.0, same issue). I've been running the test suites now in our in-house CI, managed to run through consecutively with 12.11.0 like @mrcrch said would address it. I will let you know if I can pinpoint what exact test may contribute to it, it's fairly random currently.

@beatjost
Copy link

beatjost commented Jun 8, 2023

With the experimentalMemoryManagement flag enabled, tests failed immediately...
Afterwards tried also the numTestsKeptInMemory option with value '10'. This worked one run, failed the next again.
Then this error again:

09:32:30  There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.
09:32:30  
09:32:30  TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
09:32:30      at _._fetchDebuggerURL (<embedded>:2460:520933)
09:32:30      at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
09:32:30      at async _._start (<embedded>:2460:520232)

However, we also have some issue as well with the dri3-extension. This is also printend every time, but seems not to affect the test result...

08:50:06  Opening Cypress...
08:50:06  
08:50:06  DevTools listening on ws://127.0.0.1:39497/devtools/browser/f4a1581a-ad88-4d1e-be77-8df3b82e4497
08:50:06  libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
08:50:06  [835:0608/065005.597709:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

@MikeMcC399
Copy link
Contributor

@beatjost

These issues refer to two of the messages you are seeing:

@nagash77
Copy link
Contributor

nagash77 commented Jun 8, 2023

@yarrysmod and @beatjost , if one of you can provide a reproducible example please do comment back here and we can reopen for investigation once we have a path forward.

@hubgit
Copy link

hubgit commented Jun 12, 2023

Would it be possible to re-open this issue? Our CI is failing regularly (but not on every run) with this error.

I can't provide a reproducible example, but I can say that it fails at the same point each time, when trying to start one particular test suite (which may indicate that it's triggered by something in the previous test suite, or something else, I'm not sure).

@nagash77
Copy link
Contributor

@hubgit unfortunately without a reproducible example our engineers do not have enough information to be able to effectively investigate the cause of this specific issue. 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 a reproducible example?

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

Tom-Bonnike commented Jun 14, 2023

This is also happening periodically on one of our test suites. It’s hard to provide a reproducible example for what seems to be a memory leak. I think it's only happening when running tests with Electron, --browser chrome works fine? Maybe I’m just (un)lucky.

If this truly doesn't happen with Cypress v12.11, this PR does look fishy: https://github.com/cypress-io/cypress/pull/26573/files

@nagash77
Copy link
Contributor

@Tom-Bonnike thank you for doing some detective work! That does seem like it is worth investigating further. I am going to reopen and see if we can confirm your suspicion.

@nagash77 nagash77 reopened this Jun 14, 2023
@nagash77 nagash77 assigned mschile and unassigned nagash77 Jun 14, 2023
@mschile
Copy link
Contributor

mschile commented Jun 14, 2023

Hi everyone 👋, I don't think this issue is related to memory. @Tom-Bonnike, I think you are right that #26573 seems suspicious. Since we haven't been able to recreate the issue, would someone be able to run Cypress with the DEBUG logs (DEBUG=cypress:server:browsers*) turned on when the issue happens and post back with the results.

@momesana
Copy link

momesana commented Jun 17, 2023

Just upgraded from Cypress 10.* to the latest version (Cypress 12.14.0) and running into the same issue, both remotely in our CI pipeline and on my local development machine:

14:26:11    Running:  pages/login/loginForm.cy.ts                                                   (15 of 55)
14:26:11  There was an error reconnecting to the Chrome DevTools protocol. Please restart the browser.
14:26:11  
14:26:11  TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')
14:26:11      at _._fetchDebuggerURL (<embedded>:2404:524567)
14:26:11      at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
14:26:11      at async _._start (<embedded>:2404:523866)

@momesana
Copy link

momesana commented Jun 17, 2023

Running the tests with DEBUG=cypress:server:browsers* didn't yield any useful output, so I ran it with DEBUG=cypress:* which of course printed a ton of output. I extracted the piece that pertains to the test that caused the trash this time (test 17 out of 55) and attached it here:
cypress-error.log

@momesana
Copy link

momesana commented Jun 17, 2023

Everytime I run it, I see the RangeError just before the crash:

Invalid time value
RangeError: Invalid time value
at Date.toISOString ()
at :3118:1044560
at a (:3118:1044627)
at :3118:1048155
at Array.forEach () at :3118:1048112 at :3118:1048173 at ChildProcess.exithandler (node:child_process:399:7) at ChildProcess.emit (node:events:527:28) at maybeClose (node:internal/child_process:1092:16)
at Socket. (node:internal/child_process:451:11) at Socket.emit (node:events:527:28)
at Pipe. (node:net:709:12)

@momesana
Copy link

I ran the tests with Cypress versions 12.0.0, 12.8.0, 12.11.0, 12.12.0 and 12.14.0. The first three ran through while the latter two failed so it's likely the issue has been introduced in version 12.12.0.

@nbrdx
Copy link

nbrdx commented Jun 19, 2023

Hello, just want to confirm I also have the same issue on CircleCI, using cypress 12.14.0. Fixed when downgrading to 12.11.0

@mataspetrikas
Copy link

the tests either fail with the error below or the process gets stuck after all the specs are completed.

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)

The set up:

  • Cypress 12.14.0
  • Github Action cypress-io/github-action@v5
  • Node 18.16

@momesana
Copy link

Hi everyone 👋, I don't think this issue is related to memory. @Tom-Bonnike, I think you are right that #26573 seems suspicious. Since we haven't been able to recreate the issue, would someone be able to run Cypress with the DEBUG logs (DEBUG=cypress:server:browsers*) turned on when the issue happens and post back with the results.

Please, see the log I attached to one of my the posts above. I think the invalid time value error is the culprit as it immediately precedes all the crashes I observed in the debug logs

@bilarallen
Copy link

bilarallen commented Jun 20, 2023

@mschile This is the debug logs from our previous run when we were using cypress v.12.12.0

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 }

I have just masked sensitive information in the logs but hoping that from this and other cypress user's logs we can investigate and implement a proper fix for this, as a workaround for now we will stick to working version 12.11.0 and this means we will miss important updates from v.12.12.0 and up. Thanks!

@mschile
Copy link
Contributor

mschile commented Jun 21, 2023

Thanks for the debug logs! I've created a test binary, if someone who can reproduce the issue give the binary a try and see if it fixes the issue.

npm install https://cdn.cypress.io/beta/npm/12.15.1/linux-x64/mschile/issue-26900_browserCriClient-9cbe5805a2344c866d27b38f5f95bec4784db058/cypress.tgz

@yajouahr
Copy link

yajouahr commented Jun 22, 2023

Thanks for the debug logs! I've created a test binary, if someone who can reproduce the issue give the binary a try and see if it fixes the issue.

npm install https://cdn.cypress.io/beta/npm/12.15.1/linux-x64/mschile/issue-26900_browserCriClient-9cbe5805a2344c866d27b38f5f95bec4784db058/cypress.tgz

I tested the binary, but I am getting now the following error for each spec:

PayloadTooLargeError: request entity too large
    at p (<embedded>:2319:1358)
    at s.exports (<embedded>:2319:799)
    at s.exports (<embedded>:2338:1577)
    at <embedded>:2358:2007
    at a.handle_request (<embedded>:2640:1038)
    at d (<embedded>:2655:1285)
    at p.dispatch (<embedded>:2655:1307)
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3353
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at y.handle (<embedded>:2663:4188)
    at o (<embedded>:2663:1048)
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at a.handle_request (<embedded>:2640:1030)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at <embedded>:2463:2495
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at <embedded>:2483:1156
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at <embedded>:4616:80256
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at <embedded>:4616:79931
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at <embedded>:2671:330
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at <embedded>:2679:544
    at a.handle_request (<embedded>:2640:1038)
    at <embedded>:2663:3774
    at <embedded>:2663:3796
    at y.process_params (<embedded>:2663:4284)
    at h (<embedded>:2663:3296)
    at y.handle (<embedded>:2663:4188)
    at T.handle (<embedded>:2735:3475)
    at Server.e (<embedded>:2766:742)
    at Server.<anonymous> (<embedded>:4340:71058)
    at <embedded>:4616:82963
    at Array.map (<anonymous>)
    at q._callRequestListeners (<embedded>:4616:82953)
    at Server.<anonymous> (<embedded>:4616:83103)
    at Server.emit (node:events:527:28)
    at parserOnIncoming (node:_http_server:956:12)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)

Is there any specific way to use this binary ?

@mschile
Copy link
Contributor

mschile commented Jun 22, 2023

@yajouahr, no, there isn't a specific way to use the binary. I just tried the binary again locally and was able to successfully run multiple specs. That error doesn't look like it would be related to the test binary. Do you see the same error if you use the released Cypress version 12.15.0?

@WtfJoke
Copy link

WtfJoke commented Jun 22, 2023

Thanks for the debug logs! I've created a test binary, if someone who can reproduce the issue give the binary a try and see if it fixes the issue.

npm install https://cdn.cypress.io/beta/npm/12.15.1/linux-x64/mschile/issue-26900_browserCriClient-9cbe5805a2344c866d27b38f5f95bec4784db058/cypress.tgz

That worked for us 🎉 The issue didnt popped up in the github actions pipeline run using this test binary.

The pipelines failed for versions since 12.12 (including 12.15)

@mschile
Copy link
Contributor

mschile commented Jun 22, 2023

@WtfJoke, thanks for trying out the test binary! I've decided to change the implementation. Would you (or anyone else that can reproduce the issue) be able to give the following new test binary a try:

npm install https://cdn.cypress.io/beta/npm/12.15.1/linux-x64/mschile/issue-26900_browserCriClient-cff88d10e27b12dd0f2fdb9f311d572dadfa5741/cypress.tgz

@bilarallen
Copy link

Hi @mschile

I still encountered the same error using the first test binary you provided #26900 (comment). Will try the latest test binary you provided and see if it still occurs, here's the debug logs for the same error using the first test binary btw. Thanks!

 Running:  dashboard/history/miscCashOutRevertTests.cy.js                                  (3 of 3)
2023-06-22T19:55:40.149Z 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.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscCashOutRevertTests.cy.js' }
2023-06-22T19:55:40.149Z cypress:server:saved_state noop saved state
2023-06-22T19:55:40.150Z cypress:server:browsers:electron received saved state {}
2023-06-22T19:55:40.151Z 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.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscCashOutRevertTests.cy.js', browsers: [ { name: 'electron', channel: 'stable', family: 'chromium', displayName: 'Electron', version: '106.0.5249.51', path: '', majorVersion: 106 } ], userAgent: null, proxyUrl: 'http://localhost:34307', proxyServer: 'http://localhost:34307', socketIoRoute: '/__socket', chromeWebSecurity: true, isTextTerminal: true, downloadsFolder: '/tmp/jenkins-b440069f/workspace/core-xxxxxxxxing-frontend-tests-cypress/cypress/downloads', experimentalModifyObstructiveThirdPartyCode: false, experimentalWebKitSupport: false, projectRoot: '/tmp/jenkins-b440069f/workspace/core-xxxxxxxxing-frontend-tests-cypress', shouldLaunchNewTab: true, videoApi: { onError: [Function (anonymous)], videoName: '/tmp/jenkins-b440069f/workspace/core-xxxxxxxxing-frontend-tests-cypress/cypress/videos/dashboard/history/miscCashOutRevertTests.cy.js.mp4', compressedVideoName: '/tmp/jenkins-b440069f/workspace/core-xxxxxxxxing-frontend-tests-cypress/cypress/videos/dashboard/history/miscCashOutRevertTests.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-4961', 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-06-22T19:55:40.151Z cypress:lifecycle:EventRegistrar plugin event registered? { eventName: 'before:browser:launch', isRegistered: false }
2023-06-22T19:55:40.151Z cypress:server:browsers:electron launching browser window to url: https://xxxxxxxx.xxxxxxxx.xxxxxxxx.cloud/__/#/specs/runner?file=cypress/e2e/UI/dashboard/history/miscCashOutRevertTests.cy.js
2023-06-22T19:55:40.163Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 47116 }
2023-06-22T19:55:40.163Z cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 47088 }
2023-06-22T19:55:40.164Z cypress:server:socket-base socket-disconnecting transport close
2023-06-22T19:55:40.164Z cypress:server:socket-base socket-disconnect transport close
2023-06-22T19:55:40.166Z 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>:2404:510044) at A.send (<embedded>:2404:505370) at _._enqueueCommand (<embedded>:2404:525846) at <embedded>:2404:523361 at new Promise (<anonymous>) at _.send (<embedded>:2404:523335) at k.send [as sendDebuggerCommandFn] (<embedded>:4557:77430) at _.<anonymous> (<embedded>:4557:50879) at _.emit (node:events:527:28) at _._handleMessage (<embedded>:2404:525699) at A.<anonymous> (<embedded>:2404:525307) at A.emit (node:events:527:28) at g.U (<embedded>:2404:510587) at g.emit (node:events:527:28) at g.dataMessage (<embedded>:2404:490962) at <embedded>:2404:490494 at <embedded>:2404:481816 at <embedded>:2404:482768 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-06-22T19:55:40.166Z cypress:server:browsers:cri-client disconnected, attempting to reconnect... { closed: false }
2023-06-22T19:55:40.167Z cypress:server:browsers:cri-client connecting { target: '7C5A3DDE115AE2991B61D02F0312F5A1' }
2023-06-22T19:55:40.174Z cypress:server:cypress exiting with err 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) {
  isCypressErr: true,
  type: 'CDP_COULD_NOT_RECONNECT',
  details: "TypeError: Cannot read properties of undefined (reading 'webSocketDebuggerUrl')\n" +
    '    at _._fetchDebuggerURL (<embedded>:2404:524567)\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
    '    at async _._start (<embedded>:2404:523866)',
  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>:2404:524567)
      at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async _._start (<embedded>:2404:523866),
  stackWithoutMessage: '    at _._fetchDebuggerURL (<embedded>:2404:524567)\n' +
    '    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
    '    at async _._start (<embedded>:2404:523866)',
  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>:2404:524567)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async _._start (<embedded>:2404:523866)
2023-06-22T19:55:40.175Z cypress:server:cypress calling exit 1
2023-06-22T19:55:40.175Z cypress:server:cypress about to exit with code 1
2023-06-22T19:55:40.183Z cypress:server:browsers killing browser process
2023-06-22T19:55:40.229Z cypress:proxy:http:util:prerequests metrics: { browserPreRequestsReceived: 666, proxyRequestsReceived: 244, immediatelyMatchedRequests: 69, unmatchedRequests: 0, unmatchedPreRequests: 358 }
2023-06-22T19:55:40.351Z cypress:cli child event fired { event: 'exit', code: 1, signal: null }
 WARNING  Cypress runner failed with message: "Could not find Cypress test run results"
 WARNING  The following spec files will be marked as failed: 
 - /tmp/jenkins-b440069f/workspace/core-xxxxxxxxing-frontend-tests-cypress/cypress/e2e/UI/general-ledger/tickets/normal/revokeManualNormalGlTicketsTests.cy.js
 - /tmp/jenkins-b440069f/workspace/core-xxxxxxxxing-frontend-tests-cypress/cypress/e2e/UI/dashboard/transactions/miscBatchCheckDepositToxxxxxxxxTests.cy.js
 - /tmp/jenkins-b440069f/workspace/core-xxxxxxxxing-frontend-tests-cypress/cypress/e2e/UI/dashboard/history/miscCashOutRevertTests.cy.js

  Reporting results and artifacts in background...  

2023-06-22T19:55:40.365Z cypress:cli child event fired { event: 'close', code: 1, signal: null }

@nathan5x
Copy link

nathan5x commented Jun 23, 2023

I'm also getting the same error message while running cypress run

Error Details

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)

Environment Details

Cypress:        12.15.0
Browser:        Electron 106 (headless) 
Node Version:   v16.18.1

System Details

MacBook Pro 16inch - M1 Chip
RAM 32 GB

Did anyone else get success in resolving this issue?

@mschile
Copy link
Contributor

mschile commented Jun 23, 2023

@nathan5x, could you try running with the above test binary and report back with your results.

@nathan5x
Copy link

@nathan5x, could you try running with the above test binary and report back with your results.

@mschile
I tried the beta build (12.15.1), and it worked without issues. Definitely faster than 9.5.3.

Would you be able to publish this soon? What's the timeline for this to be available as an npm package and in Docker Hub?

Thanks!

@yajouahr
Copy link

yajouahr commented Jun 26, 2023

@yajouahr, no, there isn't a specific way to use the binary. I just tried the binary again locally and was able to successfully run multiple specs. That error doesn't look like it would be related to the test binary. Do you see the same error if you use the released Cypress version 12.15.0?

@mschile
Yes it seems I have the same behavior with 12.15.0 release. I tested with 12.14.0 and had no issues. Is it a known issue ?

@WtfJoke
Copy link

WtfJoke commented Jun 26, 2023

@WtfJoke, thanks for trying out the test binary! I've decided to change the implementation. Would you (or anyone else that can reproduce the issue) be able to give the following new test binary a try:

npm install https://cdn.cypress.io/beta/npm/12.15.1/linux-x64/mschile/issue-26900_browserCriClient-cff88d10e27b12dd0f2fdb9f311d572dadfa5741/cypress.tgz

With the 2nd binary the error from this issue doesn't appear.
However another issue, which looks like more of a test assert issue (haven't verified that its a cypress issue), pops up. Need to verify that.

@nathan5x
Copy link

nathan5x commented Jun 26, 2023

12.14.0 crashed for me for the same reasons. 12.13.0 went through, but some tests failed.

However, I am excited and looking forward to the official release 12.15.1.

@mike-plummer
Copy link
Contributor

Fyi for anyone following this issue - we released Cypress v12.16.0 today, but the fix being worked by @mschile above was not included despite the "12.15.1" version number. That is just a placeholder value and is not a guarantee of what version it might be released in.

@vitaliy4us
Copy link

I have this issue for Cypress 12.13 after removing Cypress Dashbord --record --key from the cypress:run script

@StefanoBalzarottiNozomi
Copy link
Author

if you can provide a mac os package I can test it. I can't deploy an unstable version on CI. Maybe I'll try it on a VM if you need.

@bilarallen
Copy link

Confirmed working test binary npm install https://cdn.cypress.io/beta/npm/12.15.1/linux-x64/mschile/issue-26900_browserCriClient-9cbe5805a2344c866d27b38f5f95bec4784db058/cypress.tgz the issue no longer exist using this one. Looking forward to this fix being included in the next official version release of Cypress. Cheers! 🎉

@mschile mschile linked a pull request Jul 5, 2023 that will close this issue
1 task
@mschile mschile closed this as completed Jul 5, 2023
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jul 6, 2023

Released in 12.17.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.17.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jul 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.