Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐛 Bug]: Cannot find session id #1874

Closed
arthursantosololu opened this issue Jun 22, 2023 · 3 comments
Closed

[🐛 Bug]: Cannot find session id #1874

arthursantosololu opened this issue Jun 22, 2023 · 3 comments

Comments

@arthursantosololu
Copy link

What happened?

Trying download a file from a session that is still active, it works sometimes, but mostly getting the error below

when calling: http://localhost:4444/session/{_sessionId}/se/files

{
"value": {
"error": "invalid session id",
"message": "Cannot find session with id: 5d13143ea6dbe8af38ad1e4bb8028e8\nBuild info: version: '4.9.1', revision: 'eb2032df7f'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-1104-gcp', java.version: '11.0.18'\nDriver info: driver.version: unknown",
"stacktrace": "org.openqa.selenium.NoSuchSessionException: Cannot find session with id: 5d13143ea6dbe8af38ad1e4bb8028e8\nBuild info: version: '4.9.1', revision: 'eb2032df7f'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-1104-gcp', java.version: '11.0.18'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.grid.node.local.LocalNode.downloadFile(LocalNode.java:605)\n\tat org.openqa.selenium.grid.node.DownloadFile.execute(DownloadFile.java:39)\n\tat org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:192)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:86)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.grid.node.Node.execute(Node.java:255)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:336)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:68)\n\tat org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)\n\tat org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:64)\n\tat org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)\n\tat java.base\u002fjava.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)\n\tat java.base\u002fjava.util.concurrent.FutureTask.run(FutureTask.java:264)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)\n\tat java.base\u002fjava.lang.Thread.run(Thread.java:829)\n"
}
}

Command used to start Selenium Grid with Docker

version: "3.3"
services:
  chrome:
    image: selenium/node-chrome:113.0
    shm_size: 2gb
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
      - SE_NODE_MAX_SESSIONS=3
      - SE_NODE_OVERRIDE_MAX_SESSIONS=true
      - SE_OPTS=--enable-managed-downloads true
  selenium-hub:
    image: selenium/hub:4.9.1
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"

Relevant log output

C# code used:

var options = new ChromeOptions();
options.AddArguments("--start-maximized");
options.AddAdditionalOption("se:downloadsEnabled", true);
var capabilities = options.ToCapabilities();
driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), capabilities);

Operating System

Ubuntu

Docker Selenium version (tag)

latest

@github-actions
Copy link

@arthursantosololu, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@arthursantosololu arthursantosololu changed the title [🐛 Bug]: [🐛 Bug]: Invalid session id Jun 22, 2023
@arthursantosololu arthursantosololu changed the title [🐛 Bug]: Invalid session id [🐛 Bug]: Cannot find session id Jun 22, 2023
@diemol
Copy link
Member

diemol commented Jun 23, 2023

There was a bug, please upgrade to 4.10.0.

@diemol diemol closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
Copy link

github-actions bot commented Dec 9, 2023

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

@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants