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

13.3.3 - Runtime.addBinding will not run as the target browser or tab CRI connection has crashed on CI #28142

Open
nemonemi opened this issue Oct 25, 2023 · 6 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this v13.3.3 🐛

Comments

@nemonemi
Copy link

Current behavior

Running:  that-and-that/test.spec.ts                (2 of 42)
Runtime.addBinding will not run as the target browser or tab CRI connection has crashed
Error: Runtime.addBinding will not run as the target browser or tab CRI connection has crashed
    at Object.send (<embedded>:4454:77362)
    at p.init (<embedded>:4479:24685)
    at async c.attachCDPClient (<embedded>:4479:22437)
    at async Object.connectToNewSpec (<embedded>:4460:47715)
    at async Object.connectToNewSpec (<embedded>:4460:26591)
    at async v.relaunchBrowser (<embedded>:4526:36627)
From previous event:
    at c (<embedded>:4526:129552)
    at B (<embedded>:4526:130051)
    at <embedded>:4526:136750
    at async runEachSpec (<embedded>:4526:135866)

Desired behavior

This should not be occurring, and the test should be normally passing on CI, as it does locally.

Test code to reproduce

I have no special test code for this use case.

Cypress Version

13.3.2

Node version

v18.15.0

Operating System

Ubuntu 22.04.3

Debug Logs

What exactly to print out? The debug log is waaaaay too large.

Other

No response

@JackHowa
Copy link

yeah this causes --browser chrome flag to break for us. Removing the flag allows users to use cypress locally. this did not break in the cloud interestingly for us

I'd rec that cypress deprecates 13.3.3. could not replicate the bug on 13.3.2.

@jennifer-shehane
Copy link
Member

@JackHowa @nemonemi That narrows it down if it's only in 13.3.3. It's strange this isn't happening for more people. Do you have an example of a run we could run to recreate this?

@jennifer-shehane jennifer-shehane added v13.3.3 🐛 stage: needs investigating Someone from Cypress needs to look at this labels Nov 28, 2023
@villelahdenvuo
Copy link

Happening to us also with 13.6.2. First there is this disconnect:

WebSocket connection closed
Error: WebSocket connection closed
    at _._handleConnectionClose (<embedded>:2466:579841)
    at A.<anonymous> (<embedded>:2466:577905)
    at Object.onceWrapper (node:events:628:26)
    at A.emit (node:events:513:28)
    at A.emitClose (<embedded>:2466:558129)
    at Socket.W (<embedded>:2466:565440)
    at Socket.emit (node:events:513:28)
    at TCP.<anonymous> (node:net:322:12)

And it tries to run another test suite and crashes:

  Running:  public-storefront/general/fault-page.ts                                       (19 of 30)
Runtime.addBinding will not run as browser CRI connection was reset
Error: Runtime.addBinding will not run as browser CRI connection was reset
    at Object.send (<embedded>:4454:45789)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async p.init (<embedded>:4479:26922)
    at async c.attachCDPClient (<embedded>:4479:24682)
    at async Promise.all (index 0)
    at async c.attachCDPClient (<embedded>:4479:24718)
    at async Object.connectToNewSpec (<embedded>:4460:48402)
    at async Object.connectToNewSpec (<embedded>:4460:27007)
    at async v.relaunchBrowser (<embedded>:4526:36742)
DEBU[2024-01-30T10:11:08Z] A non-zero exit code was returned. This is expected if there are test failures. 

@qashre
Copy link

qashre commented May 28, 2024

Happened also in 13.7.2 version

it doesnot happen often, we see this error once in a while in pipelines, not sure why it happens though

Runtime.enable will not run as browser CRI connection was reset

Error: Runtime.enable will not run as browser CRI connection was reset
    at Object.send (/root/.cache/Cypress/13.7.2/Cypress/resources/app/packages/server/lib/browsers/cri-client.js:236:47)
    at Function.init (/root/.cache/Cypress/13.7.2/Cypress/resources/app/packages/socket/lib/cdp-socket.js:123:9)
    at CDPSocketServer.attachCDPClient (/root/.cache/Cypress/13.7.2/Cypress/resources/app/packages/socket/lib/cdp-socket.js:26:27)
    at Object.connectToNewSpec (/root/.cache/Cypress/13.7.2/Cypress/resources/app/packages/server/lib/browsers/chrome.js:370:9)
    at Object.connectToNewSpec (/root/.cache/Cypress/13.7.2/Cypress/resources/app/packages/server/lib/browsers/index.js:107:9)
    at OpenProject.relaunchBrowser (/root/.cache/Cypress/13.7.2/Cypress/resources/app/packages/server/lib/open_project.js:152:24)

Desired behavior
This should not be occurring, and the test should be normally passing on CI, as it does locally.

Test code to reproduce
I have no special test code for this use case.We see that one of the FE cypress jobs suddenly fails due to this error.

Cypress Version and tests run in Chromium browser
13.7.2

Node version
v20.9.0

We run Cypress in Docker images.

@sam-odetoyinbo
Copy link

I am getting the same issue in Jenkins pipeline

No target with given id found
Error: No target with given id found
    at <embedded>:2466:519827
    at _._handleMessage (<embedded>:2466:521860)
    at A.<anonymous> (<embedded>:2466:521673)
    at A.emit (node:events:513:28)
    at g.U (<embedded>:2466:506953)
    at g.emit (node:events:513:28)
    at g.dataMessage (<embedded>:2466:487328)
    at <embedded>:2466:486860
    at <embedded>:2466:478182
    at <embedded>:2466:479134
    at afterWrite (node:internal/streams/writable:500:5)
    at onwrite (node:internal/streams/writable:480:7)
    at Zlib.<anonymous> (node:internal/streams/transform:190:7)
    at Zlib.processCallback (node:zlib:613:8)
Runtime.addBinding will not run as browser CRI connection was reset
Error: Runtime.addBinding will not run as browser CRI connection was reset
    at Object.send (<embedded>:4454:78001)
    at async p.init (<embedded>:4479:24677)
    at async c.attachCDPClient (<embedded>:4479:22437)
    at async Object.connectToNewSpec (<embedded>:4460:47715)
    at async Object.connectToNewSpec (<embedded>:4460:26591)
    at async v.relaunchBrowser (<embedded>:4526:36627)

Cypress version
13.3.2

Node version
v20.14.0

@lukpsaxo
Copy link

We get this intermittantly and have done for quite some time. No webconnect error for us, just:

Runtime.enable will not run as browser CRI connection was reset
Error: Runtime.enable will not run as browser CRI connection was reset
    at m.send (<embedded>:2753:67730)
    at async p.init (<embedded>:2791:26891)
    at async m.attachCDPClient (<embedded>:2791:24682)
    at async Object.connectToNewSpec (<embedded>:2759:49662)
    at async Object.connectToNewSpec (<embedded>:2759:27174)
    at async v.relaunchBrowser (<embedded>:2844:37695)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this v13.3.3 🐛
Projects
None yet
Development

No branches or pull requests

7 participants