back2dos / travix

Travis helper.
The Unlicense
33 stars 12 forks source link

[flash] xvfb-run: error: Xvfb failed to start #54

Closed sebthom closed 7 years ago

sebthom commented 7 years ago

My build jobs targeting flash randomly fail with this error message:

travis_fold:end:build-flash.1
xvfb-run: error: Xvfb failed to start
xvfb-run: error: Xvfb failed to start
xvfb-run: error: Xvfb failed to start
xvfb-run: error: Xvfb failed to start
> eval ps aux | grep -ie [L]ogs/flashlog.txt | awk '{print $2}' | xargs kill -9
Flash execution failed too many times, build failure.

In the log file I can see that the DISPLAY variable is set the fixed value 99

travis_fold:start:flash-install.1
> export DISPLAY=:99.0

Which comes from here https://github.com/back2dos/travix/blob/fbe2cd6530e2753a2801cb202bdb7562027bfe18/src/travix/commands/FlashCommand.hx#L19

I found a lot of github issues in different projects where similar problems are discussed, e.g https://github.com/cloudbees/java-build-tools-dockerfile/pull/23

The general suggestion seems to be not to set the DISPLAY port but wrap the command to be executed with xfvb-run with option -a to auto-assign a port.

I guess the change would have to go here: https://github.com/back2dos/travix/blob/fbe2cd6530e2753a2801cb202bdb7562027bfe18/src/travix/commands/FlashCommand.hx#L65