Skip to content
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

"libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)" on GitHub Docker #27741

Closed
MikeMcC399 opened this issue Sep 4, 2023 · 6 comments
Labels
Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Sep 4, 2023

Current behavior

When Cypress is run in a Cypress Docker container cypress/browsers or cypress/included running under a GitHub-hosted runner then the following errors are logged:

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[372:0902/151204.979108:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

Both the above two error log lines may be classed as "garbage warnings".

This issue is concerned only with the libva error.

The ERROR:gpu_memory_buffer_support_x11.cc(44) / dri3 extension not supported error is separately covered in the issue #25357.

Desired behavior

No libva error should be output in a GitHub-hosted runner using a Cypress Docker container.

GitHub-hosted runners do not provide a GPU (Graphics Processing Unit). libva is an implementation for VA-API (Video Acceleration API) and where there is no GPU, there can be no video acceleration.

If Cypress is invoking Xvfb (X virtual framebuffer) because there is no X11 server available, then it should not expect to have video acceleration available. If possible, it should disable attempting to use video acceleration and if this is not possible then related libva errors should be ignored and suppressed.

Note also that the workaround of adding the following environment variable has no effect on the libva error although it does prevent the dri3 error appearing for browsers other than Electron:

env:
  ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu'

Test code to reproduce

Simplest example to illustrate issue

name: Test Docker
on: workflow_dispatch
jobs:
  docker-browsers:
    runs-on: ubuntu-22.04
    container: cypress/browsers:latest
    steps:
      - uses: actions/checkout@v3
      - run: npm ci
      - run: npx cypress run

Full workflow examples on:

Cypress Version

13.1.0

Node version

20.5.0

Operating System

Ubuntu 22.04

Debug Logs

Run npx cypress run --browser chrome
  npx cypress run --browser chrome
  shell: bash --noprofile --norc -e -o pipefail {0}
  env:
    ELECTRON_EXTRA_LAUNCH_ARGS: --disable-gpu
[STARTED] Task without title.
[SUCCESS] Task without title.
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

DevTools listening on ws://127.0.0.1:43839/devtools/browser/947cc01e-1b84-4851-9d1e-aff6eeab2594

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

  (Run Starting)

  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Cypress:        13.1.0                                                                         │
  │ Browser:        Chrome 114 (headless)                                                          │
  │ Node Version:   v20.5.0 (/usr/local/bin/node)                                                  │
  │ Specs:          1 found (spec.cy.js)                                                           │
  │ Searched:       cypress/e2e/**/*.cy.{js,jsx,ts,tsx}                                            │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘

Full debug logs

see GitHub workflows above

Other

Related issues

@nagash77 nagash77 added the Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. label Sep 5, 2023
@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Sep 5, 2023

The issue is also reproducible without GitHub Actions running a Cypress Docker cypress/included:latest container locally in WSL2:

Using Xvfb

docker run -it -v $PWD:/e2e -w /e2e --entrypoint cypress cypress/included:latest run --project . --e2e

the same errors are output as when running under GitHub Actions:

DevTools listening on ws://127.0.0.1:41679/devtools/browser/e0ba2916-e56d-4a20-860a-f84be22c1c7f
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[446:0905/154505.922384:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.

Using WSL2/WSLg

Microsoft WSL2 with Windows Subsystem for Linux GUI (WSLg).

Using the WSLg X11 server instead of Xvfb no errors are output:

docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -v /mnt/wslg:/mnt/wslg -e DISPLAY=$DISPLAY -e WAYLAND_DISPLAY=$WAYLAND_DISPLAY -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -e PULSE_SERVER=$PULSE_SERVER -v $PWD:/e2e -w /e2e --entrypoint cypress cypress/included:latest run --project . --e2e

@MikeMcC399
Copy link
Contributor Author

This issue is no longer reproducible in Cypress 13.2.0. According to the Changelog:

  • Upgraded Electron from 21.0.0 to 25.8.0, which updates bundled Chromium from 106.0.5249.51 to 114.0.5735.289.
    Additionally, the Node version binary has been upgraded from 16.16.0 to 18.15.0. This does NOT have an impact on the node version you are using with Cypress and is merely an internal update to the repository & shipped binary.
    Addressed in #27715. Addresses #27595.

Presumably this is the reason for the error message no longer appearing.

alirezamirian added a commit to alirezamirian/jui that referenced this issue Sep 12, 2023
to fix the new weird issue on the CI pipeline:
libva error: va_getDriverName() failed with unknown libva error,driver_name=(null)

cypress-io/cypress#27741
@TahirMehmood8082
Copy link

in cypress 13.6.2

yarn cy:open
yarn run v1.22.19
$ cypress open --project ./spec

DevTools listening on ws://127.0.0.1:43177/devtools/browser/d7dcf78f-4d71-463d-87af-8dc1d7108863
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

@MikeMcC399
Copy link
Contributor Author

@TahirMehmood8082

Are you running in a Cypress Docker container?

@TahirMehmood8082
Copy link

no @MikeMcC399 i did not use Cypress Docker, suddenly it produce this error, how can i check docker by cmd?

@MikeMcC399
Copy link
Contributor Author

@TahirMehmood8082

The issue here is only concerning a Cypress Docker environment and this problem is already resolved, which is why this issue is closed.

I have also seen the error when I run Cypress in Ubuntu under VMware Workstation. In my experience you can ignore the error.

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

If you think that this is a Cypress bug and you want to report it, then I suggest you open a new issue and provide all the requested information, such as your operating system, debug logs, etc.

Cypress Docker is available for instance in GitHub Actions - see Using Docker Images. You can also install it locally (see Docker getting started).

You can also get assistance from the Cypress technical community on Discord

Discord chat (click on button)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team.
Projects
None yet
Development

No branches or pull requests

3 participants