skip to Main Content

I have updated my Ubuntu (23.04, kernel Linux 6.2.0-32-generic) and Chrome (117), and cypress run command in a headless mode with a Chrome browser is not working now.
There were no problems when I use Chrome v115.

I try to run this command: yarn cypress run --headless --browser chrome --spec path/to/mytest.spec.js and getting an error:

Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:205:27)
 {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
}

I will be grateful for the any answer or advice, thank you!

Environment:
Ubuntu: 23.04, Linux 6.2.0-32-generic
Cypress: v6.8.0
Chrome: v117
NodeJS: 18.16.1
NVM: v0.39.3

2

Answers


  1. Try using --headless=new flag instead. https://developer.chrome.com/articles/new-headless/
    As off 117 an old Cypress experiences the ECONNRESET error while connecting to the chrome in the old headless mode.
    However Cypress now starts lots of chrome processes which keeps running after the Cypress id closed. It even hangs my workstation when is launched locally.

    Login or Signup to reply.
  2. This issue is caused by a bug in Chromium 117 which affects Chrome 117.
    It is also logged as Cypress issue 27804 which lists different workarounds.

    One of the workarounds listed in the Cypress issue is to update to a Cypress version > 12.14.0. The other workarounds are more targeted to non-legacy versions of Cypress >= 10.0.0. The Cypress 6.8.0 version you are using belongs to the legacy versions of Cypress so not all of the workarounds may apply exactly.

    The bug is already fixed in Chromium Canary 119 and they have said it will be released to the stable channel, so the other option is to wait for a fix to Chrome to be rolled out.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search