{"action":"created","issue":{"url":"https://api.github.com/repos/beatfactor/nightwatch/issues/470","labels_url":"https://api.github.com/repos/beatfactor/nightwatch/issues/470/labels{/name}","comments_url":"https://api.github.com/repos/beatfactor/nightwatch/issues/470/comments","events_url":"https://api.github.com/repos/beatfactor/nightwatch/issues/470/events","html_url":"https://github.com/beatfactor/nightwatch/issues/470","id":79166185,"number":470,"title":"Error retrieving a new session (UnsupportedCommandException) when using start_process: true","user":{"login":"ahammar","id":88159,"avatar_url":"https://avatars.githubusercontent.com/u/88159?v=3","gravatar_id":"","url":"https://api.github.com/users/ahammar","html_url":"https://github.com/ahammar","followers_url":"https://api.github.com/users/ahammar/followers","following_url":"https://api.github.com/users/ahammar/following{/other_user}","gists_url":"https://api.github.com/users/ahammar/gists{/gist_id}","starred_url":"https://api.github.com/users/ahammar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahammar/subscriptions","organizations_url":"https://api.github.com/users/ahammar/orgs","repos_url":"https://api.github.com/users/ahammar/repos","events_url":"https://api.github.com/users/ahammar/events{/privacy}","received_events_url":"https://api.github.com/users/ahammar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-21T21:21:06Z","updated_at":"2015-05-28T12:05:34Z","closed_at":null,"body":"When automatically starting Selenium using `start_process: true` I get this error.\r\n\r\n    $ node node_modules/nightwatch/bin/runner.js --verbose\r\n    Starting selenium server... started - PID:  29749\r\n\r\n    [Google] Test Suite\r\n    ===================\r\n\r\n    Running:  Visit Google\r\n    INFO Request: POST /wd/hub/session \r\n     - data:  {\"desiredCapabilities\":{\"browserName\":\"firefox\",\"javascriptEnabled\":true,\"acceptSslCerts\":true,\"platform\":\"ANY\",\"name\":\"Google\"}} \r\n     - headers:  {\"Content-Type\":\"application/json; charset=utf-8\",\"Content-Length\":129}\r\n    ERROR Response 500 POST /wd/hub/session{ sessionId: null,\r\n      status: 13,\r\n      state: 'unhandled error',\r\n      value: \r\n       { message: 'Bad request\\nCommand duration or timeout: 107 milliseconds\\nBuild info: version: \\'2.45.0\\', revision: \\'5017cb8\\', time: \\'2015-02-26 23:59:50\\'\\nSystem info: host: \\'reaver\\', ip: \\'127.0.0.1\\', os.name: \\'Linux\\', os.arch: \\'amd64\\', os.version: \\'4.0.4-1-ARCH\\', java.version: \\'1.7.0_79\\'\\nDriver info: org.openqa.selenium.firefox.FirefoxDriver',\r\n         suppressed: [],\r\n         localizedMessage: 'Bad request\\nCommand duration or timeout: 107 milliseconds\\nBuild info: version: \\'2.45.0\\', revision: \\'5017cb8\\', time: \\'2015-02-26 23:59:50\\'\\nSystem info: host: \\'reaver\\', ip: \\'127.0.0.1\\', os.name: \\'Linux\\', os.arch: \\'amd64\\', os.version: \\'4.0.4-1-ARCH\\', java.version: \\'1.7.0_79\\'\\nDriver info: org.openqa.selenium.firefox.FirefoxDriver',\r\n         buildInformation: \r\n          { releaseLabel: '2.45.0',\r\n            buildTime: '2015-02-26 23:59:50',\r\n            class: 'org.openqa.selenium.internal.BuildInfo',\r\n            buildRevision: '5017cb8',\r\n            hCode: 167058406 },\r\n         cause: null,\r\n         systemInformation: 'System info: host: \\'reaver\\', ip: \\'127.0.0.1\\', os.name: \\'Linux\\', os.arch: \\'amd64\\', os.version: \\'4.0.4-1-ARCH\\', java.version: \\'1.7.0_79\\'',\r\n         supportUrl: null,\r\n         class: 'org.openqa.selenium.UnsupportedCommandException',\r\n         additionalInformation: '\\nDriver info: org.openqa.selenium.firefox.FirefoxDriver',\r\n         hCode: 401822801,\r\n         screen: null },\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 1453360085 }\r\n\r\n    Error retrieving a new session from the selenium server\r\n    { sessionId: null,\r\n      status: 13,\r\n      state: 'unhandled error',\r\n      value: \r\n       { buildInformation: \r\n          { releaseLabel: '2.45.0',\r\n            buildTime: '2015-02-26 23:59:50',\r\n            class: 'org.openqa.selenium.internal.BuildInfo',\r\n            buildRevision: '5017cb8',\r\n            hCode: 167058406 },\r\n         localizedMessage: 'Bad request\\nCommand duration or timeout: 107 milliseconds\\nBuild info: version: \\'2.45.0\\', revision: \\'5017cb8\\', time: \\'2015-02-26 23:59:50\\'\\nSystem info: host: \\'reaver\\', ip: \\'127.0.0.1\\', os.name: \\'Linux\\', os.arch: \\'amd64\\', os.version: \\'4.0.4-1-ARCH\\', java.version: \\'1.7.0_79\\'\\nDriver info: org.openqa.selenium.firefox.FirefoxDriver',\r\n         cause: null,\r\n         message: 'Bad request\\nCommand duration or timeout: 107 milliseconds\\nBuild info: version: \\'2.45.0\\', revision: \\'5017cb8\\', time: \\'2015-02-26 23:59:50\\'\\nSystem info: host: \\'reaver\\', ip: \\'127.0.0.1\\', os.name: \\'Linux\\', os.arch: \\'amd64\\', os.version: \\'4.0.4-1-ARCH\\', java.version: \\'1.7.0_79\\'\\nDriver info: org.openqa.selenium.firefox.FirefoxDriver',\r\n         systemInformation: 'System info: host: \\'reaver\\', ip: \\'127.0.0.1\\', os.name: \\'Linux\\', os.arch: \\'amd64\\', os.version: \\'4.0.4-1-ARCH\\', java.version: \\'1.7.0_79\\'',\r\n         hCode: 401822801,\r\n         screen: null,\r\n         additionalInformation: '\\nDriver info: org.openqa.selenium.firefox.FirefoxDriver',\r\n         suppressed: [ [length]: 0 ],\r\n         class: 'org.openqa.selenium.UnsupportedCommandException',\r\n         supportUrl: null },\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 1453360085 }\r\n\r\n\r\n    Connection refused! Is selenium server started?\r\n\r\n`nightwatch.json`:\r\n\r\n    {\r\n        \"src_folders\": [\"tests\"],\r\n        \"output_folder\": false,\r\n\r\n        \"selenium\": {\r\n            \"start_process\": true,\r\n            \"server_path\": \"selenium-server-standalone-2.45.0.jar\"\r\n        },\r\n\r\n        \"test_settings\": {\r\n            \"default\": {}\r\n        }\r\n    }\r\n\r\n`tests/google.js`\r\n\r\n    module.exports = {\r\n        'Visit Google': function (browser) {\r\n            browser\r\n                .url('http://www.google.com')\r\n                .waitForElementVisible('body', 1000)\r\n                .assert.title(\"Google\")\r\n                .end();\r\n        }\r\n    };\r\n\r\nSetting `start_process` to `false` and starting Selenium manually with `java -jar selenium-server-standalone-2.45.0.jar`, everything works:\r\n\r\n    $ node node_modules/nightwatch/bin/runner.js --verbose\r\n\r\n    [Google] Test Suite\r\n    ===================\r\n\r\n    Running:  Visit Google\r\n    INFO Request: POST /wd/hub/session \r\n     - data:  {\"desiredCapabilities\":{\"browserName\":\"firefox\",\"javascriptEnabled\":true,\"acceptSslCerts\":true,\"platform\":\"ANY\",\"name\":\"Google\"}} \r\n     - headers:  {\"Content-Type\":\"application/json; charset=utf-8\",\"Content-Length\":129}\r\n    INFO Response 200 POST /wd/hub/session{ sessionId: '0de12c13-f012-4bab-93c0-99e1cddd0ac4',\r\n      status: 0,\r\n      state: null,\r\n      value: \r\n       { platform: 'LINUX',\r\n         javascriptEnabled: true,\r\n         acceptSslCerts: true,\r\n         browserName: 'firefox',\r\n         rotatable: false,\r\n         locationContextEnabled: true,\r\n         'webdriver.remote.sessionid': '0de12c13-f012-4bab-93c0-99e1cddd0ac4',\r\n         version: '38.0.1',\r\n         databaseEnabled: true,\r\n         cssSelectorsEnabled: true,\r\n         handlesAlerts: true,\r\n         webStorageEnabled: true,\r\n         nativeEvents: false,\r\n         applicationCacheEnabled: true,\r\n         takesScreenshot: true },\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 1446382936 }\r\n    INFO Got sessionId from selenium 0de12c13-f012-4bab-93c0-99e1cddd0ac4\r\n    INFO Request: POST /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/url \r\n     - data:  {\"url\":\"http://www.google.com\"} \r\n     - headers:  {\"Content-Type\":\"application/json; charset=utf-8\",\"Content-Length\":31}\r\n    INFO Response 200 POST /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/url{ sessionId: '0de12c13-f012-4bab-93c0-99e1cddd0ac4',\r\n      status: 0,\r\n      state: 'success',\r\n      value: null,\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 1795038768 }\r\n    LOG     → Completed command url (1359 ms)\r\n    INFO Request: POST /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/elements \r\n     - data:  {\"using\":\"css selector\",\"value\":\"body\"} \r\n     - headers:  {\"Content-Type\":\"application/json; charset=utf-8\",\"Content-Length\":39}\r\n    INFO Response 200 POST /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/elements{ sessionId: '0de12c13-f012-4bab-93c0-99e1cddd0ac4',\r\n      status: 0,\r\n      state: 'success',\r\n      value: [ { ELEMENT: '0' } ],\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 1998041524 }\r\n    INFO Request: GET /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/element/0/displayed \r\n     - data:   \r\n     - headers:  {\"Accept\":\"application/json\"}\r\n    INFO Response 200 GET /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/element/0/displayed{ sessionId: '0de12c13-f012-4bab-93c0-99e1cddd0ac4',\r\n      status: 0,\r\n      state: 'success',\r\n      value: true,\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 730193816 }\r\n     ✔ Element <body> was visible after 209 milliseconds.\r\n    LOG     → Completed command waitForElementVisible (211 ms)\r\n    INFO Request: GET /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/title \r\n     - data:   \r\n     - headers:  {\"Accept\":\"application/json\"}\r\n    INFO Response 200 GET /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4/title{ sessionId: '0de12c13-f012-4bab-93c0-99e1cddd0ac4',\r\n      status: 0,\r\n      state: 'success',\r\n      value: 'Google',\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 270088606 }\r\n     ✔ Testing if the page title equals \"Google\".\r\n    LOG     → Completed command title (41 ms)\r\n    LOG     → Completed command title (41 ms)\r\n    INFO Request: DELETE /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4 \r\n     - data:   \r\n     - headers:  {\"Content-Length\":0}\r\n    INFO Response 200 DELETE /wd/hub/session/0de12c13-f012-4bab-93c0-99e1cddd0ac4{ sessionId: '0de12c13-f012-4bab-93c0-99e1cddd0ac4',\r\n      status: 0,\r\n      state: 'success',\r\n      value: null,\r\n      class: 'org.openqa.selenium.remote.Response',\r\n      hCode: 312784151 }\r\n    LOG     → Completed command end (96 ms)\r\n    LOG     → Completed command session (96 ms)\r\n    INFO FINISHED\r\n\r\n    OK. 2 assertions passed. (3.563s)\r\n\r\nRelevant version info: nightwatch 0.6.12, selenium 2.45, firefox 38.0.1 on Arch Linux 4.0.4-1\r\n"},"comment":{"url":"https://api.github.com/repos/beatfactor/nightwatch/issues/comments/106291379","html_url":"https://github.com/beatfactor/nightwatch/issues/470#issuecomment-106291379","issue_url":"https://api.github.com/repos/beatfactor/nightwatch/issues/470","id":106291379,"user":{"login":"beatfactor","id":419506,"avatar_url":"https://avatars.githubusercontent.com/u/419506?v=3","gravatar_id":"","url":"https://api.github.com/users/beatfactor","html_url":"https://github.com/beatfactor","followers_url":"https://api.github.com/users/beatfactor/followers","following_url":"https://api.github.com/users/beatfactor/following{/other_user}","gists_url":"https://api.github.com/users/beatfactor/gists{/gist_id}","starred_url":"https://api.github.com/users/beatfactor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beatfactor/subscriptions","organizations_url":"https://api.github.com/users/beatfactor/orgs","repos_url":"https://api.github.com/users/beatfactor/repos","events_url":"https://api.github.com/users/beatfactor/events{/privacy}","received_events_url":"https://api.github.com/users/beatfactor/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T12:05:34Z","updated_at":"2015-05-28T12:05:34Z","body":"But the behaviour might change in the future. The way I see it, this is more like a workaround to the actual issue so I'd prefer at least to know what the issue is. Are you using a docker or Xvfb? Does [this issue](https://github.com/SeleniumHQ/docker-selenium/issues/31) following offer any new insight? Or [this one](https://github.com/SeleniumHQ/selenium/issues/367)?"}}