Skip to content

Connection with Chrome DevTools Protocol is interrupted after a spec file is processed #27

@vCaisim

Description

@vCaisim

The CDP is used to inspect the browser launched by Cypress in order to collect the browser console logs. The project uses chrome-remote-interface, the recommended node module.

Cypress gives the opportunity to connect to the browser from the setupNodeEvents function by listening to before:browser:launch (https://docs.cypress.io/api/plugins/browser-launch-api).

Here is the implementation.

The issue:

After running npx cypress run --browser chrome, the CDP is connected, but after processing the first spec - it disconnects.

Image

Currently, the CPD is reconnecting before each spec - https://github.com/currents-dev/cypress-debugger/blob/feat/console-messages/packages/plugin/src/install.ts#L93.

Why the CDP is disconnecting after each spec file?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions