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]: 4.12.1 chrome crashes upon start #1934

Closed
brondsem opened this issue Sep 5, 2023 · 6 comments
Closed

[🐛 Bug]: 4.12.1 chrome crashes upon start #1934

brondsem opened this issue Sep 5, 2023 · 6 comments

Comments

@brondsem
Copy link

brondsem commented Sep 5, 2023

What happened?

The docker image for 4.11 and previous has been working fine. Now using 4.12.1 (current latest) starts giving the following error. The docker image is running and our python code starts a connection with the remote chrome webdriver.

We already have the no-sandbox option set and tried adding disable-dev-shm-usage but that didn't help.

  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.) 
Host info: host: 'c1382625d9d7', ip: '172.17.0.2'
Build info: version: '4.12.1', revision: '8e34639b11'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.13-1.el7.elrepo.x86_64', java.version: '11.0.20.1'
Driver info: driver.version: unknown
Build info: version: '4.12.1', revision: '8e34639b11'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.13-1.el7.elrepo.x86_64', java.version: '11.0.20.1'
Driver info: driver.version: unknown
Stacktrace:
    at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply (DriverServiceSessionFactory.java:233)
    at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply (DriverServiceSessionFactory.java:73)
    at org.openqa.selenium.grid.node.local.SessionSlot.apply (SessionSlot.java:147)
    at org.openqa.selenium.grid.node.local.LocalNode.newSession (LocalNode.java:468)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession (LocalDistributor.java:648)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession (LocalDistributor.java:565)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest (LocalDistributor.java:829)
    at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1 (LocalDistributor.java:785)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    at java.lang.Thread.run (Thread.java:829)```

### Command used to start Selenium Grid with Docker

```shell
docker run -p 4444:4444 -p 5900:5900 -p 7900:7900 -v /dev/shm:/dev/shm -e SE_OPTS="--session-retry-interval 1" -e SE_NODE_SESSION_TIMEOUT=1000 selenium/standalone-chrome:latest

Relevant log output

2023-09-05 17:26:11,608 INFO Included extra file "/etc/supervisor/conf.d/selenium.conf" during parsing
2023-09-05 17:26:11,614 INFO RPC interface 'supervisor' initialized
2023-09-05 17:26:11,614 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2023-09-05 17:26:11,614 INFO supervisord started with pid 8
2023-09-05 17:26:12,618 INFO spawned: 'xvfb' with pid 10
2023-09-05 17:26:12,620 INFO spawned: 'vnc' with pid 11
2023-09-05 17:26:12,623 INFO spawned: 'novnc' with pid 12
2023-09-05 17:26:12,626 INFO spawned: 'selenium-standalone' with pid 13
Appending Selenium options: --log-level FINE
2023-09-05 17:26:12,639 INFO success: xvfb entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-09-05 17:26:12,639 INFO success: vnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-09-05 17:26:12,640 INFO success: novnc entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2023-09-05 17:26:12,640 INFO success: selenium-standalone entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
Setting up SE_NODE_GRID_URL...
Selenium Grid Standalone configuration:
[network]
relax-checks = true

[node]
session-timeout = "1000"
override-max-sessions = false
detect-drivers = false
drain-after-session-count = 0
max-sessions = 1

[[node.driver-configuration]]
display-name = "chrome"
stereotype = '{"browserName": "chrome", "browserVersion": "116.0", "platformName": "Linux"}'
max-sessions = 1

Starting Selenium Grid Standalone...
Tracing is disabled
17:26:13.408 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
17:26:13.417 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
17:26:14.536 INFO [NodeOptions.getSessionFactories] - Detected 4 available processors
17:26:14.623 INFO [NodeOptions.report] - Adding chrome for {"browserName": "chrome","browserVersion": "116.0","platformName": "linux","se:noVncPort": 7900,"se:vncEnabled": true} 1 times
17:26:14.651 INFO [Node.<init>] - Binding additional locator mechanisms: relative
17:26:14.685 INFO [GridModel.setAvailability] - Switching Node c7aeb65f-a783-4cbc-a34b-6e8c406f18df (uri: http://172.17.0.2:4444) from DOWN to UP
17:26:14.685 INFO [LocalDistributor.add] - Added node c7aeb65f-a783-4cbc-a34b-6e8c406f18df at http://172.17.0.2:4444. Health check every 120s
17:26:14.920 INFO [Standalone.execute] - Started Selenium Standalone 4.12.1 (revision 8e34639b11): http://172.17.0.2:4444
...

17:26:15.276 INFO [LocalDistributor.newSession] - Session request received by the Distributor:
 [Capabilities {browserName: chrome}]
17:26:15.486 WARN [SeleniumManager.lambda$runCommand$1] - Exception managing chrome: Unable to discover proper chromedriver version in offline mode
	 proxy=null
17:26:16.261 WARN [DriverServiceSessionFactory.apply] - 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.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: '7a84ccffaea7', ip: '172.17.0.2'
Build info: version: '4.12.1', revision: '8e34639b11'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.17.9-1.el7.elrepo.x86_64', java.version: '11.0.20.1'
Driver info: driver.version: unknown
}, capacity=128, totalAddedValues=2}, totalAttributeCount=2, events=[ImmutableEventData{name=exception, attributes={driver.url="http://localhost:21719", exception.message="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.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: '7a84ccffaea7', ip: '172.17.0.2'
Build info: version: '4.12.1', revision: '8e34639b11'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.17.9-1.el7.elrepo.x86_64', java.version: '11.0.20.1'
Driver info: driver.version: unknown", exception.stacktrace="org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location /opt/google/chrome/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: '7a84ccffaea7', ip: '172.17.0.2'
Build info: version: '4.12.1', revision: '8e34639b11'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.17.9-1.el7.elrepo.x86_64', java.version: '11.0.20.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:140)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:96)
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:68)
	at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:167)
	at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:73)
	at org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147)
	at org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:468)
	at org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession(LocalDistributor.java:648)
	at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession(LocalDistributor.java:565)
	at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest(LocalDistributor.java:829)
	at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1(LocalDistributor.java:785)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
", exception.type="org.openqa.selenium.SessionNotCreatedException", logger="org.openqa.selenium.grid.node.config.DriverServiceSessionFactory", session.capabilities="{"browserName": "chrome","browserVersion": "116.0","platformName": "linux","se:noVncPort": 7900,"se:vncEnabled": true}
"}, epochNanos=1693934776261311547, totalAttributeCount=6}], totalRecordedEvents=1, links=[], totalRecordedLinks=0, status=ImmutableStatusData{statusCode=ERROR, description=Kind: CANCELLED Description:}, hasEnded=true}
...

Operating System

centos

Docker Selenium version (tag)

4.12.1

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

@brondsem, 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!

@diemol
Copy link
Member

diemol commented Sep 5, 2023

4.11 had Chrome 115, 4.12.1 has Chrome 116. That is the difference.

I think this was reported to Chrome and there is a fix for 117. You might try beta.

@brondsem
Copy link
Author

brondsem commented Sep 5, 2023

Thanks the beta tag did work!

@brondsem brondsem closed this as completed Sep 5, 2023
@diemol
Copy link
Member

diemol commented Sep 5, 2023

Then make sure to switch back to 117 when that release happens.

@alexmi256
Copy link

Saw same issue, thanks for the workaround

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.
Projects
None yet
Development

No branches or pull requests

3 participants