An error message is output when closing the Cypress Runner using the runner menu although there was no test running.
We detected that the electron tab running Cypress tests closed unexpectedly.
We have failed the current spec and aborted the run.
Desired behavior
If the Cypress Runner is closed without aborting any tests, such as by using the runner menu (File > Close Window), then no error message should be output.
Test code to reproduce
Execute
mkdir cy-closing
cd cy-closing
git init
npm init -y
npm install cypress
npx cypress open --e2e --browser electron
Select Continue
In Cypress Runner select File > Close Window
Note error message:
We detected that the electron tab running Cypress tests closed unexpectedly.
We have failed the current spec and aborted the run.
Cypress Version
First reported for versions: 13.0.0 through 13.7.1
Also reproducible on: 13.14.2
Node version
v20.11.1v20.17.0 LTS
Operating System
Ubuntu 22.04.4 LTS
Debug Logs
cypress:server:browsers:electron close fired on the BrowserWindow { browserWindowUrl: 'http://localhost:33217/__/' } +12s
cypress:server:browsers:electron closed event fired +6ms
cypress:server:windows error removing all extensions { err: TypeError: Object has been destroyed at Object.j (<embedded>:4291:111741) at BrowserWindow.<anonymous> (<embedded>:4291:125370) at Object.onceWrapper (node:events:629:26) at BrowserWindow.emit (node:events:526:35), extensions: undefined } +29s
cypress:server:browsers browser instance exit event received { code: undefined, signal: undefined } +10s
cypress:server:browsers:electron closing remote interface client { options: {} } +1ms
cypress:server:browsers:cri-client closing cri client { closed: false, target: 'BE5D0EC6AE749684900A400BC823B24D' } +12s
cypress:server:browsers:browser-cri-client Target.targetDestroyed { event: { targetId: 'BE5D0EC6AE749684900A400BC823B24D' }, closing: true, closed: false, resettingBrowserTargets: false } +12s
cypress:server:browsers:cri-client not closing, cri client is already closed { closed: true, target: 'BE5D0EC6AE749684900A400BC823B24D' } +23ms
cypress:server:browsers:cri-client closed cri client { closed: true, target: 'BE5D0EC6AE749684900A400BC823B24D' } +4ms
cypress:server:browsers:cri-client closing cri client { closed: false, target: 'ws://127.0.0.1:44319/devtools/browser/8e4ecb82-0413-4e70-9dbc-85b1f4070961' } +3ms
cypress:server:browsers:cri-client closed cri client { closed: true, target: 'ws://127.0.0.1:44319/devtools/browser/8e4ecb82-0413-4e70-9dbc-85b1f4070961' } +7ms
cypress:server:util:socket_allowed allowed socket closed, removing { localPort: 60652 } +5s
cypress:server:browsers:browser-cri-client browser websocket did not close, page was closed { targetId: 'BE5D0EC6AE749684900A400BC823B24D' } +512ms
We detected that the electron tab running Cypress tests closed unexpectedly.
We have failed the current spec and aborted the run.
Current behavior
An error message is output when closing the Cypress Runner using the runner menu although there was no test running.
Desired behavior
If the Cypress Runner is closed without aborting any tests, such as by using the runner menu (File > Close Window), then no error message should be output.
Test code to reproduce
Execute
Select Continue In Cypress Runner select File > Close Window
Note error message:
Cypress Version
First reported for versions:
13.0.0
through13.7.1
Also reproducible on:13.14.2
Node version
v20.11.1
v20.17.0
LTSOperating System
Ubuntu
22.04.4
LTSDebug Logs
Other
12.7.4
.