Skip to content

[🐛 Bug]: standalone-chrome crashes when creating a new session (unknown error: DevToolsActivePort file doesn't exist) #1625

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

Closed
kh0r opened this issue Jul 6, 2022 · 1 comment

Comments

@kh0r
Copy link

kh0r commented Jul 6, 2022

What happened?

When trying to setup my new rails project using docker-compose I couldn't make the browser tests work. The selenium/standalone-chrome container crashed everytime when the rails test runner wanted to create a session. I could reproduce it with the docker run command from the readme:

docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-chrome:4.3.0-20220628
curl -X POST -H 'Content-Type: application/json' \
     -d '{"desiredCapabilities": { "browserName": "chrome" }}' \
     http://localhost:4444/session

Hardware is MacBook Pro M1 Pro running MacOS 12.4

Command used to start Selenium Grid with Docker

docker run -d -p 4444:4444 --shm-size="2g" selenium/standalone-chrome:4.3.0-20220628

Relevant log output

{
  "value": {
    "error": "session not created",
    "message": "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: unknown error: Chrome failed to start: crashed.\n  (unknown error: DevToolsActivePort file doesn't exist)\n  (The process started from chrome location \u002fusr\u002fbin\u002fgoogle-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)\nBuild info: version: '4.3.0', revision: 'a4995e2c09*'\nSystem info: host: '528fc5d951d1', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.104-linuxkit', java.version: '11.0.15'\nDriver info: driver.version: unknown\nBuild info: version: '4.3.0', revision: 'a4995e2c09*'\nSystem info: host: '528fc5d951d1', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.104-linuxkit', java.version: '11.0.15'\nDriver info: driver.version: unknown",
    "stacktrace": [
      {
        "fileName": "DriverServiceSessionFactory.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "apply",
        "className": "org.openqa.selenium.grid.node.config.DriverServiceSessionFactory",
        "lineNumber": 194,
        "classLoaderName": "app"
      },
      {
        "fileName": "DriverServiceSessionFactory.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "apply",
        "className": "org.openqa.selenium.grid.node.config.DriverServiceSessionFactory",
        "lineNumber": 67,
        "classLoaderName": "app"
      },
      {
        "fileName": "SessionSlot.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "apply",
        "className": "org.openqa.selenium.grid.node.local.SessionSlot",
        "lineNumber": 145,
        "classLoaderName": "app"
      },
      {
        "fileName": "LocalNode.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "newSession",
        "className": "org.openqa.selenium.grid.node.local.LocalNode",
        "lineNumber": 362,
        "classLoaderName": "app"
      },
      {
        "fileName": "LocalDistributor.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "startSession",
        "className": "org.openqa.selenium.grid.distributor.local.LocalDistributor",
        "lineNumber": 624,
        "classLoaderName": "app"
      },
      {
        "fileName": "LocalDistributor.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "newSession",
        "className": "org.openqa.selenium.grid.distributor.local.LocalDistributor",
        "lineNumber": 550,
        "classLoaderName": "app"
      },
      {
        "fileName": "LocalDistributor.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "handleNewSessionRequest",
        "className": "org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable",
        "lineNumber": 797,
        "classLoaderName": "app"
      },
      {
        "fileName": "LocalDistributor.java",
        "moduleVersion": null,
        "moduleName": null,
        "nativeMethod": false,
        "methodName": "lambda$run$1",
        "className": "org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable",
        "lineNumber": 758,
        "classLoaderName": "app"
      },
      {
        "fileName": "ThreadPoolExecutor.java",
        "moduleVersion": "11.0.15",
        "moduleName": "java.base",
        "nativeMethod": false,
        "methodName": "runWorker",
        "className": "java.util.concurrent.ThreadPoolExecutor",
        "lineNumber": 1128,
        "classLoaderName": null
      },
      {
        "fileName": "ThreadPoolExecutor.java",
        "moduleVersion": "11.0.15",
        "moduleName": "java.base",
        "nativeMethod": false,
        "methodName": "run",
        "className": "java.util.concurrent.ThreadPoolExecutor$Worker",
        "lineNumber": 628,
        "classLoaderName": null
      },
      {
        "fileName": "Thread.java",
        "moduleVersion": "11.0.15",
        "moduleName": "java.base",
        "nativeMethod": false,
        "methodName": "run",
        "className": "java.lang.Thread",
        "lineNumber": 829,
        "classLoaderName": null
      }
    ]
  }
}

Operating System

MacOS 12.4 (21F79)

Docker Selenium version (tag)

4.3.0-20220628

@diemol
Copy link
Member

diemol commented Jul 6, 2022

@diemol diemol closed this as completed Jul 6, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 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