aerokube / selenoid

Selenium Hub successor running browsers within containers. Scalable, immutable, self hosted Selenium-Grid on any platform with single binary.
https://aerokube.com/selenoid/latest/
Apache License 2.0
2.57k stars 322 forks source link

Session timed out or not found #210

Closed benzman81 closed 7 years ago

benzman81 commented 7 years ago

Hi,

moving from "selenium grid + grid extras" to "ggr + selenoid" I get a lot of "Session timed out or not found" errors like these:

org.openqa.selenium.WebDriverException: Session timed out or not found (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 18 milliseconds
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'somehost', ip: 'someip', os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-111-generic', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{browserAttachTimeout=0.0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=true, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000.0, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=true, elementScrollBehavior=0.0, ie.browserCommandLineSwitches=-private, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:51781/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
Session ID: 7f0bb8bda8e4148aefb8ad67531403afc3b8576f-d361-4792-bee9-140df26d86d9
*** Element info: {Using=xpath, value=//someXPath}
    at sun.reflect.GeneratedConstructorAccessor74.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:215)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:437)
    at org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(RemoteWebDriver.java:513)
    at org.openqa.selenium.By$ByXPath.findElements(By.java:356)
    at org.openqa.selenium.remote.RemoteWebDriver.findElements(RemoteWebDriver.java:398)
    at org.openqa.selenium.support.ui.ExpectedConditions.findElement(ExpectedConditions.java:882)
    at org.openqa.selenium.support.ui.ExpectedConditions.access$000(ExpectedConditions.java:44)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:183)
    at org.openqa.selenium.support.ui.ExpectedConditions$6.apply(ExpectedConditions.java:180)
    at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:209)
    at our code doing fluent wait

Do you have any idea? Can I increase the timeout some how to not run into it?

Regards, Markus

vania-pooh commented 7 years ago

@benzman81 according to this documentation section you can adjust several timeout values:

You can obtain the same documentation via $ selenoid -help command.

benzman81 commented 7 years ago

sorry about this issue. I already set "-timeout xxx" but I didnt push to remote :-D

Programmer-Admin commented 5 months ago

Hello @vania-pooh, my docker-compose.yml file looks like this : `services: selenoid: image: "aerokube/selenoid:latest-release" container_name: hub networks:

vania-pooh commented 5 months ago

@Programmer-Admin you have to check Selenoid logs and your test code logs to get an idea of the number of browser sessions being started. Trying to check the same in Selenoid UI is not a guarantee of showing correct number, because in Selenoid UI everything is refreshed every 5 seconds and short test cases can be executed faster.