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

Message "DevTools listening on ws://127.0.0.1" #26753

Open
MikeMcC399 opened this issue May 14, 2023 · 10 comments
Open

Message "DevTools listening on ws://127.0.0.1" #26753

MikeMcC399 opened this issue May 14, 2023 · 10 comments
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented May 14, 2023

Current behavior

When Cypress is run (open, run or through Module API) a message similar to the following is output to the console:

DevTools listening on ws://127.0.0.1:37973/devtools/browser/6aaa0851-45ea-4db9-9185-d2e228ef6787

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

npx cypress open

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 on 12.11.0
Still occurs on Cypress 13.7.0.

Node version

18.16.1 and 20.11.0

Operating System

Ubuntu 22.04

2023-05-12T13:42:54.8668087Z Current runner version: '2.304.0'
2023-05-12T13:42:54.8702511Z Ubuntu
2023-05-12T13:42:54.8702775Z 22.04.2
2023-05-12T13:42:54.8703096Z LTS
2023-05-12T13:42:54.8704181Z Image: ubuntu-22.04
2023-05-12T13:42:54.8704559Z Version: 20230507.1
2023-05-12T13:42:54.8705134Z Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230507.1/images/linux/Ubuntu2204-Readme.md
2023-05-12T13:42:54.8705873Z Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230507.1

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:

DevTools listening on ws://127.0.0.1:36775/devtools/browser/a292f96c-7332-4ce8-82a9-7411f3bd280a

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented May 15, 2023

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.

@MikeMcC399 MikeMcC399 changed the title New message "DevTools listening on ws://127.0.0.1" with Cypress 12.12.0 Message "DevTools listening on ws://127.0.0.1" Jun 13, 2023
@warrensplayer
Copy link
Contributor

Fix for issue: #15932 was released in 12.12.0 with PR #26573.

This may be the cause of this message.

@warrensplayer warrensplayer added E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels Jun 20, 2023
@warrensplayer warrensplayer removed their assignment Jun 20, 2023
@MikeMcC399
Copy link
Contributor Author

The message is also mentioned in https://developer.chrome.com/articles/new-headless/#debugging

@andrii-lundiak
Copy link

andrii-lundiak commented Oct 6, 2023

@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?

@MikeMcC399
Copy link
Contributor Author

@andrii-lundiak

This is not my area of expertise, so we'd need some further input from Cypress experts, such as @warrensplayer.

@MikeMcC399
Copy link
Contributor Author

The explanation of the message is in

https://developer.chrome.com/articles/new-headless/#debugging

as already mentioned in #26753 (comment).

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.

@MikeMcC399 MikeMcC399 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 28, 2024
@Daniel-Spindler-Mandalay

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?

@MikeMcC399
Copy link
Contributor Author

@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.).

@MikeMcC399 MikeMcC399 reopened this Apr 5, 2024
@carlos-nevesaraujo
Copy link

Run the script via powershell (before it was via cmd), it worked for me ! 😄

@Daniel-Spindler-Mandalay

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

No branches or pull requests

6 participants