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

Unhelpful error message when desired working directory does not exist #32

Open
xpdota opened this issue Nov 11, 2022 · 3 comments
Open

Comments

@xpdota
Copy link

xpdota commented Nov 11, 2022

I was using this:

      - name: Build deps
        uses: gabrielbb/[email protected]
        with:
          run: mvn -T4 clean install -DskipTests
          working-directory: ./triggevent-base

I was getting this error:

Run gabrielbb/[email protected]
  with:
    run: mvn -T4 clean install -DskipTests
    working-directory: ./triggevent-base
  env:
    JAVA_HOME: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.4-1/x64
    JAVA_HOME_17_X64: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/17.0.4-1/x64
/usr/bin/sudo apt-get install -y xvfb
Reading package lists...
Building dependency tree...
Reading state information...
xvfb is already the newest version 2:21.1.3-2ubuntu2.2).
0 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Command: mvn -T4 clean install -DskipTests
/usr/bin/xvfb-run --auto-servernum mvn -T4 clean install -DskipTests
/usr/bin/bash /home/runner/work/_actions/gabrielbb/xvfb-action/v1.6/cleanup.sh
No xvfb processes to kill
Error: There was an error when attempting to execute the process '/usr/bin/xvfb-run'. This may indicate the process failed to start. Error: spawn /usr/bin/xvfb-run ENOENT

This is running on the Github-hosted Ubuntu 22.04 image.

It turned out that the step just before this was deleting the desired working directory for some reason - however, the actual error message (Error: spawn /usr/bin/xvfb-run ENOENT) is not helpful for diagnosing this issue.

@LeKristapino
Copy link

Maybe try working-directory: ${{github.workspace}}/triggevent-base instead of relative path.

@xpdota
Copy link
Author

xpdota commented Nov 16, 2022

I actually ended up figuring it out - not sure why, but a previous step was deleting the directory in question.

I'll change the bug accordingly.

@xpdota xpdota changed the title 'Error: spawn /usr/bin/xvfb-run ENOENT' when using working-directory flag Confusing error message when desired working directory does not exist Nov 16, 2022
@xpdota xpdota changed the title Confusing error message when desired working directory does not exist Unhelpful error message when desired working directory does not exist Nov 16, 2022
@LeKristapino
Copy link

Looking at the action, the error seems to come from the xvfb library itself, so it might be very hard to output the exact nature of the problem (like a missing directory). Unless you add a check whether the working directory is actually in place.

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

2 participants