cypress: ECONNRESET on Chrome/Chromium 117.0.5851.0 when using Cypress <12.15.0 or passing`--headless=old` in browser launch options
Latest update:
https://github.com/cypress-io/cypress/issues/27804#issuecomment-1721476731
Current behavior
Right now when running against latest Chrome which released 18 hours ago for linux and max and using --headless=old (because we’re getting browser freezes / unresponsiveness with new headless mode), you get ECONNRESET error code while cypress is trying to connect to headless chrome:
https://app.warp.dev/block/7kDNSkJQ4CtNDhMXPe3CRt
With DEBUG=cypress:server:util:process_profiler:
https://app.warp.dev/block/c2Par9SHLXvmbpt2Edtj90
With DEBUG=cypress:*
https://app.warp.dev/block/cJRcQGlGK0MVSaCHRd0xy9
Of interest:
cypress:launcher:browsers chrome stderr: DevTools listening on ws://*********:62486/devtools/browser/************************************ +163ms
cypress:network:connect successfully connected { opts: { host: '*********', port: 62486, getDelayMsForRetry: [Function: getDelayMsForRetry] }, iteration: 2 } +105ms
cypress:launcher:browsers chrome stderr: [0913/112049.992673:WARNING:crash_report_exception_handler.cc(235)] UniversalExceptionRaise: (os/kern) failure (5) +167ms
read ECONNRESET
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:217:20)
cypress:server:browsers:browser-cri-client error finding browser target, maybe retrying { delay: 100, err: Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:217:20) { errno: -54, code: 'ECONNRESET', syscall: 'read' } } +0ms
cypress:launcher:browsers chrome exited: { code: null, signal: 'SIGSEGV' } +4ms
Desired behavior
Run tests 😃
Test code to reproduce
We have this currently to use the old headless mode and removing it makes it work:
on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
launchOptions.args.push('--headless=old');
}
return launchOptions;
});
Cypress Version
12.17.3
Node version
16.16.0
Operating System
macOS 13.5.1 (22G90) and linux (debian)
Debug Logs
See description.
Other
No response
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Reactions: 30
- Comments: 49 (38 by maintainers)
Commits related to this issue
- test: update test apps to cypress 13 (#28212) Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request... — committed to ionic-team/ionic-framework by liamdebeasi 9 months ago
- [cypress] Work around SIGSEGV in Chrome 117 w/ headless mode The latest Chrome 117 release (now rolled out to GitHub Actions runners) broke interoperability with Cypress <= 12.14 in headless mode. Se... — committed to unflakable/unflakable-javascript by ramosbugs 9 months ago
- [cypress] Work around SIGSEGV in Chrome 117 w/ headless mode The latest Chrome 117 release (now rolled out to GitHub Actions runners) broke interoperability with Cypress <= 12.14 in headless mode. Se... — committed to unflakable/unflakable-javascript by ramosbugs 9 months ago
- Fix gh action cypress image to use chrome 116 Because of errors in the communication between Cypress and Chrome 117+ we need to make sure that we run Chrome 116. This is a temporary solution and we s... — committed to reload/dpl-react by spaceo 9 months ago
- Fix gh action cypress image to use chrome 116 Because of errors in the communication between Cypress and Chrome 117+ we need to make sure that we run Chrome 116. This is a temporary solution and we s... — committed to danskernesdigitalebibliotek/dpl-react by spaceo 9 months ago
- test: update test apps to cypress 13 (#28212) Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request... — committed to ionic-team/ionic-framework by liamdebeasi 9 months ago
- [cypress] Work around SIGSEGV in Chrome 117 w/ headless mode The latest Chrome 117 release (now rolled out to GitHub Actions runners) broke interoperability with Cypress <= 12.14 in headless mode. Se... — committed to unflakable/unflakable-javascript by ramosbugs 9 months ago
- [cypress] Work around SIGSEGV in Chrome 117 w/ headless mode The latest Chrome 117 release (now rolled out to GitHub Actions runners) broke interoperability with Cypress <= 12.14 in headless mode. Se... — committed to unflakable/unflakable-javascript by ramosbugs 9 months ago
- [cypress] Work around SIGSEGV in Chrome 117 w/ headless mode The latest Chrome 117 release (now rolled out to GitHub Actions runners) broke interoperability with Cypress <= 12.14 in headless mode. Se... — committed to unflakable/unflakable-javascript by ramosbugs 9 months ago
- Fixes cypress tests (#521) Updated to cypress >= 12.5.0 per https://github.com/cypress-io/cypress/issues/27804 — committed to theunitedeffort/theunitedeffort.org by trevorshannon 9 months ago
- test: update test apps to cypress 13 (#28212) Issue number: N/A --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request... — committed to ionic-team/ionic-framework by liamdebeasi 9 months ago
- Bumps cypress to v13.2.0 Related to https://github.com/cypress-io/cypress/issues/27804 — committed to jkilzi/assisted-installer-ui by jkilzi 9 months ago
- MGMT-15857: Fix GH actions (Cypress) (#2386) * Bumps cypress-io/github-action@v6 * Bumps cypress to v13.2.0 Related to https://github.com/cypress-io/cypress/issues/27804 — committed to openshift-assisted/assisted-installer-ui by jkilzi 9 months ago
- MGMT-15857: Fix GH actions (Cypress) (#2386) * Bumps cypress-io/github-action@v6 * Bumps cypress to v13.2.0 Related to https://github.com/cypress-io/cypress/issues/27804 — committed to ammont82/assisted-installer-ui by jkilzi 9 months ago
- MGMT-15857: Fix GH actions (Cypress) (#2386) * Bumps cypress-io/github-action@v6 * Bumps cypress to v13.2.0 Related to https://github.com/cypress-io/cypress/issues/27804 — committed to rawagner/facet-lib by jkilzi 9 months ago
- Fix gh action cypress image to use chrome 116 Because of errors in the communication between Cypress and Chrome 117+ we need to make sure that we run Chrome 116. This is a temporary solution and we s... — committed to reload/dpl-react by spaceo 9 months ago
- MGMT-15857: Fix GH actions (Cypress) (#2386) * Bumps cypress-io/github-action@v6 * Bumps cypress to v13.2.0 Related to https://github.com/cypress-io/cypress/issues/27804 — committed to openshift-assisted/assisted-installer-ui by jkilzi 9 months ago
- MGMT-15857: Fix GH actions (Cypress) (#2386) * Bumps cypress-io/github-action@v6 * Bumps cypress to v13.2.0 Related to https://github.com/cypress-io/cypress/issues/27804 — committed to rawagner/facet-lib by jkilzi 9 months ago
- MGMT-15857: Fix GH actions (Cypress) (#2386) * Bumps cypress-io/github-action@v6 * Bumps cypress to v13.2.0 Related to https://github.com/cypress-io/cypress/issues/27804 — committed to openshift-assisted/assisted-installer-ui by jkilzi 9 months ago
- feat: upgrade cypress to 12.15.0 to fix the connection issue https://github.com/cypress-io/cypress/issues/27804 Signed-off-by: SuZhou-Joe <suzhou@amazon.com> — committed to SuZhou-Joe/opensearch-dashboards-functional-test by SuZhou-Joe 8 months ago
If anyone is seeing this issue on Cypress versions 12.14.0 and earlier and can use the
--headless=newflag (which is the default from Cypress version 12.15.0 and afterward), you can tell Chrome to use the option by adding the following to yoursetupNodeEvents:We’re investigating this issue currently.
Just clarifying the issue and who it’s affecting:
cypress runin all OS’s if they are using:--headless=newflag was introduced and is passed by default in 12.15.0.--headless=oldflag.Root cause:
Available workarounds:
--headless=oldfrom your test run.--headedto your test run (note, this may change the behavior of tests).If you are encountering issues with any of these workarounds, please detail those issues and open an issue in GitHub. There are some users reporting hanging with the headless=new flag in Cypress, but we don’t have a way to reproduce that yet and would love to fix that.
We don’t expect Chrome to support the
--headless=oldflag forever, so fixing issues with the--headless=newflag are high priority to us.I can confirm Google Chrome / Chromium Linux 117.0.5938.132 no longer has this issue
On Windows/Mac it is slowly rolling out
GitHub is now rolling out runner-images
20230915-20230918with Chrome, Chromium & Edge117version browsers. Until the roll-out has completed an old version image or a new version image is randomly triggered. It is also possible to see a workflow using different versions for different jobs in the same workflow where there is more than one job triggered.So it is likely that default GitHub Actions workflows with Cypress < version
12.15.0testing against any of the Chromium family browsers will start seeing failures.For workarounds, see previous comments.
Edit: All rollouts updating Chromium family browsers (including Chrome) to
117have reached 100%. If you have a GitHub workflow running with default settings you will certainly be picking up this version. In the meantime a new set of rollouts has started which update to a later117patch level e.g. onubuntu-22.04from117.0.5938.88to117.0.5938.92. (Only macOS 13 beta is lagging behind.)I was able to reproduce the issue outside of Cypress in standalone Chrome. I’ve logged a Chromium bug.
@jennifer-shehane
Same issue here, had to downgrade to 116 version to make it works
GitHub is preparing to roll out browser fixes, for example through:
As further confirmation: I began seeing this exact failure case today with GitHub Actions using Cypress 12.5.1. It would happen on occasion, happening more and more throughout the day, I imagine as the newer Actions rolled out.
Upgrading to Cypress 12.17.0 seems to have fixed it.
According to https://storage.googleapis.com/chromium-find-releases-static/441.html#441de2f21f1d43a751b5f87f5240252654135a76 the fix is now in the pipeline for
117(as commit https://github.com/chromium/chromium/commit/cea8ca443cf76ceb3186e544b332a1b8bf3f3571) and for118(as commit https://github.com/chromium/chromium/commit/83e7d98faed68c98737f52ef021624256adc63a3). It’s already available in the119Canary version.Yes, 119.0.6016.0 Windows x64
I think the title of this issue should be changed to include Chromium since Chrome is not the only chromium browser with this issue
Hi! For 12.4.0 cypress and Chrome 117 the following solution works:
cypress.config.ts
this solution doesn’t work for me:
@MikeMcC399 Thanks, updated my comment to be clearer.
@mschile can you pin this issue?
This is how I explained it in the bug report comments
Thank you @alexsch01 for confirming and following up in the Chromium bug report! I would consider
--headlessnot working as a higher priority regression than if just--headless=olddidn’t work, but I guess that will be up to the Chromium team to prioritize.@MikeMcC399 I tested on my Windows machine with --headless and it has the same issue as --headless=old, I’ll make a new comment on the bug report