title: Node Selenium ChromeDriver Ubuntu NoSuchSessionError: This driver instance does not have a valid session ID
body: <p>Hey I am trying to start a Selenium instance on</p>
  
  <ul>
  <li>OS: Ubuntu 16.04 64bit / Linux 4.4.0-36-generic</li>
  <li>Node: v6.5.0</li>
  <li>NPM: 3.10.3</li>
  <li>"chromedriver": "^2.23.1",</li>
  <li>"selenium-webdriver": "^3.0.0-beta-2",</li>
  </ul>
  
  <p>I keep receiving this error.</p>
  
  <pre><code>/var/www/node-bin/portlight-orders/node_modules/selenium-webdriver/lib/webdriver.js:432
          throw new error.NoSuchSessionError(
          ^
  
  NoSuchSessionError: This driver instance does not have a valid session ID (did you call WebDriver.quit()?) and may no longer be used.
      at WebDriverError (/var/www/node-bin/portlight-orders/node_modules/selenium-webdriver/lib/error.js:27:5)
      at NoSuchSessionError (/var/www/node-bin/portlight-orders/node_modules/selenium-webdriver/lib/error.js:122:5)
      at checkHasNotQuit (/var/www/node-bin/portlight-orders/node_modules/selenium-webdriver/lib/webdriver.js:432:15)
      at Driver.schedule (/var/www/node-bin/portlight-orders/node_modules/selenium-webdriver/lib/webdriver.js:393:5)
      at Driver.quit (/var/www/node-bin/portlight-orders/node_modules/selenium-webdriver/lib/webdriver.js:480:23)
      at exitHandler (/var/www/node-bin/portlight-orders/api/services/Selenium.js:12:9)
      at emitOne (events.js:96:13)
      at process.emit (events.js:188:7)
      at process._fatalException (bootstrap_node.js:296:26)
  </code></pre>
  
  <p>In glances I see that chromedriver is running
  <a href="http://image.prntscr.com/image/dfc336afbf6f46d59017b4135e9547c3.png" rel="nofollow noreferrer">http://image.prntscr.com/image/dfc336afbf6f46d59017b4135e9547c3.png</a>
  <a href="https://i.stack.imgur.com/zmjVf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zmjVf.png" alt="enter image description here"></a></p>
  
  <pre><code>var webdriver = require('selenium-webdriver'),
      By = webdriver.By,
      until = webdriver.until;
  
  var driver = new webdriver.Builder()
      .forBrowser('chrome')
      .build();
  
  module.exports = driver;
  
  function exitHandler(options, err) {
      driver.quit()
  }
  
  //do something when app is closing
  process.on('exit', exitHandler.bind(null,{cleanup:true}));
  
  //catches ctrl+c event
  process.on('SIGINT', exitHandler.bind(null, {exit:true}));
  
  //catches uncaught exceptions
  process.on('uncaughtException', exitHandler.bind(null, {exit:true}));
  </code></pre>