question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Session [null] not available and is not among the last 1000 terminated sessions.

See original GitHub issue

Hi,

Environment: Using appium 1.4 with android Lolipop Genymotion devices selenium grid version 2.48.2 (happend on 2.46.0 as well) javaclient both 3.0 and 3.3 was tried

after some test runs on the same node I’m getting this exception from the webdriver.

Caused by: org.openqa.selenium.WebDriverException: Session [null] not available and is not among the last 1000 terminated sessions.
Active sessions are[ext. key 09d59f24-dcc1-4277-b795-95dc8f69a394, ext. key 74404a11-04c0-42d2-b152-151a1e3af41e, ext. key da9d3902-8004-4ef6-9d60-709388d53657, ext. key 663dec99-a8fd-4bd8-aacb-679606f0c8dd]
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'TCA_7', ip: '10.102.43.116', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_66'
Driver info: driver.version: unknown
    at org.openqa.grid.internal.ActiveTestSessions.getExistingSession(ActiveTestSessions.java:110)
    at org.openqa.grid.internal.Registry.getExistingSession(Registry.java:425)
    at org.openqa.grid.web.servlet.handler.RequestHandler.getSession(RequestHandler.java:240)
    at org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:120)
    at org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:83)
    at org.openqa.grid.web.servlet.DriverServlet.doGet(DriverServlet.java:61)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:808)
    at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:587)
    at org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:221)
    at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.seleniumhq.jetty9.server.Server.handle(Server.java:499)
    at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:310)
    at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.seleniumhq.jetty9.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Unknown Source)

The next sessions will get this exception until node restart:

Caused by: org.openqa.selenium.remote.SessionNotFoundException: 
Command duration or timeout: 4.50 seconds
Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
System info: host: 'TCA_7', ip: '10.102.43.116', os.name: 'Windows Server 2008 R2', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_66'
Driver info: io.appium.java_client.android.AndroidDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:164)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:647)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:129)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142)
    at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:161)
    at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:170)
    at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:82)
    at Tests.DriverManagement.MobileDriverFactory.create(MobileDriverFactory.java:37)

I’ll appreciate your help, thanks.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ericomurtezcommented, Jan 5, 2017

@ds3p2 Did you ever solve this? Seeing same, but what is unusual I am only seeing it one of my environments so it is definitely something I have done but I cant figure out the discrepancy?

0reactions
lock[bot]commented, Apr 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selenium WebDriverException: Session [null] not available ...
This error message... org.openqa.selenium.WebDriverException: Session [null] not available and is not among the last 1000 terminated ...
Read more >
Session [....] not available and is not among the last 1000 ...
I've seen this happen when running 2 chrome nodes, but I think the problem occurs more often (but not reproducible) when I run...
Read more >
Session [(null externalkey)] not available and is not among the ...
Hi Im using Selenium Grid. When I run a test against my test site, I will hit the following error. *Message = *System.InvalidOperationException...
Read more >
Getting "org.openqa.selenium.WebDriverException: Session ...
Getting “org.openqa.selenium.WebDriverException: Session [null] not available and is not among the last 1000 terminated sessions.
Read more >
org.openqa.selenium.WebDriverException: Session [null] not ...
Is it because of Timeout ? Error: org.openqa.selenium.WebDriverException: Session [null] not available and is not among the last 1000 terminated sessions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found