title: Chromedriver won't launch headlessly with Protractor tests (error 199)
body: <p><br>
  <strong>EDIT</strong>: Not Jenkins-specific. I'm getting the same error when simply launching the tests from command line.<br><br>
  I want to run Protractor tests in Jenkins, using a specific Chromedriver , that is stored in my project.<br>Here is my config file:<br></p>
  
  <pre><code>exports.config = {
      seleniumAddress: 'http://monsite:9095/wd/hub',
  
      // Basically I put everything that sounds like Chrome.
      chromeOnly: true,
      // directConnect: true, // will uncomment it later...
      chromeDriver: '../node_modules/chromedriver/bin/chromedriver',
      capabilities: {
          'browserName': 'chrome'
      },
  
      framework: 'jasmine',
      jasmineNodeOpts: {
          defaultTimeoutInterval: 999999
      },
  
      specs: ['demo.js'],
  
      baseUrl: 'http://monsite:3000'
  };
  </code></pre>
  
  <p>Works like a charm in my IDE, but when I run the tests from Jenkins Pipeline, Jenkins tries to use his own Chromedriver, even if I unsinstall the Chromedriver plugin.<br>
  This error message appears:<br></p>
  
  <pre><code>[15:58:27] I/launcher - Running 1 instances of WebDriver
  [15:58:27] I/hosted - Using the selenium server at http://monsite.ovh.net:9095/wd/hub
  [15:59:27] E/launcher - unknown error: Chrome failed to start: exited abnormally
    (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 3.13.0-105-generic x86_64) (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 60.34 seconds
  Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
  System info: host: 'monsite.ovh.net', ip: '51.255.171.51', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-105-generic', java.version: '1.8.0_111'
  Driver info: org.openqa.selenium.chrome.ChromeDriver
  [15:59:27] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally
    (Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 3.13.0-105-generic x86_64) (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 60.34 seconds
  Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
  System info: host: 'monsite.ovh.net', ip: '51.255.171.51', os.name: 'Linux', os.arch: 'amd64', os.version: '3.13.0-105-generic', java.version: '1.8.0_111'
  Driver info: org.openqa.selenium.chrome.ChromeDriver
      at WebDriverError (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
      at Object.checkLegacyResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)
      at parseHttpResponse (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
      at doSend.then.response (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)
      at process._tickCallback (internal/process/next_tick.js:103:7)
  From: Task: WebDriver.createSession()
      at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
      at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:709:29)
      at createDriver (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:167:33)
      at Builder.build (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:623:16)
      at Hosted.getNewDriver (/usr/lib/node_modules/protractor/lib/driverProviders/driverProvider.ts:60:29)
      at Runner.createBrowser (/usr/lib/node_modules/protractor/lib/runner.ts:225:39)
      at q.then.then (/usr/lib/node_modules/protractor/lib/runner.ts:391:27)
      at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
      at self.promiseDispatch.done (/usr/lib/node_modules/protractor/node_modules/q/q.js:863:30)
      at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
  [15:59:27] E/launcher - Process exited with error code 199
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: script returned exit code 199
  Finished: FAILURE
  </code></pre>
  
  <p>This occurs in the stage when I run:</p>
  
  <pre><code>sh 'sudo protractor tests/src/conf-demo.js'
  </code></pre>
  
  <p>I've updated the configuration of Jenkins Selenium Grid plugin to match what I've set in the Protractor conf file.<br>
  I've tried using <code>directConnect: true</code> in my Protractor conf file, but I get quite the same error:</p>
  
  <pre><code>+ sudo protractor tests/src/conf-demo.js
  [16:56:35] W/driverProviders - Using driver provider directConnect, but also found extra driver provider parameter(s): seleniumAddress
  [16:56:35] I/launcher - Running 1 instances of WebDriver
  [16:56:35] I/direct - Using ChromeDriver directly...
  [16:56:36] E/launcher - Server terminated early with status 1
  [16:56:36] E/launcher - Error: Server terminated early with status 1
      at Error (native)
      at earlyTermination.catch.e (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/remote/index.js:252:52)
      at process._tickCallback (internal/process/next_tick.js:103:7)
  From: Task: WebDriver.createSession()
      at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
      at Function.createSession (/usr/lib/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:709:29)
      at Direct.getNewDriver (/usr/lib/node_modules/protractor/lib/driverProviders/direct.ts:90:25)
      at Runner.createBrowser (/usr/lib/node_modules/protractor/lib/runner.ts:225:39)
      at q.then.then (/usr/lib/node_modules/protractor/lib/runner.ts:391:27)
      at _fulfilled (/usr/lib/node_modules/protractor/node_modules/q/q.js:834:54)
      at self.promiseDispatch.done (/usr/lib/node_modules/protractor/node_modules/q/q.js:863:30)
      at Promise.promise.promiseDispatch (/usr/lib/node_modules/protractor/node_modules/q/q.js:796:13)
      at /usr/lib/node_modules/protractor/node_modules/q/q.js:556:49
      at runSingle (/usr/lib/node_modules/protractor/node_modules/q/q.js:137:13)
  [16:56:36] E/launcher - Process exited with error code 199
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: script returned exit code 199
  Finished: FAILURE
  </code></pre>
  
  <p>Tools versions...</p>
  
  <pre><code>[11:13:44] I/status - selenium standalone version available: 3.4.0 [last]
  [11:13:44] I/status - chromedriver version available: 2.24 [last]
  [11:13:44] I/status - geckodriver version available: v0.16.1 [last]
  [11:13:44] I/status - android-sdk is not present
  [11:13:44] I/status - appium is not present
  </code></pre>
  
  <p>My Google Chrome version was 55, upgraded it to 58, same behavior.</p>
  
  <p>What the <em>frog</em> am I missing? Help will be unoverstatably appreciated.</p>