title: Selenium + Mink + Chrome: "Could not open connection" error
body: <p>I'm not new to setting up Selenium and Mink, but it always seems to be a hassle. This time I'm trying to get it set up in an ubuntu docker container and <strong>I am running into the following error</strong>:</p>
  
  <pre><code>  Could not open connection: Unable to create new service: ChromeDriverService
    Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
    System info: host: 'a75b4026b8e5', ip: '172.20.0.6', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.60-linuxkit-aufs', java.version: '1.8.0_161'
    Driver info: driver.version: unknown (Behat\Mink\Exception\DriverException)
  </code></pre>
  
  <p>I can tell that Mink is hitting the Selenium to some degree, since the Selenium server outputs the following immediately before Behat reports the above error:</p>
  
  <pre><code>2018-01-30 16:13:49.870:INFO:osjshC.ROOT:qtp1156060786-12: org.openqa.selenium.remote.server.WebDriverServlet-10bbd20a: Initialising WebDriverServlet
  16:13:49.988 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@4b4945b7
  16:13:50.006 INFO - /session: Executing POST on /session (handler: BeginSession)
  16:13:50.168 INFO - Capabilities are: Capabilities {browser: chrome, browserName: chrome, ignoreZoomSetting: false, marionette: true, name: Behat feature suite, tags: [a75b4026b8e5, PHP 5.6.31]}
  16:13:50.171 INFO - Capabilities {browser: chrome, browserName: chrome, ignoreZoomSetting: false, marionette: true, name: Behat feature suite, tags: [a75b4026b8e5, PHP 5.6.31]} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
  16:13:50.302 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@5a608e4b
  16:13:50.303 INFO - /session: Executing POST on /session (handler: BeginSession)
  16:13:50.306 INFO - Capabilities are: Capabilities {browser: chrome, browserName: chrome, ignoreZoomSetting: false, marionette: true, name: Behat feature suite, tags: [a75b4026b8e5, PHP 5.6.31]}
  16:13:50.307 INFO - Capabilities {browser: chrome, browserName: chrome, ignoreZoomSetting: false, marionette: true, name: Behat feature suite, tags: [a75b4026b8e5, PHP 5.6.31]} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
  </code></pre>
  
  <p>Any idea what setting I have wrong?</p>
  
  <p><strong>Here's my setup:</strong></p>
  
  <p>Version of the chromedriver I installed:</p>
  
  <p><code>https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip</code></p>
  
  <p>Version of Chrome I have installed via the <code>apt-get install google-chrome-stable</code> command:</p>
  
  <pre><code>Google Chrome 64.0.3282.119
  </code></pre>
  
  <p>Java version that's installed:</p>
  
  <pre><code>java version "1.8.0_161"
  Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
  Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
  </code></pre>
  
  <p>How I started selenium:</p>
  
  <pre><code>xvfb-run --server-args="-screen 0, 1366x768x24" java -Dwebdriver.chrome.driver="usr/bin/chromedriver" -jar selenium-server-standalone-3.8.1.jar &amp;
  </code></pre>
  
  <p>composer.json:</p>
  
  <pre><code>    ...
      "require-dev": {
          "behat/behat": "^3.1",
          "behat/mink": "^1.7",
          "behat/mink-extension": "^2.2",
          "behat/mink-goutte-driver": "^1.2",
          "behat/mink-selenium2-driver": "^1.3",
         ...
      }, 
  </code></pre>
  
  <p>behat.yml:</p>
  
  <pre><code>extensions:
      Behat\MinkExtension:
        goutte: ~
        base_url: http://localhost/myapp/
        browser_name: chrome
        javascript_session: selenium2
        default_session: goutte
        selenium2:
          wd_host: "http://127.0.0.1:4444/wd/hub"
          capabilities:
            marionette: true
            browser: chrome
            version: 2.9
  </code></pre>