Skip to content

Launching Webkit with docker against localhost throws Error: read ECONNRESET at TCP.onStreamRead #26847

Open
@przemek-domain

Description

@przemek-domain

Current behavior

Setup

  1. experimentalWebKitSupport: true
  2. Docker running (CRA) application on http://server.local:3000
  3. Docker of cypress/base:18.16.0 running tests
  4. Docker bridge network
  5. /etc/hosts contains <app-server-ip> server.local
  6. Playwright version 1.34.2

Current behaviour

When running a test against CI/CD (Jenkins) or locally, I face the following error.

read ECONNRESET
Error: read ECONNRESET
    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)

Desired behavior

I would like Cypress to be able to run WebKit tests against localhost

Test code to reproduce

This repo with minimal setup to reproduce the issue https://github.com/psech/cypress-network-issue

Cypress Version

12.13.0

Node version

18.16.0

Operating System

macOS 13.3.1 arm64 + docker 23.0.5
or
Jenkins agent AWS EC2 c5.9xlarge + docker

Debug Logs

> There was an error creating your issue: body is too long, body is too long (maximum is 65536 characters).

I'm happy to upload logs in a designated place.

Subset

read ECONNRESET�[39m
�[31mError: read ECONNRESET�[39m
�[31m    at TCP.onStreamRead (node:internal/stream_base_commons:217:20)�[39m
  �[31;1mcypress:server:cloud:api �[0mrequest to url: POST https://api.cypress.io/exceptions with params: {"body":{"err":{"name":"Error","message":"read ECONNRESET","stack":"Error: read ECONNRESET\n    at TCP.onStreamRead (node:internal<stripped-path>stream_base_commons:217:20)"},"version":"12.13.0","osName":"linux","osVersion":"Debian - ","osCpus":[{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3385,"times":{"user":8940,"nice":1470,"sys":4660,"idle":778770,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2570,"times":{"user":8860,"nice":510,"sys":4800,"idle":787100,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3197,"times":{"user":5890,"nice":320,"sys":3050,"idle":794120,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3113,"times":{"user":4220,"nice":0,"sys":2440,"idle":796610,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2742,"times":{"user":10340,"nice":0,"sys":2880,"idle":789550,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2173,"times":{"user":18620,"nice":0,"sys":3290,"idle":786200,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2570,"times":{"user":11510,"nice":0,"sys":4410,"idle":787380,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2978,"times":{"user":9140,"nice":0,"sys":2830,"idle":794030,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3187,"times":{"user":5350,"nice":0,"sys":2410,"idle":795860,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3239,"times":{"user":6030,"nice":0,"sys":2870,"idle":794630,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3219,"times":{"user":8820,"nice":0,"sys":4090,"idle":791630,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2772,"times":{"user":5400,"nice":0,"sys":2410,"idle":797540,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3139,"times":{"user":13980,"nice":0,"sys":3500,"idle":787510,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2797,"times":{"user":9910,"nice":0,"sys":2780,"idle":792380,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3214,"times":{"user":6170,"nice":0,"sys":3880,"idle":792910,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3215,"times":{"user":5620,"nice":0,"sys":2140,"idle":796450,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2536,"times":{"user":6500,"nice":0,"sys":2190,"idle":796260,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3302,"times":{"user":6450,"nice":0,"sys":3700,"idle":792290,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2111,"times":{"user":7900,"nice":0,"sys":2750,"idle":793780,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3093,"times":{"user":5840,"nice":510,"sys":1950,"idle":796450,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2559,"times":{"user":13110,"nice":260,"sys":4250,"idle":786530,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2660,"times":{"user":6670,"nice":20,"sys":3030,"idle":795340,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3045,"times":{"user":6930,"nice":0,"sys":2140,"idle":796410,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2497,"times":{"user":6350,"nice":0,"sys":2020,"idle":796600,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3228,"times":{"user":7560,"nice":0,"sys":2480,"idle":795130,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2632,"times":{"user":5200,"nice":0,"sys":1980,"idle":798160,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3220,"times":{"user":6120,"nice":0,"sys":3460,"idle":772650,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3013,"times":{"user":19330,"nice":19860,"sys":9020,"idle":752060,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2639,"times":{"user":4870,"nice":0,"sys":2590,"idle":792080,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3205,"times":{"user":3900,"nice":0,"sys":2800,"idle":794900,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3236,"times":{"user":8330,"nice":0,"sys":2480,"idle":790790,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3218,"times":{"user":5410,"nice":0,"sys":3080,"idle":794600,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2608,"times":{"user":8910,"nice":0,"sys":4090,"idle":791320,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3214,"times":{"user":7370,"nice":0,"sys":2850,"idle":794140,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":3216,"times":{"user":4230,"nice":60,"sys":2280,"idle":798390,"irq":0}},{"model":"Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz","speed":2191,"times":{"user":8930,"nice":0,"sys":3310,"idle":769510,"irq":0}}],"osMemory":{"free":70389166080,"total":73652686848}},"headers":{"x-os-name":"linux","x-cypress-version":"12.13.0"}} and token: undefined

Other

The above setup helps to reproduce the #24704

A place in code I suspect to be involved

/**
* An unhandled `read ECONNRESET` in the depths of `playwright-webkit` is causing the process to crash when running kitchensink on Linux. Absent a
* way to attach to the `error` event, this replaces the global `unhandledException` handler with one that will not exit the process on ECONNRESET.
*/
private suppressUnhandledEconnreset () {
unhandledExceptions.handle((err: NodeJS.ErrnoException) => {
return err.code === 'ECONNRESET'
})
// restore normal exception handling behavior
this.once('exit', () => unhandledExceptions.handle())
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.experiment: webkitIssues when using experimentalWebkitSupporttype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions