diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index a583918ebd33..ce25595a56d1 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -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_ diff --git a/packages/server/lib/cloud/protocol.ts b/packages/server/lib/cloud/protocol.ts index adec482ede01..98163018db0d 100644 --- a/packages/server/lib/cloud/protocol.ts +++ b/packages/server/lib/cloud/protocol.ts @@ -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 @@ -137,8 +137,11 @@ 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 }) + this._errors.push({ captureMethod: 'beforeSpec', fatal: true, error, args: [spec], runnableId: this._runnableId }) } else { throw error }