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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: Standalone cannot create session #2297

Closed
ow-sam opened this issue Jul 1, 2024 · 5 comments
Closed

[馃悰 Bug]: Standalone cannot create session #2297

ow-sam opened this issue Jul 1, 2024 · 5 comments

Comments

@ow-sam
Copy link

ow-sam commented Jul 1, 2024

What happened?

I have been trying to connect to the selenium/chrome-standalone docker container, and it is having trouble creating sessions. I keep getting the following error.

The code that is generating this error is the following:

options = Options()
options.set_capability("goog:loggingPrefs", {"performance": "ALL"})
options.add_argument("--headless")
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")

driver = webdriver.Remote("http://chrome:4444/wd/hub", options=options)

I tried using different versions of selenium/chrome-standalone and using the node/hub containers instead of the standalone. Any suggestions?

Command used to start Selenium Grid with Docker (or Kubernetes)

services:
  chrome:
    platform: linux/x86_64
    hostname: chrome
    image: selenium/standalone-chrome:4.22.0-20240621
    shm_size: 2gb
    privileged: true
  datafetcher:
    build: .
    depends_on:
      - chrome

Relevant log output

21:02:35.263 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "18a8e2283000ca2a77b5526145bdce62","eventTime": 1719867755250989883,"eventName": "exception","attributes": {"exception.message": "Unable to create session: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: crashed.\n  (disconnected: unable to connect to renderer)\n  (The process started from chrome location \u002fusr\u002fbin\u002fgoogle-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) \nHost info: host: 'chrome', ip: '172.19.0.2'\nBuild info: version: '4.22.0', revision: 'c5f3146703'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.31-linuxkit', java.version: '17.0.11'\nDriver info: driver.version: unknown\nBuild info: version: '4.22.0', revision: 'c5f3146703'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.31-linuxkit', java.version: '17.0.11'\nDriver info: driver.version: unknown","exception.stacktrace": "org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Error while creating session with the driver service. Stopping driver service: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: crashed.\n  (disconnected: unable to connect to renderer)\n  (The process started from chrome location \u002fusr\u002fbin\u002fgoogle-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) \nHost info: host: 'chrome', ip: '172.19.0.2'\nBuild info: version: '4.22.0', revision: 'c5f3146703'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.31-linuxkit', java.version: '17.0.11'\nDriver info: driver.version: unknown\nBuild info: version: '4.22.0', revision: 'c5f3146703'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '6.6.31-linuxkit', java.version: '17.0.11'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:221)\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:71)\n\tat org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147)\n\tat org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:469)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:652)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:571)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:834)\n\tat org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:791)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\n\tat java.base\u002fjava.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\n\tat java.base\u002fjava.lang.Thread.run(Unknown Source)\n","exception.type": "org.openqa.selenium.SessionNotCreatedException","logger": "org.openqa.selenium.grid.distributor.local.LocalDistributor","request.payload": "[Capabilities {browserName: chrome, goog:chromeOptions: {args: [--headless, --no-sandbox, --disable-dev-shm-usage], extensions: []}, goog:loggingPrefs: {performance: ALL}, pageLoadStrategy: normal}]"}}

Operating System

macOS

Docker Selenium version (image tag)

4.22.0-20240621

Selenium Grid chart version (chart version)

No response

Copy link

github-actions bot commented Jul 1, 2024

@ow-sam, 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!

@ow-sam ow-sam changed the title [馃悰 Bug]: [馃悰 Bug]: Standalone cannot create session Jul 1, 2024
@diemol
Copy link
Member

diemol commented Jul 2, 2024

What architecture does your Mac have? ARM or Intel?

@ow-sam
Copy link
Author

ow-sam commented Jul 2, 2024

ARM, using a 2021 Mac with M1 Pro, but I should mention I also tried Arm64 platform

@diemol
Copy link
Member

diemol commented Jul 2, 2024

@diemol diemol closed this as not planned Won't fix, can't repro, duplicate, stale Jul 2, 2024
@ow-sam
Copy link
Author

ow-sam commented Jul 2, 2024

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants