-
Notifications
You must be signed in to change notification settings - Fork 1.1k
docs: add note in CI overview about how to disable dbus #6274
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
base: main
Are you sure you want to change the base?
Conversation
cypress-documentation
|
Project |
cypress-documentation
|
Branch Review |
docs/disable-dbus-in-docker
|
Run status |
|
Run duration | 04m 20s |
Commit |
|
Committer | Cacie Prins |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
309
|
View all changes introduced in this branch ↗︎ |
UI Coverage
10.86%
|
|
---|---|
|
2482
|
|
3
|
Accessibility
97.21%
|
|
---|---|
|
1 critical
3 serious
4 moderate
0 minor
|
|
28
|
There was a problem hiding this 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:`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:`. |
There was a problem hiding this 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
- From issue cypress-io/cypress#32290
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.
This documentation relates to:
dbus
if it doesdbus
in the official Cypress imagesUltimately,
dbus
error messages are typically a configuration issue - not a bug.