cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.95k stars 3.18k forks source link

Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory #29709

Open RslnTylr opened 4 months ago

RslnTylr commented 4 months ago

Test code to reproduce

Basic login test

.gitlab-ci.yml file:

image: node:20.14.0

stages:
    - test

test:
    image: cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1
    stage: test
    script:
        # install dependencies
        - npm ci
        # run Cypress tests
        - npx cypress run --browser chrome
        # - npm install
        # - npm run runHeadless
    tags:
        - shared

package.json file:

 "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },

Cypress Mode

cypress run

Cypress Version

13.9.0

Browser Version

cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1

Node version

node:20.14.0

Operating System

UNIX

Memory Debug Logs

Running with gitlab-runner 16.11.0 (91a27b2a)
  on Platform EKS Runner FY7CgVe2y, system ID: r_xbSm4hFEHvfo
Resolving secrets
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: [MASKED]
Using Kubernetes executor with image cypress/browsers:node-20.9.0-chrome-118.0.5993.88-1-ff-118.0.2-edge-118.0.2088.46-1 ...
Using attach strategy to execute scripts...
Preparing environment
03:13
Using FF_USE_POD_ACTIVE_DEADLINE_SECONDS, the Pod activeDeadlineSeconds will be set to the job timeout: 1h0m0s...
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotInitialized: "containers with incomplete status: [init-permissions]"
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotInitialized: "containers with incomplete status: [init-permissions]"
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Waiting for pod [MASKED]/runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 to be running, status is Pending
    ContainersNotReady: "containers with unready status: [build helper]"
    ContainersNotReady: "containers with unready status: [build helper]"
Running on runner-fy7cgve2y-project-207-concurrent-0-fryfetr2 via gitlab-runner-premium-7575fb5f75-d6l48...
Getting source from Git repository
00:13
Fetching changes with git depth set to 20...
Initialized empty Git repository in /builds/platform/studio/automation/.git/
Created fresh repository.
Checking out 915191cc as detached HEAD (ref is main)...
Skipping Git submodules setup
Executing "step_script" stage of the job script
08:09
$ npm ci
(node:34) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
(node:34) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
(node:34) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [TLSSocket]. Use emitter.setMaxListeners() to increase limit
added 177 packages, and audited 178 packages in 7m
39 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
$ npx cypress run --browser chrome
[STARTED] Task without title.
[FAILED] Cypress verification timed out.
[FAILED] 
[FAILED] This command failed with the following output:
[FAILED] 
[FAILED] /root/.cache/Cypress/13.9.0/Cypress/Cypress --no-sandbox --smoke-test --ping=957
[FAILED] 
[FAILED] ----------
[FAILED] 
[FAILED] [122:0619/134252.807188:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[FAILED] [122:0619/134318.450826:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[FAILED] 
[FAILED] ----------
[FAILED] 
[FAILED] Platform: linux-x64 (Debian - 11.8)
[FAILED] Cypress Version: 13.9.0
Cypress verification timed out.
This command failed with the following output:
/root/.cache/Cypress/13.9.0/Cypress/Cypress --no-sandbox --smoke-test --ping=957
----------
[122:0619/134252.807188:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[122:0619/134318.450826:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
----------
Platform: linux-x64 (Debian - 11.8)
Cypress Version: 13.9.0
Cleaning up project directory and file based variables
00:00
ERROR: Job failed: command terminated with exit code 1

Other

No response

Domi1980 commented 3 months ago

I am also facing a similar Issue. May I support with some informations to make this Issue reproducible?

RslnTylr commented 3 months ago

I was able to resolve this issue by increasing memory:

variables:
  KUBERNETES_MEMORY_LIMIT: "4Gi"
  KUBERNETES_MEMORY_REQUEST: "4Gi"