cypress: ERROR:gpu_memory_buffer_support_x11 on GitHub Ubuntu
Current behavior
When Cypress is run using a GitHub Ubuntu runner, an error message related to graphics is shown before Cypress shows “Run Starting”.
The error message contains the following texts:
“ERROR:gpu_memory_buffer_support_x11.cc(44)” “dri3 extension not supported.”
for example:
[1866:0212/100011.310930:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
The error message is output independently of the browser selected, e.g. Electron, Chrome and Firefox on a GitHub runner where debug logs show cypress:cli Starting Xvfb.
No error messages are shown in Ubuntu 22.04 running under VMware Workstation 17 Pro, nor using Ubuntu 22.04 running in Microsoft WSL2 under Windows 11 Pro. In these cases Xvfb is not started (debug log shows cypress:cli Cypress will not spawn own Xvfb).
Desired behavior
If the graphics error listed above does not affect the running of Cypress then their output should be suppressed. The messages can otherwise be misleading for troubleshooting.
The error message is similar to others which are classified as “garbage warnings” in https://github.com/cypress-io/cypress/blob/develop/cli/lib/exec/spawn.js and which are filtered out by that module.
Test code to reproduce
- cypress-io/github-action as reference
- https://github.com/MikeMcC399/gpu-error-test/blob/master/.github/workflows/gpu-test-base.yml
- https://github.com/MikeMcC399/gpu-error-test/blob/master/.github/workflows/gpu-test-env.yml with workaround applied
Cypress Version
First reported on Cypress 12.5.1
Issue continues to be reproducible on 13.1.0
Node version
v16.16.0 => v20.5.0
Operating System
Ubuntu on GitHub: ubuntu-20.04 and ubuntu-22.04
Debug Logs
See https://github.com/MikeMcC399/gpu-error-test/actions/workflows/gpu-test-base.yml
Other
Related issues are:
Workaround
If Cypress tests are failing and the cause is unclear it may be useful to rule out any gpu error by making sure that the gpu error described here does not occur.
To prevent the gpu error, add
env:
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu'
to the GitHub workflow and use a browser other than the default Electron browser.
Edit: reworked issue
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 18
- Comments: 33 (20 by maintainers)
Commits related to this issue
- ustc-3866: try workaround to fix test? https://github.com/cypress-io/cypress/issues/25357 — committed to ustaxcourt/ef-cms by mmarcotte 10 months ago
This issue is no longer reproducible in Cypress 13.2.0.
According to the Changelog:
21.0.0to25.8.0, which updates bundled Chromium from106.0.5249.51to114.0.5735.289. Additionally, the Node version binary has been upgraded from16.16.0to18.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.
Workaround
Add
to the GitHub workflow. The result is that the error message
disappears for any selected browser except Electron. For Electron the error message is output at a later stage.
A partial explanation is that with no environment variable
ELECTRON_EXTRA_LAUNCH_ARGSdefined, the error message is output at a pre-browser selection stage when the built-in Electron browser is running. Adding the environment variable stops Electron trying to use the gpu at this point.According to Configure browser environment, which shows how to pass an environment variable when a browser is launched, it says “This option is not supported when targeting Electron”, so presumably this is the reason that
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu'is having no effect later when Electron has been specifically selected to run as browser.I reinstated a repro repo at https://github.com/MikeMcC399/gpu-error-test
The remaining error in the electron browser case with full debug logging enabled is shown at:
https://github.com/MikeMcC399/gpu-error-test/actions/runs/4155772179/jobs/7189104496#step:3:1110
Agree with the comment ^. This error randomly fails our pipeline and it is time consuming the run the steps again.
@lmiller1990
I have never seen it blocking a test, I have however seen the error quoted by multiple people as being the reason for their test failing, since it is often the last error message which is thrown before the point where users are expecting Cypress to run.
Addressing this issue would help users with an error condition to be able to focus on what the real error might be. So it’s a bit more than just a “quality of life” bug. Also it is easily reproducible and it shows up on everybody’s test runs.
So I do believe you ought to be putting some priority on fixing it.
I also see this when running Ubuntu in Github. Routing this to the e2e team to let them determine how they want to handle this.
The error message only seems to be displayed when Cypress pulls in Xvfb (virtual framebuffer X server for X Version 11) in a virtual environment where there is otherwise no X11 server available.
If https://github.com/cypress-io/cypress/issues/19868 were to be resolved, then it would probably stop the error message from appearing for at least Chromium type browsers.
Related issues
Related documentation
Continuous integration > Introduction > Running headless tests without Xvfb
I agree this is pretty confusing, I have a feeling pipelines are failing for other reasons, which we are either incorrect suppressing or not surfacing. Since this is the last warning people see, they assume it’s related (could be, but might be a red herring).
I see (at least) two issues to solve:
This issue is for suppressing the warning (point 2), let’s track that here. If you have a failing pipeline and you can reproduce it in a minimal fashion and believe it’s related (point 1), please make a new issue and reference this one, we can help fix it, and hopefully add a better error handling around whatever issue is found.
I also see this when running Ubuntu 22.04 running via Azure Pipelines
Confirmed issue is fixed in 13.2.0
Suggestion
Add the error message
to the filtered-out Xvfb “garbage warnings” in
https://github.com/cypress-io/cypress/blob/develop/cli/lib/exec/spawn.js
The error message occurs on GitHub Ubuntu runners when Cypress spawns the Xvfb driver (virtual framebuffer X server for X Version 11). Cypress does not spawn
Xvfbon Windows nor on macOS runners.As far as I was able to research this topic, Xvfb does not include support for DRI (Direct Rendering Infrastructure). The error is always logged when running Cypress on Ubuntu on GitHub, and on some other CI providers, except notably CircleCI. It does not appear to be detrimental to running Cypress tests.
Other similar garbage errors are already filtered out:
https://github.com/cypress-io/cypress/blob/f383ae329f116b713fb30c76f9f3ee3d5890f327/cli/lib/exec/spawn.js#L15-L47
@lmiller1990
I’m now a little confused, as the link you quoted (https://github.com/seleniumbase/SeleniumBase/issues/1384) seemed to be about a different error message, and the original post here already contained a workaround suggestion
ELECTRON_EXTRA_LAUNCH_ARGS: '--disable-gpu'.If there is no bug fix possible for Cypress to stop the error message being output, then I would suggest adding it to the documentation on https://docs.cypress.io/ with an explanation about what the error message means, why it occurs and how to prevent it occurring on an individual basis.
Unfortunately, although I have been able to reproduce it together with the workaround on https://github.com/MikeMcC399/gpu-error-test/actions, my understanding is not deep enough to be able to document it further with confidence.
What is the actual problem? If it’s just some text, I don’t think there’s anything to do - it’s just telling you about your environment.
If you really don’t like the warning, you can probably disable it. I googled for about 10 seconds and found: https://github.com/seleniumbase/SeleniumBase/issues/1384
Seems a common issue in many other tools, eg selenium https://github.com/seleniumbase/SeleniumBase/issues/1384 / PW https://github.com/microsoft/playwright/issues/15907
Anything for us to do here? I don’t think so, Cypress should not be swallowing warnings - if anything, that would make debugging more confusing.
@andrii-lundiak
@bilarallen
If you think the above error message needs to be investigated, then I suggest you open a new issue, since this most likely has a different root cause. You might also want to Google this error message.
In https://github.com/cypress-io/cypress/issues/23641#issuecomment-1433895681 there is a comment from @lmiller1990 asking if anybody had run with
DEBUG=cypress:*for your issue. It would certainly make sense for somebody encountering this error to open a separate issue here.Hello, I’m also encountering this when running parallel test in Jenkins
Before the execution run starts, this error
[1993:0313/103123.349474:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.displays on every parallel stageAnd during the run this error
[2162:0313/103202.872609:ERROR:gl_utils.cc(319)] [.WebGL-0x1590041ac600]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixelsrandomly displayHere’s additional info: Cypress version: 12.7.0 CI: Jenkins Docker image: cypress/base:14.16.0 Browser: Electron 106
@mysticdevx
That corresponds to my original post that reported the issue on Cypress
12.5.1and confirmed that it is still reproducible on Cypress12.7.0. You can use the workaround in the original post for Chrome, but it doesn’t help with Electron.I will post in #23641
@lmiller1990
I have deleted it. As you say, it is easy to reproduce.
I revisited it and I find that with Cypress 12.2.0 and
ubuntu-20.04orubuntu-22.04the error:is no longer shown and I assume this is due to updates in the GitHub runners.
With Cypress 12.5.1 the error message:
is however still being displayed, so this issue remains valid.
I think you can delete it, the repro is basically: run Cypress on Ubuntu on CI. Thanks!