Skip to content

[🐛 Bug]: Chrome driver prints unwanted logs in the console even with minimal logging setup ("DevTools listening on ws...", "WARNING: All log messages before absl...") #16117

@paularnaud2

Description

@paularnaud2

Description

I am creating this new issue as follow up for this one which I can't add a comment on, and as the issue got worse since then.
In addtition to the "DevTools listening on ws...", I am now getting "WARNING: All log messages before absl..." (see full unwanted logs below)

Regarding "DevTools listening on ws..."
In the previous feed, it is said to be a Chromium issue. Well I created a Chromium issue and the guys are saying it is on Selenium side.
Chromium issue: https://issues.chromium.org/issues/434633822
Google feedback:
"After discussion with @al...@google.com, I'm closing this as WAI. The log message is generated by the browser process. Whether or not that's forwarded to the end user is a Selenium decision. If Selenium doesn't want to show the raw messages from Chrome, it should just pipe the output somewhere else."

Regarding "WARNING: All log messages before absl..."
This issue suggests that it is something linked with newly introduced AI capabilities which Chrome Driver is somehow relying on.

These unwanted logs create confusion and mess up my clean logs. My users are coming to me asking what are those weird logs and is they being recorded..
Please consider with prio.

Reproducible Code

import time
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options

# Set up Chrome options (optional)
chrome_options = Options()
chrome_options.add_experimental_option("excludeSwitches", ['enable-logging'])
chrome_options.add_argument("--log-level=3")
chrome_options.add_argument("--headless")  # Unwanted logs happen only in headless mode

# Path to your chromedriver executable - download from https://googlechromelabs.github.io/chrome-for-testing/#stable
chromedriver_path = r"C:\Users\paula\Downloads\chromedriver-win64\chromedriver-win64\chromedriver.exe"

# Start ChromeDriver
service = Service(executable_path=chromedriver_path)
driver = webdriver.Chrome(service=service, options=chrome_options)

# Open a website
driver.get("https://www.google.com")

# Keep the browser open for 5 seconds (WARNING log happens)
time.sleep(5)

# Quit driver
driver.quit()

Debugging Logs

DevTools listening on ws://127.0.0.1:55391/devtools/browser/987bfc98-897b-4492-9ae2-47009681f986
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1754033949.575721    6384 voice_transcription.cc:58] Registering VoiceTranscriptionCapability

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!C-pyPython BindingsD-chromeI-defectSomething is not working as intendedI-regressionSomething was working but we "fixed" itOS-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions