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

Headless mode execution issue on Chrome read ECONNRESET Error: read ECONNRESET at TCP.onStreamRead #27833

Closed
zubairrshahidd opened this issue Sep 18, 2023 · 3 comments
Labels
type: duplicate This issue or pull request already exists

Comments

@zubairrshahidd
Copy link

Current behavior

On running the following command, I am getting an error for the Chrome browser.

npx cypress run --browser chrome --spec "cypress/e2e/canvasObjectsPlacement.cy.js"

It works fine on Electron and Brave browsers.

Screenshot 2023-09-18 at 9 58 14 PM [Cypress-issue-logs.zip](https://github.com/cypress-io/cypress/files/12651490/Cypress-issue-logs.zip)

Desired behavior

No response

Test code to reproduce

Code I am using

it('should pass', () => {
cy.visit('https://example.com');
});

Cypress Version

Cypress package version: 13.1.0 (also tested with 10.11.0)

Node version

v16.14.0

Operating System

macOS 13.3.1 (22E261

Debug Logs

zip file is added in comment

Other

No response

@MikeMcC399

This comment was marked as outdated.

@MikeMcC399
Copy link
Contributor

┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Cypress: 10.11.0 │
│ Browser: Chrome 117 (headless) │
│ Node Version: v16.14.0 (/usr/local/bin/node) │
│ Specs: 1 found (canvasObjectsPlacement.cy.js) │
│ Searched: cypress/e2e/canvasObjectsPlacement.cy.js │
└────────────────────────────────────────────────────────────────────────────────────────────────┘


```text
  cypress:launcher:browsers launching browser { browser: { name: 'chrome', family: 'chromium', channel: 'stable', displayName: 'Chrome', version: '117.0.5938.88', path: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', minSupportedVersion: 64, majorVersion: '117', isHeadless: true, isHeaded: false }, url: 'about:blank' } +0ms
  cypress:launcher:browsers spawning browser with args { args: [ 'about:blank', '--test-type', '--ignore-certificate-errors', '--start-maximized', '--silent-debugger-extension-api', '--no-default-browser-check', '--no-first-run', '--noerrdialogs', '--enable-fixed-layout', '--disable-popup-blocking', '--disable-password-generation', '--disable-single-click-autofill', '--disable-prompt-on-repos', '--disable-background-timer-throttling', '--disable-renderer-backgrounding', '--disable-renderer-throttling', '--disable-backgrounding-occluded-windows', '--disable-restore-session-state', '--disable-new-profile-management', '--disable-new-avatar-menu', '--allow-insecure-localhost', '--reduce-security-for-testing', '--enable-automation', '--disable-print-preview', '--disable-device-discovery-notifications', '--autoplay-policy=no-user-gesture-required', '--disable-site-isolation-trials', '--metrics-recording-only', '--disable-prompt-on-repost', '--disable-hang-monitor', '--disable-sync', '--disable-web-resources', '--safebrowsing-disable-download-protection', '--disable-client-side-phishing-detection', '--disable-component-update', "--simulate-outdated-no-au='Tue, 31 Dec 2099 23:59:59 GMT'", '--disable-default-apps', '--use-fake-ui-for-media-stream', '--use-fake-device-for-media-stream', '--disable-ipc-flooding-protection', '--disable-backgrounding-occluded-window', '--disable-breakpad', '--password-store=basic', '--use-mock-keychain', '--disable-dev-shm-usage', '--user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36', '--proxy-server=http://localhost:56281', '--disable-web-security', '--allow-running-insecure-content', '--proxy-bypass-list=<-loopback>', '--headless', '--window-size=1280,720', '--force-device-scale-factor=1', '--remote-debugging-port=56288', '--remote-debugging-address=127.0.0.1', '--user-data-dir=/Users/ebricks/Library/Application Support/Cypress/cy/production/browsers/chrome-stable/run-14593', '--disk-cache-dir=/Users/ebricks/Library/Application Support/Cypress/cy/production/browsers/chrome-stable/run-14593/CypressCache' ] } +0ms
  cypress:launcher:browsers chrome stderr: [0918/215420.086162:WARNING:crash_report_exception_handler.cc(235)] UniversalExceptionRaise: (os/kern) failure (5) +262ms
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

You should not see this issue if you update to Cypress 12.15.0 or later.

Note that Node.js 16 has reached end-of-life and only Node.js 18 and 20 are currently supported.

@nagash77
Copy link
Contributor

Hi @zubairrshahidd I agree with @MikeMcC399 that the issue you are seeing is a duplicate. Can you try the work arounds listed in #27804 and see if those help? I am going to close this issue as a duplicate at this point. If you find evidence that this is a separate problem please comment back here and we can reopen.

@nagash77 nagash77 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2023
@nagash77 nagash77 added the type: duplicate This issue or pull request already exists label Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants