{"action":"created","issue":{"url":"https://api.github.com/repos/angular/protractor/issues/2465","labels_url":"https://api.github.com/repos/angular/protractor/issues/2465/labels{/name}","comments_url":"https://api.github.com/repos/angular/protractor/issues/2465/comments","events_url":"https://api.github.com/repos/angular/protractor/issues/2465/events","html_url":"https://github.com/angular/protractor/issues/2465","id":104335228,"number":2465,"title":"Protractor starting extra browser session?","user":{"login":"flowhamster","id":1864789,"avatar_url":"https://avatars.githubusercontent.com/u/1864789?v=3","gravatar_id":"","url":"https://api.github.com/users/flowhamster","html_url":"https://github.com/flowhamster","followers_url":"https://api.github.com/users/flowhamster/followers","following_url":"https://api.github.com/users/flowhamster/following{/other_user}","gists_url":"https://api.github.com/users/flowhamster/gists{/gist_id}","starred_url":"https://api.github.com/users/flowhamster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flowhamster/subscriptions","organizations_url":"https://api.github.com/users/flowhamster/orgs","repos_url":"https://api.github.com/users/flowhamster/repos","events_url":"https://api.github.com/users/flowhamster/events{/privacy}","received_events_url":"https://api.github.com/users/flowhamster/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/protractor/labels/WebDriver%20issue/feature","name":"WebDriver issue/feature","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-01T19:17:02Z","updated_at":"2015-09-30T22:27:59Z","closed_at":null,"body":"I'm seeing two browser sessions are being created, but only one session is closed for every test run. Eventually this causes the selenium hub to throw an error and the tests to no longer run.\r\n```\r\nhub_1 ø 19:16:45.692 INFO - Trying to create a new session on node http://172.17.1.110:5555\r\nhub_1 ø 19:16:45.692 INFO - Node http://172.17.1.110:5555 has no free slots\r\n```\r\n\r\n\r\n```\r\nAttaching to compose_chrome_1\r\nchrome_1 ø 12:08:14.661 INFO - Launching a Selenium Grid node\r\nchrome_1 ø 12:08:17.056 INFO - Java: Oracle Corporation 24.79-b02\r\nchrome_1 ø 12:08:17.057 INFO - OS: Linux 3.2.0-4-amd64 amd64\r\nchrome_1 ø 12:08:17.065 INFO - v2.46.0, with Core v2.46.0. Built from revision 87c69e2\r\nchrome_1 ø 12:08:17.173 INFO - Driver provider org.openqa.selenium.ie.InternetExplorerDriver registration is skipped:\r\nchrome_1 ø registration capabilities Capabilities Ææplatform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=åÅ does not match the current platform LINUX\r\nchrome_1 ø 12:08:17.173 INFO - Driver class not found: com.opera.core.systems.OperaDriver\r\nchrome_1 ø 12:08:17.173 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered\r\nchrome_1 ø 12:08:17.249 INFO - Selenium Grid node is up and ready to register to the hub\r\nchrome_1 ø 12:08:17.301 INFO - Starting auto registration thread. Will try to register every 5000 ms.\r\nchrome_1 ø 12:08:17.301 INFO - Registering the node to the hub: http://172.17.1.109:4444/grid/register\r\nchrome_1 ø 12:08:17.348 INFO - The node is registered to the hub and ready to use\r\nchrome_1 ø 12:08:25.938 INFO - Executing: Ænew session: Capabilities Ææcount=1, browserName=chromeåÅÅ)\r\nchrome_1 ø 12:08:25.955 INFO - Creating a new session for Capabilities Ææcount=1, browserName=chromeåÅ\r\nchrome_1 ø Starting ChromeDriver 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961) on port 3314\r\nchrome_1 ø Only local connections are allowed.\r\nchrome_1 ø 12:08:27.713 INFO - Done: Ænew session: Capabilities Ææcount=1, browserName=chromeåÅÅ\r\nchrome_1 ø 12:08:28.019 INFO - Executing: Æset script timeoutt: 11000Å)\r\nchrome_1 ø 12:08:28.030 INFO - Done: Æset script timeoutt: 11000Å\r\nchrome_1 ø 12:08:28.243 INFO - Executing: Æget: https://foo.comÅ)\r\nchrome_1 ø 12:08:32.252 INFO - Done: Æget: https://foo.comÅ\r\nchrome_1 ø 12:08:32.296 INFO - Executing: Æclose windowÅ)\r\nchrome_1 ø 12:08:32.647 INFO - Done: Æclose windowÅ\r\nchrome_1 ø 12:08:32.756 INFO - Executing: Ædelete session: 9265c288-6f5e-4eca-94f4-6ba18d8199b5Å)\r\nchrome_1 ø 12:08:33.303 INFO - Done: Ædelete session: 9265c288-6f5e-4eca-94f4-6ba18d8199b5Å\r\nchrome_1 ø 12:08:36.118 INFO - Executing: Ænew session: Capabilities Ææcount=1, browserName=chromeåÅÅ)\r\nchrome_1 ø 12:08:36.122 INFO - Creating a new session for Capabilities Ææcount=1, browserName=chromeåÅ\r\nchrome_1 ø Starting ChromeDriver 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961) on port 19925\r\nchrome_1 ø Only local connections are allowed.\r\nchrome_1 ø 12:08:38.201 INFO - Done: Ænew session: Capabilities Ææcount=1, browserName=chromeåÅÅ\r\nchrome_1 ø 12:08:38.330 INFO - Executing: Æset script timeoutt: 11000Å)\r\nchrome_1 ø 12:08:38.392 INFO - Done: Æset script timeoutt: 11000Å\r\nchrome_1 ø 12:08:38.711 INFO - Executing: Æget: https://foo.coÅ)\r\nchrome_1 ø 12:08:42.890 INFO - Done: Æget: https://foo.coÅ\r\nchrome_1 ø 12:08:42.914 INFO - Executing: Æclose windowÅ)\r\nchrome_1 ø 12:08:43.313 INFO - Done: Æclose windowÅ\r\nchrome_1 ø 12:08:43.392 INFO - Executing: Ædelete session: 0c563971-3c1a-4298-8f21-edb7b83bac36Å)\r\nchrome_1 ø 12:08:43.902 INFO - Done: Ædelete session: 0c563971-3c1a-4298-8f21-edb7b83bac36Å\r\nchrome_1 ø 12:08:45.769 INFO - Executing: Ænew session: Capabilities Ææcount=1, browserName=chromeåÅÅ)\r\nchrome_1 ø 12:08:45.772 INFO - Creating a new session for Capabilities Ææcount=1, browserName=chromeåÅ\r\nchrome_1 ø Starting ChromeDriver 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961) on port 25877\r\nchrome_1 ø Only local connections are allowed.\r\n```\r\n\r\nProtractor config\r\n```\r\nexports.config = {\r\n  baseUrl: 'https://foo.co',\r\n  seleniumAddress: 'http://hub:4444/wd/hub',\r\n  multiCapabilities: [\r\n    {'browserName': 'chrome'}//,\r\n    //{'browserName': 'firefox'}\r\n  ],\r\n  specs: ['todo-spec.js'],\r\n  onPrepare: function() {\r\n    console.log('waiting for session...');\r\n    return browser.driver.getSession().then(function() {\r\n        console.log('...acquired.');\r\n    });\r\n}\r\n};\r\n```\r\n\r\n\r\nProtractor spec\r\n```\r\ndescribe('angularjs homepage todo list', function() {\r\n  it('should add a todo', function() {\r\n    browser.driver.get('https://foo.co');\r\n\r\n    browser.driver.close();\r\n    expect(true).toEqual(true);\r\n  });\r\n});\r\n```"},"comment":{"url":"https://api.github.com/repos/angular/protractor/issues/comments/144562575","html_url":"https://github.com/angular/protractor/issues/2465#issuecomment-144562575","issue_url":"https://api.github.com/repos/angular/protractor/issues/2465","id":144562575,"user":{"login":"juliemr","id":2081709,"avatar_url":"https://avatars.githubusercontent.com/u/2081709?v=3","gravatar_id":"","url":"https://api.github.com/users/juliemr","html_url":"https://github.com/juliemr","followers_url":"https://api.github.com/users/juliemr/followers","following_url":"https://api.github.com/users/juliemr/following{/other_user}","gists_url":"https://api.github.com/users/juliemr/gists{/gist_id}","starred_url":"https://api.github.com/users/juliemr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juliemr/subscriptions","organizations_url":"https://api.github.com/users/juliemr/orgs","repos_url":"https://api.github.com/users/juliemr/repos","events_url":"https://api.github.com/users/juliemr/events{/privacy}","received_events_url":"https://api.github.com/users/juliemr/received_events","type":"User","site_admin":false},"created_at":"2015-09-30T22:27:59Z","updated_at":"2015-09-30T22:27:59Z","body":"I believe this should be fixed with the updated selenium standalone and chromedriver in protractor 2.3.0."}}