Open MikeMcC399 opened 1 year ago
The message DevTools listening on ws://127.0.0.1
is not always output.
On a clean install of Ubuntu 22.04.2 LTS with only the default Firefox browser installed, I am not seeing it.
On Windows 11 with latest Google Chrome and Firefox installed, I am however seeing it.
GitHub is also consistently showing it.
Fix for issue: https://github.com/cypress-io/cypress/issues/15932 was released in 12.12.0 with PR https://github.com/cypress-io/cypress/pull/26573.
This may be the cause of this message.
The message is also mentioned in https://developer.chrome.com/articles/new-headless/#debugging
@MikeMcC399 so, Oct-2023, did you find out the way how to disable or suppress that "DevTools listening on" message?
My point is that if I run Cypress v13.3.0
(relying on Electron v114
) running on NodeJS v18.17.1
on CI and locally on WSL/Ubuntu, it's 100% headless mode, so I will not reach a GUI anyway so why should 1) use software for devtool/debugging and 2) why should I have that output?.
Your answer/comment above gave me hint that if any other browsers installed besides Electron than issues doesn't exist. My Ubuntu is basic ubuntu-latest
on Azure CI pipeline space, and I don't have any browsers there like Chrome or FireFox.
And I would also expect that some env variable should help me to disable it, like ELECTRON_EXTRA_LAUNCH_ARGS='--andrii-asks-electron-engine-to-not-use-dev-tools'
. Do you think it's even possible?
@andrii-lundiak
This is not my area of expertise, so we'd need some further input from Cypress experts, such as @warrensplayer.
The explanation of the message is in
https://developer.chrome.com/articles/new-headless/#debugging
as already mentioned in https://github.com/cypress-io/cypress/issues/26753#issuecomment-1599375196.
This could be covered in the Cypress documentation with a comment about whether to ignore it or not. If it can be used for additional debugging in a Cypress environment, then the documentation could describe this as well.
Can we reopen this issue? We run cypress in Octopus Deploy (which executes within Windows Powershell) This "devtools running" is written to the console as a warning and therefore the step is never marked as completed successfully, even when all cypress tests run successfully - which is frustrating. We have tried a number of work arounds with no success.
Cypress makes the browser calls and should add an option to control this setting in the browser. It really should be off by default and opt in via a setting or flag?
@Daniel-Spindler-Mandalay
I have re-opened this issue. I suggest you log also a separate new issue for your special case with Octopus Deploy.
There is a good case to suppress the message when running in CI if it is causing workflow issues:
DevTools listening on ws://127.0.0.1
The message occurs independently of the browser under test (Electron, Chrome, Firefox, Edge, etc.).
Run the script via powershell (before it was via cmd), it worked for me ! 😄
Run the script via PowerShell (before it was via cmd), it worked for me ! 😄
@carlos-nevesaraujo could you please elaborate? I am running using Windows Powershell and I still receive the devtools listening output to standard error and it is quite frustrating. Are you using PowerShell Core?
Can you reproduce the error and then the fix?
Current behavior
When Cypress is run (
open
,run
or through Module API) a message similar to the following is output to the console:Desired behavior
The message "DevTools listening on ws://127.0.0.1" should not be output when Cypress is run.
If it is not avoidable, then document the change to the user experience in the CHANGELOG for 12.12.0 or elsewhere.
Test code to reproduce
See logs https://github.com/cypress-io/cypress-example-kitchensink/actions/workflows/single.yml?query=branch%3Amaster
Cypress Version
First reported on Cypress
12.12.0
This is new behavior which did not occur on12.11.0
Still occurs on Cypress13.14.2
.Node version
18.16.1
andv20.15.0
Operating System
Ubuntu 22.04
Debug Logs
See https://github.com/MikeMcC399/gpu-error-test/actions/workflows/gpu-test-base.yml
Other
It seems to be related to Chrome DevTools Protocol (cdp). Using Chrome DevTools Protocol > Protocol Fundamentals says:
Protocol Fundamentals
When Chromium is started with a
--remote-debugging-port=0
flag, it starts a Chrome DevTools Protocol server and prints its WebSocket URL to STDERR. The output looks something like this: