Docker-selenium: no such session

Created on 3 Jun 2016  路  8Comments  路  Source: SeleniumHQ/docker-selenium

I'm running protractor tests with grid and chrome-node.

selenium/node-chrome:2.53.0
selenium/hub:2.53.0

Sometimes i get this error in the middle of the run. These are the time outs I have set:

`
jasmineNodeOpts: {
defaultTimeoutInterval: 6000000,
},

allScriptsTimeout: 360000,

getPageTimeOut: 600000`

[chrome #01-1] /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:27 [chrome #01-1] super(opt_error); [chrome #01-1] ^ [chrome #01-1] WebDriverError: no such session [chrome #01-1] (Driver info: chromedriver=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a),platform=Linux 4.4.8-boot2docker x86_64) (WARNING: The server did not provide any stacktrace information) [chrome #01-1] Command duration or timeout: 1 milliseconds [chrome #01-1] Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58' [chrome #01-1] System info: host: 'f03ad401dfe9', ip: '172.17.0.4', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.8-boot2docker', java.version: '1.8.0_03-Ubuntu' [chrome #01-1] Driver info: org.openqa.selenium.chrome.ChromeDriver [chrome #01-1] Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, chrome={chromedriverVersion=2.21.371461 (633e689b520b25f3e264a2ede6b74ccc23cb636a), userDataDir=/tmp/.com.google.Chrome.ysTPYZ}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=50.0.2661.86, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}] [chrome #01-1] Session ID: 0fd3aa4d047af337cb8625f7fb7ee03b [chrome #01-1] at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:27:5) [chrome #01-1] at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/error.js:580:13) [chrome #01-1] at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:360:15 [chrome #01-1] at Promise.invokeCallback_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:1329:14) [chrome #01-1] at TaskQueue.execute_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2790:14) [chrome #01-1] at TaskQueue.executeNext_ (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2773:21) [chrome #01-1] at asyncRun (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:2652:27) [chrome #01-1] at /usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/promise.js:639:7 [chrome #01-1] at process._tickCallback (internal/process/next_tick.js:103:7)

All 8 comments

I have the same problem running protractor tests on linux in gitlab CI , test run well but after 30 min this error appears. @tommyz0123 have you found any solution ?
chromedriver 2.22, selenium version 2.53.1, protractor 4.0.4

no. i ended up switching to VM for CI. But, I still use docker for dev work.

we can't necessarily assume that it's the docker containers that are causing this, unless you can prove it.. i'd move this up the ladder and bring it up with protractor

Similar issue with Codeception 2.2.5 and chrome-debug-2.53.1

[...]
 I wait for element not visible "#login-form",8


  [Facebook\WebDriver\Exception\UnknownServerException]                                                                                                                                
  no such session                                                                                                                                                                      
    (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.4.20-moby x86_64) (WARNING: The server did not provide any stacktrace informat  
  ion)                                                                                                                                                                                 
  Command duration or timeout: 3 milliseconds                                                                                                                                          
  Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'                                                                                                      
  System info: host: '87c78f9fcef9', ip: '172.21.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.20-moby', java.version: '1.8.0_91'                                         
  Driver info: org.openqa.selenium.chrome.ChromeDriver                                                                                                                                 
  Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.24.417424 (c5c5ea873213e  
  e72e3d0929b47482681555340c3), userDataDir=/tmp/.org.chromium.Chromium.seyXIb}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouch  
  Screen=false, version=53.0.2785.143, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, b  
  rowserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]                                                                                          
  Session ID: 1959b2c27e58ca79b7dc9ad970984199                                                                                                                                         

@schmunk42 I'm getting the exact same error while using Codeception, have you found any solution to that?

@Greg36 I can't really remember, sorry.

My best guesses are

I was running protractor tests,I had:
Message:
Failed: no such session
(Driver info: chromedriver=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'DESKTOP-P7QJDPP', ip: '192.168.1.2', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30), userDataDir=C:\Users\USERAppData\Local\Temp\scoped_dir4680_26623}, takesHeapSnapshot=true, pageLoadStrategy=normal, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=56.0.2924.76, platform=XP, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=}]
Session ID: 3107d96c4c7f21a30a00c4065bf681da

After i change my testsuites, afterEach(function () {
HomePageAngular.close();
}); -> afterAll(function () {
HomePageAngular.close();
});
and all is good

I am getting the same error with Selenium Version: 3, and Chrome Version: 56.0.2924.87

My error only happens if I try to load chrome-profile when starting the instance. If I don't send this parameter it works well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jdiprizio picture jdiprizio  路  5Comments

matthewsamari picture matthewsamari  路  4Comments

achung89 picture achung89  路  4Comments

NeilJ247 picture NeilJ247  路  6Comments

rosskevin picture rosskevin  路  5Comments