Skip to content

[web] Filter non-fatal Chromium D-Bus error lines from Chrome stderr - #190669

Open
mdebbar wants to merge 5 commits into
flutter:masterfrom
mdebbar:fix-chrome-dbus-address
Open

[web] Filter non-fatal Chromium D-Bus error lines from Chrome stderr#190669
mdebbar wants to merge 5 commits into
flutter:masterfrom
mdebbar:fix-chrome-dbus-address

Conversation

@mdebbar

@mdebbar mdebbar commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

This PR updates the Chrome launcher environment setup in flutter_tools, devicelab, and web_ui (felt) on Linux.

When running headless Chrome tests in a Linux container or VM without a desktop environment, Chromium attempts to connect to the D-Bus system daemon (for things like desktop notifications and system themes) and prints benign but annoying error logs to stderr when it fails (e.g. ERROR:dbus/bus.cc, Failed to connect to the bus).

This PR filters out these non-fatal D-Bus connection error messages emitted by Chromium. This follows the industry standard pattern used by other open source projects to filter out stderr noise in E2E tests (e.g., exocortex).

Related Issues

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 6, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request configures the DBUS_SESSION_BUS_ADDRESS environment variable to unix:path=/dev/null when launching Chromium on Linux if it is missing, empty, or set to /dev/null. Feedback on the changes suggests refactoring to avoid duplication: specifically, removing the redundant kChromeLinuxArgs constant in the tests in favor of kChromeArgs, and extracting the duplicated environment setup logic in chrome.dart into a shared private helper getter.

Comment thread packages/flutter_tools/test/web.shard/chrome_test.dart Outdated
Comment thread packages/flutter_tools/test/web.shard/chrome_test.dart Outdated
Comment thread packages/flutter_tools/test/web.shard/chrome_test.dart Outdated
Comment thread engine/src/flutter/lib/web_ui/dev/chrome.dart Outdated
Comment thread engine/src/flutter/lib/web_ui/dev/chrome.dart Outdated
@mdebbar mdebbar changed the title Set valid DBUS_SESSION_BUS_ADDRESS syntax in Chrome launchers [web] Set valid DBUS_SESSION_BUS_ADDRESS syntax in Chrome launchers Aug 6, 2026
@mdebbar
mdebbar force-pushed the fix-chrome-dbus-address branch from 31a2b73 to 5a4c9b5 Compare August 6, 2026 19:19
@mdebbar mdebbar changed the title [web] Set valid DBUS_SESSION_BUS_ADDRESS syntax in Chrome launchers Filter out non-fatal Chromium D-Bus error lines from Chrome stderr output Aug 6, 2026
@mdebbar mdebbar changed the title Filter out non-fatal Chromium D-Bus error lines from Chrome stderr output [web] Filter non-fatal Chromium D-Bus error lines from Chrome stderr Aug 6, 2026
@github-actions github-actions Bot added tool Affects the "flutter" command-line tool. See also t: labels. engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team labels Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-web Web applications specifically team-web Owned by Web platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant