Closed fanshyiis closed 4 years ago
Receiving this issue as well constantly always, I can still use cypress okay but nonetheless the error keeps coming in console
Using WSL 2 (Ubuntu 1804) + mobaXterm (X-Server)
I'm not entirely sure this is a Cypress issue instead of something isolated to the docker container.
Have you tried our docker images https://github.com/cypress-io/cypress-docker-images or made sure that you have all system dependencies installed required for cypress?
Hi,
You can see the same error in this CI job execution: https://akvo.semaphoreci.com/jobs/1be15282-d440-40da-9932-7f245d4b48a6#L452
The actual test finished successfully but the dbus error is there.
We're using a container based on the latest cypress/included:3.8.1
https://github.com/akvo/akvo-dockerfiles/blob/9f9bb5317ebbca14972424b074792f9dd0eb785c/lumen-e2e-test/Dockerfile#L3
Any hints are more than welcome
The errors are shown when ELECTRON_ENABLE_LOGGING=true
environment variable is set. The tests pass successfully.
A minimum sample system that shows this error. It's using the published Docker image cypress/included:3.8.1
https://github.com/iperdomo/cypress-docker-test
In Cypress documentation site you can find the same error message:
If you use a Linux host you expose the /var/run/dbus/system_bus_socket
socket to the container and the errors go away. Disclaimer: Not entirely sure what security problems this "solution" brings.
See: https://github.com/iperdomo/cypress-docker-test#fixing-the-errors
@iperdomo It also explains in the docs that these errors are fine if Cypress launches successfully.
Note: verbose Electron logging might show warnings that still allow Cypress to work normally. For example, the Cypress Test Runner opens normally despite the scary output below:
You can safely ignore the dbus error if your tests are executing fine.
In the case of WSL, I think this is because WSL doesn't do any system startup, so there isn't a system dbus process running!
I fixed this by added sudo dbus-daemon --system &> /dev/null
to my .bashrc
, based on what I found here: https://github.com/Microsoft/WSL/issues/2941
Having this issue. Is @matchu 's solution best or is there a better fix?
the issue is still persistent . Is there any workaround to get is working . I tried using cypress clean cache and then reinstalling it with yarn but it still shows the same error message 😖
Here is some information about my machine 💁♂️ :
Node Version : 14.18.2 Yarn Version : 1.22.17 OS: Ubuntu 20.04.3 LTS (Focal Fossa) Cypress package version: 9.1.1 Cypress binary version: 9.1.1 Electron version: 15.2.0 Bundled Node version: 16.5.0
Hi team, happening here as well, both using cypress run
and the official docker image:
$ docker run -ti \
-v $(pwd)/cypress:/tmp/project \
-w /tmp/project \
cypress/included:9.1.1
[19:1217/115259.028519:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[19:1217/115259.032036:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
[19:1217/115259.037345:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
[178:1217/115259.085612:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
$ cypress run
It looks like this is your first time using Cypress: 9.1.1
✔ Verified Cypress! /home/vs/.cache/Cypress/9.1.1/Cypress
Opening Cypress...
[194:1217/115424.620771:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[194:1217/115424.625402:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[194:1217/115424.625457:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[356:1217/115424.656528:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
We have tried to hide those logs without success using what is told in the docs:
$ ELECTRON_ENABLE_LOGGING=false cypress run
[409:1217/120217.982611:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[409:1217/120217.986901:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[409:1217/120217.986943:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[566:1217/120218.010931:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
It isn't good for us to show logs with an ERROR
level so it would be great if the issue is reopened and some investigations are performed. Or maybe there is a safe way to hide those logs.
Thanks in advance. Don't hesitate to ask for whatever you need, happy to help with it.
Same here, with Cypress 9.2 running Chrome 97 headless on Ubuntu 18.04.6, all dependencies installed.
npx cypress run --spec "integration/smoke/*" --config video=false --reporter junit --reporter-options "mochaFile=results/test-output-[hash].xml,toConsole=true" --headless --browser chrome
[32441:0107/132541.367106:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[32441:0107/132541.367258:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[32612:0107/132541.417021:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
I'm getting the same error with the basic recommended GitHub Action:
name: Cypress Tests
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cypress run
uses: cypress-io/github-action@v2
with:
build: npm run build
start: npm start
browser: chrome
env:
MAPBOX_API_KEY: test
> nuxt start
[1734:0118/073854.766031:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[1734:0118/073854.766109:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[1922:0118/073854.781764:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
Same issue as ^ in Github Actions, but I am using the cypress container image:
cypress/browsers:node16.13.0-chrome95-ff94
Same issue here running on CircleCI with image cypress/base:16.13.2
. Also tried with cypress/included:9.4.1
same issue, tests runs fine locally but on CircleCI some tests fail.
Same issue as ^ in Github Actions, but I am using the cypress container image:
cypress/browsers:node16.13.0-chrome95-ff94
Maybe it helps someone, managed to solve the issue by running the application and Cypress tests in a single run
section in Github Actions. Not sure why but it worked before even in separate run
sections:
- name: Run App & Cypress
run: |
yarn ci-start & # run app in background
npx -y wait-on DOMAIN_OF_APP --timeout 300000 &&
yarn cypress:ci
After upgrading Cypress I've seen this same issue. It works fine locally but not when running on AWS CodeBuild on their Standard v5 images.
Running into this as well. Tests that pass locally fail in Circle CI, intermittently, and also seeing the dbus errors
Edit: If the dbus errors aren't related to intermittent fails, they still raise an eyebrow if anything goes wrong...
Still not working! dbus-daemon
solution does not help either :(
Docker image: cypress/included:9.2.0
dbus-daemon --system &> /dev/null
cypress open --config baseUrl=http://localhost:3000
cypress_1 | dbus-daemon[8]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": No such file or directory
cypress_1 | [20:0302/135232.286048:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
cypress_1 | [20:0302/135232.296052:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
cypress_1 | [20:0302/135232.296220:ERROR:bus.cc(392)] Failed to connect to the bus: Address does not contain a colon
It may or may not be relevant, but I found a single test (one to do with testing a stubbed window.print
in an iframe) was responsible for it not exiting properly. When I removed that test (I couldn't find a fix for it), the CI tests completed correctly despite still showing the error bus message.
Mine does not wort, I do see cypress poping up and just die instantly. I have multiple error thrown I don't even know which one is relevant neither how to fix it :(
To be honest I just tried multiple things nothing works :( in comparison I can run playwright webkit from docker without issue
I'm now running into this w/ the latest Cypress (v9.5.1) in GitHub actions with the recommended setup.
This ticket is marked as closed but is there something being done about this or are we supposed just to downgrade? (Haven't had these issues w/ any previous version, been running actively w/ latest versions for over a year.)
Same as @Uninen, just running on Azure DevOps in Docker containers (Ubuntu 20.04). Locally (Windows 10, Chrome Headless) no issues.
I'm seeing a similar error on WSL2 using Ubuntu 20 after installing latest Cypress 9.5.2, running on Node 14 LTS:
Opening Cypress...
[15034:0315/221126.886778:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[15034:0315/221126.886995:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[15213:0315/221126.912017:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
[15034:0315/221127.203895:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[15034:0315/221127.237355:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
^C[15034:0315/221150.336298:ERROR:connection.cc(66)] X connection error received.
Hi @jennifer-shehane, could anyone take a look at this issue, please? I commented some months ago but it is still closed. We know cypress is working well despite the error, however, it would be great having a way to hide those confusing messages, don't you think?
To be perfectly clear, at least for me this is an actual bug in the failing my tests in CI and there's no workaround sense, it's not just some random error messages (which I get in dev and frankly I couldn't give a s*it if the actual tests still work).
It's especially bad as this ticket is closed. So if there's no intention to fix it, the only real solution seems to be to start converting tests for Playwright :(
I wanted to write a follow up to @Uninen's comment.
I just started testing our app with cypress, and it's shocking that running these tests in Github Actions isn't currently possible.
Any feedback from the cypress devs on what this error actually means?
I am using docker compose to launch an electron app and I had the same issue.
I fixed it setting ipc: host
configuration in my docker-compose.yml.
I too am experiencing this issue with v9.1.0. Could we please re-open this ticket?
Also, it looks related to this one https://github.com/cypress-io/cypress-docker-images/issues/555
Guess similar issue wit 9.5.3 HomePC:~/work/ucypress$ npx cypress open [27933:0406/232949.373295:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory [27933:0406/232949.375356:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [27933:0406/232949.375417:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [28132:0406/232949.429745:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is [27933:0406/232949.538334:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") [27933:0406/232949.554525:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
My Cypress tests pass locally, this issue looks to be preventing my tests from passing via CircleCI...
So, this issue is still happening in 2022. I see that this is a "closed" issue, but it is VERY much blocking me. Anyone from the Cypress team want to weigh in?
I was unable to get this error message to disappear, which was causing running Cypress in GitLab CI to fail. I love Cypress, but this bug makes it completely unusable for me in continuous integration right now. :(
node:events:504
throw er; // Unhandled 'error' event
^
Error: spawn ps ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:478:16)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn ps',
path: 'ps',
spawnargs: [ '-A', '-o', 'ppid,pid,stat,comm' ]
}
@groovenectar, what should that link represent? It would be great if you could be a tiny bit more specific.
@groovenectar, what should that link represent? It would be great if you could be a tiny bit more specific.
See the first item in the changelog released yesterday:
https://docs.cypress.io/guides/references/changelog#9-5-4
Updates were made to silence Electron warnings related to being unable to connect to dbus. These errors are normal and expected, and do not result in test failures. Because they are always present when running Electron inside docker containers, it has incorrectly led people to believe it is the root-cause of an error within their test run. By silencing these errors, it will improve the debug experience to allow users to focus on meaningful warning and error messages. Fixed #19299.
Do you have any suggestions for how to debug failures on CI that have no trouble locally? It seems to be a blocker for a lot of people. On 12 Apr 2022, 7:13 PM +0100, Dan Upshaw @.***>, wrote:
@groovenectar, what should that link represent? It would be great if you could be a tiny bit more specific. See the first item in the changelog released yesterday: https://docs.cypress.io/guides/references/changelog#9-5-4 Updates were made to silence Electron warnings related to being unable to connect to dbus. These errors are normal and expected, and do not result in test failures. Because they are always present when running Electron inside docker containers, it has incorrectly led people to believe it is the root-cause of an error within their test run. By silencing these errors, it will improve the debug experience to allow users to focus on meaningful warning and error messages. Fixed #19299. — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Do you have any suggestions for how to debug failures on CI that have no trouble locally?
If your application is authenticated, that can get finicky... would double check the sessions and maybe use the experimental session support... be sure the session is validated
Can try increasing timeouts: https://docs.cypress.io/guides/references/configuration#Timeouts
Here are some general troubleshooting tips including specifying the browser: https://docs.cypress.io/guides/references/troubleshooting#Isolate-the-Problem
I was unable to get this error message to disappear, which was causing running Cypress in GitLab CI to fail. I love Cypress, but this bug makes it completely unusable for me in continuous integration right now. :(
node:events:504 throw er; // Unhandled 'error' event ^ Error: spawn ps ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:283:19) at onErrorNT (node:internal/child_process:478:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12) at onErrorNT (node:internal/child_process:478:16) at processTicksAndRejections (node:internal/process/task_queues:83:21) { errno: -2, code: 'ENOENT', syscall: 'spawn ps', path: 'ps', spawnargs: [ '-A', '-o', 'ppid,pid,stat,comm' ] }
I was having the same issue, and for me, the problem occurred in combination with: start-server-and-test
package.
I was using the custom image provided by cypress: cypress/browsers:node14.17.6-chrome100-ff9
After reading this thread: https://github.com/bahmutov/start-server-and-test/issues/132
I created a custom Dockerfile (see below) and I started using it instead, it solved my problem:
FROM cypress/browsers:node14.17.6-chrome100-ff98
RUN apt-get update && apt-get -y install procps
I'm facing the same errors but Cypress is executing fine with them on my Jenkins (Running without Dockers) and passing all tests as expected
This solved my problem: mkdir -p /var/run/dbus && dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address
. If you are using mac, try this instead mkdir -p /var/run/dbus && dbus-daemon --config-file=/opt/homebrew/share/dbus-1/system.conf --print-address
For details: https://georgik.rocks/how-to-start-d-bus-in-docker-container/
This guide here helped me get rid of the original issue in this thread:
https://docs.cypress.io/guides/getting-started/installing-cypress#Windows-Subsystem-for-Linux
Now I have another issue and I can't seem to find the solution for it.
If it helps, also having it with WSL and cypress v9.7.0
I got this issue too, with WSL2, Ubuntu 22.04 LTS, nodejs 16.15.1, npm 8.12.1, cypress 10.1.0.
Failed to connect to the bus: Failed to connect to socket. Getting this error in Gitpod after
# use Cypress provided image with all dependencies included
FROM cypress/included:10.1.0
RUN node --version
RUN npm --version
RUN echo " node version: $(node -v) \n" \
"npm version: $(npm -v) \n" \
"yarn version: $(yarn -v) \n" \
"debian version: $(cat /etc/debian_version) \n" \
"Chrome version: $(google-chrome --version) \n" \
"Firefox version: $(firefox --version) \n" \
"git version: $(git --version)
I am running a puppeteer instance on docker and it was failing on launch because of $DISPLAY not set not X server installed. Personally i am on macos but these explanations helped me understand the problem. However, in puppeteer if you don't need any mouse or keyboard actions, the solution to this failing is to set headless: true
For my case, it was caused by the fact that the service was not started.
service dbus start
I am running a puppeteer instance on docker and it was failing on launch because of $DISPLAY not set not X server installed. Personally i am on macos but these explanations helped me understand the problem. However, in puppeteer if you don't need any mouse or keyboard actions, the solution to this failing is to set headless: true
This was helpful
When I'm running in a docker environment When you launch cypress Always report dbus error