Skip to content

ECONNRESET on Chrome/Chromium 117.0.5851.0 when using Cypress <12.15.0 or passing--headless=old in browser launch options #27804

@bericp1

Description

@bericp1

Latest update:

#27804 (comment)


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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions