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

xvfb-run: error: Xvfb failed to start #5

Open
SimonDanisch opened this issue Mar 16, 2021 · 10 comments
Open

xvfb-run: error: Xvfb failed to start #5

SimonDanisch opened this issue Mar 16, 2021 · 10 comments

Comments

@SimonDanisch
Copy link

There seems to be a problem running xvfb:

(node:1754) UnhandledPromiseRejectionWarning: Error: The process '/home/runner/work/_actions/openrndr/setup-opengl/v1.1/setup-opengl.sh' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:574:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:557:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:451:27)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:1754) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1754) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

https://github.com/JuliaPlots/GLMakie.jl/runs/2121584167#step:5:46

Thanks!

@edwinRNDR
Copy link
Member

I think the problem may be that it is running Focal instead of Bionic. Is it possible to try to run it on Bionic?

@SimonCoste
Copy link

Hello, I have the same problem as mentioned by @SimonDanisch. I am trying to use a package using OpenGL (it is GLMakie, the same for which SDanish opened the issue); in my deploy.yml I have

name: Build and Deploy
on:
  push:
    branches:
      - main
      - master
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
      with:
        persist-credentials: false
    # NOTE: Python is necessary for the pre-rendering (minification) step
    - name: Install python
      uses: actions/setup-python@v2
      with:
        python-version: '3.8'

    # Set up OpenGL ? ======>problem here
    - name: Set up OpenGL
      uses: openrndr/setup-opengl@v1.1
    
    # extra stuff

and during the deployment I end up with a Xvfb-run: error: Xvfb failed to start:

xvfb-run: error: Xvfb failed to start
(node:1657) UnhandledPromiseRejectionWarning: Error: The process '/home/runner/work/_actions/openrndr/setup-opengl/v1.1/setup-opengl.sh' failed with exit code 1
at ExecState._setResult (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:574:25)
at ExecState.CheckComplete (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:557:18)
at ChildProcess. (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:451:27)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
(node:1657) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1657) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Since I have runs-on: ubuntu-latest I guess that I am well running on Bionic. If it's not the case how can I ensure it ?

@SimonDanisch , any feedback on this issue ?
Thanks !

@SimonDanisch
Copy link
Author

@edwinRNDR
Copy link
Member

Hi @SimonDanisch the problem may be that setup-opengl may not work on ubuntu-latest. If possible you can try to use the older ubuntu image.

I will have a go at building support for the newer Ubuntu image(s).

@SimonDanisch
Copy link
Author

Uh, this was some time ago - It either didn't run on Bionic, or I had to use ubuntu-latest for other reasons... There's also a chance that I didn't try it, because I already had another solution up and running by the time you answered, and in general prefer to run on the latest version.

@artnie
Copy link

artnie commented Aug 23, 2022

I have the same issue when building with focal for our CI build. Our stuff is running tests with the libglut library, which I hope is included when installing OpenGL in the CI container. My script uses: openrndr/setup-opengl@v1.1, and the xvfb-run glxinfo afterwards naturally doesn't run either. That's were the build fails.

Is there a later version that works with focal, or do you know an alternative how to get OpenGL, or more specifically, libglut to run in a github action?

Edit: OpenGL or any kind of virtual desktop + libglut would do the trick. There are probably ways to hack it in headless systems, but with github actions I down know...

setup-opengl print:

...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
  mesa-utils
0 upgraded, 1 newly installed, 0 to remove and 14 not upgraded.
Need to get 34.2 kB of archives.
After this operation, 150 kB of additional disk space will be used.
Get:1 http://azure.archive.ubuntu.com/ubuntu focal/universe amd64 mesa-utils amd64 8.4.0-1build1 [34.2 kB]
Fetched 34.2 kB in 0s (503 kB/s)
Selecting previously unselected package mesa-utils.
(Reading database ... 
(Reading database ... 5%
...
(Reading database ... 265195 files and directories currently installed.)
Preparing to unpack .../mesa-utils_8.4.0-1build1_amd64.deb ...
Unpacking mesa-utils (8.4.0-1build1) ...
Setting up mesa-utils (8.4.0-1build1) ...
Processing triggers for man-db (2.9.1-1) ...
Reading package lists...
Building dependency tree...
Reading state information...
xvfb is already the newest version (2:1.20.[13](https://github.com/artnie/cram/runs/7975812876?check_suite_focus=true#step:4:14)-1ubuntu1~20.04.3).
0 upgraded, 0 newly installed, 0 to remove and [14](https://github.com/artnie/cram/runs/7975812876?check_suite_focus=true#step:4:15) not upgraded.
xvfb-run: error: Xvfb failed to start
(node:10317) UnhandledPromiseRejectionWarning: Error: The process '/home/runner/work/_actions/openrndr/setup-opengl/v1.1/setup-opengl.sh' failed with exit code 1
    at ExecState._setResult (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:574:25)
    at ExecState.CheckComplete (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:557:18)
    at ChildProcess.<anonymous> (/home/runner/work/_actions/openrndr/setup-opengl/v1.1/node_modules/@actions/exec/lib/toolrunner.js:451:27)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1022:[16](https://github.com/artnie/cram/runs/7975812876?check_suite_focus=true#step:4:17))
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
(node:103[17](https://github.com/artnie/cram/runs/7975812876?check_suite_focus=true#step:4:18)) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10317) [DEP00[18](https://github.com/artnie/cram/runs/7975812876?check_suite_focus=true#step:4:19)] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@edwinRNDR
Copy link
Member

@artnie I have recently moved away from setup-opengl because the default mesa install on ubuntu-20.04 is backed by llvm-pipe. llvm-pipe has seen big improvements while development on openswr (which is used by setup-opengl) seems to have stagnated or halted. I am able to run advanced opengl apps on the stock mesa install, for example here https://github.com/openrndr/orx/blob/master/.github/workflows/generate-screenshots.yml

@douira
Copy link

douira commented Jan 31, 2023

I would like to note that the official documentation suggests using runs-on: ubuntu-latest which is misleading given that it doesn't work. Maybe this issue can be at least solved on a DX-level by updating the documentation.

@hamoid
Copy link
Member

hamoid commented Jan 31, 2023

@douira Do you know of an alternative ubuntu version that works?

@JBartscher
Copy link

bionic is deprecated for github workflows by now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants