Skip to content

Conversation

cacieprins
Copy link
Contributor

This documentation relates to:

Ultimately, dbus error messages are typically a configuration issue - not a bug.

Copy link

cypress bot commented Sep 15, 2025

cypress-documentation    Run #666

Run Properties:  status check passed Passed #666  •  git commit dd98d31c44: add note in CI overview about how to disable dbus
Project cypress-documentation
Branch Review docs/disable-dbus-in-docker
Run status status check passed Passed #666
Run duration 04m 20s
Commit git commit dd98d31c44: add note in CI overview about how to disable dbus
Committer Cacie Prins
View all properties for this run ↗︎

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

Copy link
Contributor

@AtofStryker AtofStryker left a comment

Choose a reason for hiding this comment

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

Should this go into the release branch?


This error message indicates that Electron is attempting to connect to `dbus`, a desktop environment service, when there is no `dbus` present.

Cypress does its best to detect non-interactive shells and disable `dbus` by setting the `DBUS_SESSION_BUS_ADDRESS` environment variable to `disabled:`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Cypress does its best to detect non-interactive shells and disable `dbus` by setting the `DBUS_SESSION_BUS_ADDRESS` environment variable to `disabled:`.
Cypress attempts to detect non-interactive shells and disable `dbus` by setting the `DBUS_SESSION_BUS_ADDRESS` environment variable to `disabled:`.

Copy link
Contributor

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

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

This doesn't work as described using Cypress 15.2.0

Test code to reproduce

git clone --branch 32290-dbus-errors/cy-15  https://github.com/MikeMcC399/cypress-docker-images
cd cypress-docker-images
cd examples/basic         # Use a pre-configured simple Cypress E2E project
npm ci                    # Install Cypress
docker run -it --rm -v .:/app -w /app cypress/base  # Run image as container

At the bash prompt :/app# enter the following commands:

export DBUS_SESSION_BUS_ADDRESS='disabled:' # as advised by https://github.com/cypress-io/cypress-documentation/pull/6274
npx cypress install       # Install Cypress binary into running Docker container
npx cypress run           # Run Cypress test

Logs

$ docker run -it --rm -v .:/app -w /app cypress/base  # Run image as container
root@a2beddb963af:/app# export DBUS_SESSION_BUS_ADDRESS='disabled:' # as advised by https://github.com/cypress-io/cypress-documentation/pull/6274
npx cypress install       # Install Cypress binary into running Docker container
npx cypress run           # Run Cypress test

[05:53:53]  Verifying Cypress can run /root/.cache/Cypress/15.2.0/Cypress [started]
[05:53:55]  Verifying Cypress can run /root/.cache/Cypress/15.2.0/Cypress [COMPLETED]
[258:0916/055355.288036:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[258:0916/055355.784269:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[258:0916/055355.784379:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[258:0916/055355.785423:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[258:0916/055355.785476:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[258:0916/055355.785487:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[258:0916/055355.785502:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[258:0916/055355.785518:ERROR:dbus/object_proxy.cc:590] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:

DevTools listening on ws://127.0.0.1:44397/devtools/browser/8a1f16cb-f0ff-477c-84e7-89c555fea87a

====================================================================================================

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        15.2.0                                                                         │
  │ Browser:        Electron 136 (headless)                                                        │
  │ Node Version:   v22.19.0 (/usr/local/bin/node)                                                 │
  │ Specs:          1 found (spec.cy.js)                                                           │
  │ Searched:       cypress/e2e/**/*.cy.{js,jsx,ts,tsx}                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


────────────────────────────────────────────────────────────────────────────────────────────────────

  Running:  spec.cy.js                                                                      (1 of 1)
[258:0916/055357.322957:ERROR:dbus/bus.cc:408] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")


  test local demo page
    ✓ heading (182ms)


  1 passing (217ms)


  (Results)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        1                                                                                │
  │ Passing:      1                                                                                │
  │ Failing:      0                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     0 seconds                                                                        │
  │ Spec Ran:     spec.cy.js                                                                       │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘


====================================================================================================

  (Run Finished)


       Spec                                              Tests  Passing  Failing  Pending  Skipped
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ ✔  spec.cy.js                               220ms        1        1        -        -        - │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘
    ✔  All specs passed!                        220ms        1        1        -        -        -

Ultimately, dbus error messages are typically a configuration issue - not a bug.

This is a difficult stance to take, given that the dbus error messages are a regression from Cypress 14 and for this previous version no special external configuration was necessary.

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.

3 participants