node-huxley fails to start on elastic bamboo w/ubuntu
Asked by gil box:

Locally on OSX, node-huxley using chromedriver works fine. In order to setup CI with huxley I installed chrome and chromedriver on an elastic bamboo instance running ubuntu. I get **DevTools request failed** over and over in the chromedriver log (abridged in the full output below). How do I get passed this error?

```
$ cat /tmp/chrome.log    [15.188][INFO]: COMMAND InitSession {       "desiredCapabilities": {          "browserName": "chrome",          "chromeOptions": {             "args": [ "--test-type" ]          }       }    }    [15.188][INFO]: Populating Preferences file: {       "alternate_error_pages": {          "enabled": false       },       "autofill": {          "enabled": false       },       "browser": {          "check_default_browser": false       },       "distribution": {          "import_bookmarks": false,          "import_history": false,          "import_search_engine": false,          "make_chrome_default_for_user": false,          "show_welcome_page": false,          "skip_first_run_ui": true       },       "dns_prefetching": {          "enabled": false       },       "profile": {          "content_settings": {             "pattern_pairs": {                "https://*,*": {                   "media-stream": {                      "audio": "Default",                      "video": "Default"                   }                }             }          },          "default_content_settings": {             "geolocation": 1,             "mouselock": 1,             "notifications": 1,             "popups": 1,             "ppapi-broker": 1          },          "password_manager_enabled": false       },       "safebrowsing": {          "enabled": false       },       "search": {          "suggest_enabled": false       },       "translate": {          "enabled": false       }    }    [15.188][INFO]: Populating Local State file: {       "background_mode": {          "enabled": false       },       "ssl": {          "rev_checking": {             "enabled": false          }       }    }    [15.189][INFO]: Launching chrome: /opt/google/chrome/google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-hang-monitor --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-logging --ignore-certificate-errors --load-extension=/tmp/.com.google.Chrome.EUout2/internal --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12583 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --test-type --use-mock-keychain --user-data-dir=/tmp/.com.google.Chrome.d9rGhd data:,    [15.190][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [15.193][WARNING]: PAC support disabled because there is no system implementation    [15.323][DEBUG]: DevTools request failed    [15.380][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [15.380][DEBUG]: DevTools request failed    [15.430][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [15.431][DEBUG]: DevTools request failed    [15.481][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [15.482][DEBUG]: DevTools request failed    [3039:3039:1121/232539:ERROR:browser_main_loop.cc(209)] Gtk: cannot open display:    [15.532][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [15.533][DEBUG]: DevTools request failed    [15.583][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [15.583][DEBUG]: DevTools request failed    [15.634][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [15.634][DEBUG]: DevTools request failed        ??        [75.099][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [75.099][DEBUG]: DevTools request failed    [75.149][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [75.149][DEBUG]: DevTools request failed    [75.200][DEBUG]: DevTools request: http://127.0.0.1:12583/json/version    [75.200][DEBUG]: DevTools request failed    [75.201][INFO]: RESPONSE InitSession unknown error: Chrome failed to start: exited abnormally    [75.201][DEBUG]: Log type 'driver' lost 0 entries on destruction    [75.201][DEBUG]: Log type 'browser' lost 0 entries on destruction
```


Answers:
author: Krystian Brazulewicz
body: Looks like this tool needs actual X Server display. In order to make it work on a headless Ubuntu you'll need to install `xvfb` and use `xvfb`-run command to run your tool with a virtual display.

comments: author: gil box
body: Thanks for you help! If anyone comes across this I also had to install chromium-browser and downgrade chromedriver because it's not compatible with the latest version of chromium-browser.


Tags: cloud

elastic-bamboo