diff --git a/packages/server/lib/browsers/electron.js b/packages/server/lib/browsers/electron.js index c3ae8e95297c..a81e894b7fd8 100644 --- a/packages/server/lib/browsers/electron.js +++ b/packages/server/lib/browsers/electron.js @@ -65,7 +65,7 @@ const _getAutomation = async function (win, options, parent) { // workaround: start and stop screencasts between screenshots // @see https://github.com/cypress-io/cypress/pull/6555#issuecomment-596747134 if (!options.onScreencastFrame) { - await sendCommand('Page.startScreencast', screencastOpts) + await sendCommand('Page.startScreencast', screencastOpts()) const ret = await fn(message, data) await sendCommand('Page.stopScreencast') @@ -117,7 +117,7 @@ const _maybeRecordVideo = async function (webContents, options) { } }) - await webContents.debugger.sendCommand('Page.startScreencast', screencastOpts) + await webContents.debugger.sendCommand('Page.startScreencast', screencastOpts()) } module.exports = { diff --git a/packages/server/lib/modes/record.js b/packages/server/lib/modes/record.js index 30d19ce7f24d..48a4681e431b 100644 --- a/packages/server/lib/modes/record.js +++ b/packages/server/lib/modes/record.js @@ -784,6 +784,8 @@ const createRunAndRecordSpecs = (options = {}) => { }) if (response === responseDidFail) { + debug('`responseDidFail` equals `response`, allowing browser to hang until it is killed: Response %o', { responseDidFail }) + // dont call the cb, let the browser hang until it's killed return }