Skip to content

Conversation

cacieprins
Copy link
Contributor

Additional details

With Cypress 15, we cleaned up how we filter data that gets streamed to stderr. Unfortunately, some of the previously filtered (benign) error messages slip through in certain situations. This is especially noticeable in Cypress' own CI, where we launch cypress from source rather than via the built binary.

One of these classes of error messages relate to Electron trying to connect to dbus. Dbus is an IPC system typically used for desktop related operations, like the system tray, notifications, and so forth. CI environments do not typically have dbus, nor do they need it.

This PR prevents Electron from trying to connect to dbus by explicitly disabling it via an environment variable, when a CI environment is detected.

Steps to test

Verify that the driver e2e tests on this PR do not write dbus error messages to the console in CI.

How has the user experience changed?

PR Tasks

cursor[bot]

This comment was marked as outdated.

Copy link

cypress bot commented Sep 12, 2025

cypress    Run #65560

Run Properties:  status check passed Passed #65560  •  git commit 256c7f7ff8: test?
Project cypress
Branch Review fix/silence-dbus-errors
Run status status check passed Passed #65560
Run duration 17m 52s
Commit git commit 256c7f7ff8: test?
Committer Cacie Prins
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 2
Tests that did not run due to a developer annotating a test with .skip  Pending 28
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 791
View all changes introduced in this branch ↗︎
UI Coverage  61.84%
  Untested elements 27  
  Tested elements 47  
Accessibility  99.02%
  Failed rules  0 critical   3 serious   1 moderate   0 minor
  Failed elements 19  

@@ -143,6 +144,11 @@ const spawnModule = {
args.unshift(process.env.CYPRESS_INTERNAL_DEV_DEBUG)
}

if (ci.isCI) {
debug('disabling dbus in CI')
stdioOptions.env.DBUS_SESSION_BUS_ADDRESS = 'disabled:'
Copy link
Contributor

Choose a reason for hiding this comment

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

I wish we had a different way to verify this in the current branch than just the snapshot value. We can also add a test once #32416 makes its way into develop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's hold off on a merge here until #32416 , at which point I'll amend this pr with a test

@MikeMcC399
Copy link
Contributor

If the fix only applies to CI, then it should not close #32290, since this also describes the garbage error occurring in Cypress Docker images, when used locally (not in CI).

cursor[bot]

This comment was marked as outdated.

@cacieprins cacieprins marked this pull request as draft September 16, 2025 14:58
@cacieprins cacieprins changed the title fix: silence dbus errors in CI fix: silence dbus errors in CI / Docker Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple ERROR:dbus messages
3 participants