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

fix: make CDP errors non fatal #27709

Merged
merged 4 commits into from Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions cli/CHANGELOG.md
Expand Up @@ -7,6 +7,10 @@ _Released 09/12/2023 (PENDING)_

- Introduce a status icon representing the `latest` test run in the Sidebar for the Runs Page. Addresses [#27206](https://github.com/cypress-io/cypress/issues/27206).

**Bugfixes:**

- Individual CDP errors that occur while capturing data for test replay will no longer prevent the entire run from being available. Addressed in [#27709](https://github.com/cypress-io/cypress/pull/27709).

## 13.0.0

_Released 08/29/2023_
Expand Down
5 changes: 4 additions & 1 deletion packages/server/lib/cloud/protocol.ts
Expand Up @@ -112,7 +112,7 @@ export class ProtocolManager implements ProtocolManagerShape {
await listener(message)
} catch (error) {
if (CAPTURE_ERRORS) {
this._errors.push({ captureMethod: 'cdpClient.on', fatal: true, error, args: [event, message] })
this._errors.push({ captureMethod: 'cdpClient.on', fatal: false, error, args: [event, message] })
} else {
debug('error in cdpClient.on %O', { error, event, message })
throw error
Expand All @@ -137,6 +137,9 @@ export class ProtocolManager implements ProtocolManagerShape {
try {
this._beforeSpec(spec)
} catch (error) {
// Clear out protocol since we will not have a valid state when spec has failed
this._protocol = undefined

if (CAPTURE_ERRORS) {
this._errors.push({ captureMethod: 'beforeSpec', error, args: [spec], runnableId: this._runnableId })
ryanthemanuel marked this conversation as resolved.
Show resolved Hide resolved
} else {
Expand Down