[🐛 Bug]: Unable to obtain: Capabilities -> Issue still present in 4.15
What happened?
Occasionally in our tests we get this error. I can't see any thing special that happens, it is just that sometimes we cant get a session from the grid.
Our setup is like: Kubernetes for 1 hub with selenium/hub:4.15 4 Nodes based on selenium/node-base:4.15 all with different capabilities (3 nodes with mtls certs inserted and 1 node "vanilla")
All nodes have "manually installed" browsers as in we install chrome, edge and firefox it in the dockerfile.
All nodes are setup with this config:
[node]
session-timeout = "300"
override-max-sessions = true
detect-drivers = false
drain-after-session-count = 0
max-sessions = 3
How can we reproduce the issue?
I am not really sure.. But run large testsuites with the same setup..
Relevant log output
TEST OUTPUT:
Could not start a new session. Could not start a new session. Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json]
HUB LOGG:
2023-11-02T15:43:03.876406685Z 16:43:03.874 WARN [SeleniumSpanExporter$1.lambda$export$1] - Unable to create session: Could not start a new session. Could not start a new session. Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json]
2023-11-02T15:43:03.876427114Z
NODE LOGG:
2023-11-02T15:43:03.806141219Z 16:43:03.802 WARN [DriverServiceSessionFactory.apply] - Error while creating sess
ion with the driver service. Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json]
2023-11-02T15:43:03.806184939Z
2023-11-02T15:43:03.806188804Z Build info: version: '4.15.0', revision: '1d14b5521b'
2023-11-02T15:43:03.806191602Z System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-148-generic', java.version: '11.0.20.1'
2023-11-02T15:43:03.806194038Z Driver info: driver.version: unknown
2023-11-02T15:43:03.862931362Z 16:43:03.862 WARN [SeleniumSpanExporter$1.lambda$export$1] - Error while creating session with the driver service. Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json]
2023-11-02T15:43:03.862962388Z
2023-11-02T15:43:03.862967328Z Build info: version: '4.15.0', revision: '1d14b5521b'
2023-11-02T15:43:03.862971199Z System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-148-generic', java.version: '11.0.20.1'
2023-11-02T15:43:03.862974749Z Driver info: driver.version: unknown
2023-11-02T15:43:03.862995981Z 16:43:03.862 WARN [SeleniumSpanExporter$1.lambda$export$1] - org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {browserName: chrome, goog:chromeOpt
ions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json]
2023-11-02T15:43:03.862999390Z
2023-11-02T15:43:03.863002753Z Build info: version: '4.15.0', revision: '1d14b5521b'
2023-11-02T15:43:03.863005955Z System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-148-generic', java.version: '11.0.20.1'
2023-11-02T15:43:03.863009181Z Driver info: driver.version: unknown
2023-11-02T15:43:03.863016145Z at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:25)
2023-11-02T15:43:03.863019378Z at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:13)
2023-11-02T15:43:03.863022575Z at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:135)
2023-11-02T15:43:03.863026075Z at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:72)
2023-11-02T15:43:03.863030038Z at org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147)
2023-11-02T15:43:03.863033489Z at org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:464)
2023-11-02T15:43:03.863036588Z at org.openqa.selenium.grid.node.NewNodeSession.execute(NewNodeSession.java:50)
2023-11-02T15:43:03.863039667Z at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:193)
2023-11-02T15:43:03.863043314Z at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2023-11-02T15:43:03.863046561Z at org.openqa.selenium.grid.security.RequiresSecretFilter.lambda$apply$0(RequiresSecretFilter.java:62)
2023-11-02T15:43:03.863049787Z at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandle
r.execute(SpanWrappedHttpHandler.java:87)
2023-11-02T15:43:03.863053090Z at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
2023-11-02T15:43:03.863069173Z at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:345)
2023-11-02T15:43:03.863072335Z at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2023-11-02T15:43:03.863075471Z at org.openqa.selenium.grid.node.Node.execute(Node.java:262)
2023-11-02T15:43:03.863078622Z at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:345)
at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
2023-11-02T15:43:03.863085184Z at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)
2023-11-02T15:43:03.863088371Z at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
2023-11-02T15:43:03.863092190Z at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
2023-11-02T15:43:03.863095368Z at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
2023-11-02T15:43:03.863098424Z at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
2023-11-02T15:43:03.863101515Z at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)
2023-11-02T15:43:03.863104560Z at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
2023-11-02T15:43:03.863107893Z at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2023-11-02T15:43:03.863111152Z at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
2023-11-02T15:43:03.863114379Z at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
2023-11-02T15:43:03.863117667Z at java.base/java.lang.Thread.run(Thread.java:829)
2023-11-02T15:43:03.863121464Z Caused by: org.openqa.selenium.WebDriverException: Failed to parse json output, executed: [--browser, chrome, --output, json]
2023-11-02T15:43:03.863124322Z
2023-11-02T15:43:03.863127377Z Build info: version: '4.15.0', revision: '1d14b5521b'
2023-11-02T15:43:03.863130468Z System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-148-generic', java.version: '11.0.20.1'
2023-11-02T15:43:03.863133769Z Driver info: driver.version: unknown
2023-11-02T15:43:03.863137151Z at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:159)
2023-11-02T15:43:03.863140268Z at org.openqa.selenium.manager.SeleniumManager.getDriverPath(SeleniumManager.java:287)
at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:22)
2023-11-02T15:43:03.863146600Z ... 27 more
2023-11-02T15:43:03.863149498Z
2023-11-02T15:43:03.864350710Z 16:43:03.863 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "07f2c28742f721dd37ba3f618ff800b0","eventTime": 1698939783805096190,"eventName": "exception","attributes": {"exception.message": "Error while creating session with the driver service. Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json]\n\nBuild info: version: '4.15.0', revision: '1d14b5521b'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-148-generic', java.version: '11.0.20.1'\nDriver info: driver.version: unknown","exception.stacktrace": "org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json]\n\nBuild info: version: '4.15.0', revision: '1d14b5521b'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-148-generic', java.version: '11.0.20.1'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFin
der.java:25)\n\tat org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:13)\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:135)\n\tat org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:72)\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:464)\n\tat org.openqa.selenium.grid.node.NewNodeSession.execute(NewNodeSession.java:50)\n\tat org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:193)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:69)\n\tat org.openqa.selenium.grid.security.RequiresSecretFilter.lambda$apply$0(RequiresSecretFilter.java:62)\n\tat org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:87)\n\tat org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:345)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:69)\n\tat org.openqa.selenium.grid.node.Node.execute(Node.java:262)\n\tat org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:345)\n\tat org.openqa.selenium.remote.http.Route.execute(Route.java:69)\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:63)\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:63)\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)\nCaused by: org.openqa.selenium.WebDriverException: Failed to parse json output, executed: [--browser, chrome, --output, json]\n\nBuild info: version: '4.15.0', revision: '1d14b5521b'\nSystem info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-148-generic', java.version: '11.0.20.1'\nDriver info: driver.version: unknown\n\tat org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:159)\n\tat org.openqa.selenium.manager.SeleniumManager.getDriverPath(SeleniumManager.java:287)\n\tat org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:22)\n\t... 27 more\n","exception.type": "org.openqa.selenium.remote.NoSuchDriverException","logger": "org.openqa.selenium.grid.node.config.DriverServiceSessionFactory","session.capabilities": "{\"browserName\": \"chrome\",\"goog:chromeOptions\": {\"args\": [\"--start-maximized\",\"--ignore-certificate-errors\",\"--no-default-browser-check\",\"--enable-logging\"],\"extensions\": [\"Q3IyNAMAAABFAgAAEqwECqYCMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyVH9Huxh4Nf2mlfYZNjT0HYTc2OrUUZpSMAQ9mHilPGmkGVnllBpNsStuLC8Df8eL\\u002f0d\\u002fR\\u002fRLuQe2wtPt5A9wYJZ6Pj1r8cQN6cKno6TwzQUdrXteCgkA+dbbkfMXLF9oyBWQiLQZ5S8cmHxjiONr5bLygjDdJD5ayr1VUfYjXxJHMrSnBLRhQLQyROYH4ncEhY40HeEVWuPjOiBzERJHnmMGmjlS4Dhf5sFaVigU1q1QFgnam\\u002fu\\u002f6H4tsq06ATB2Ssd14wm3r2HyFkXCCFMvXe8QGSK+5dGeRSQOkfcNfTB6U5Ksb1ud+X+ZWvNpei\\u002fLH2xcAVWuvt6XYySqYXqJQIDAQABEoACNFJmEq4uAON6SNgEfhDyUO1QjU+I1tU+KxSj7gU50UfljHU3GjCujzIOBpoVZdPz8bx7F+6v8eb4ft28N7g\\u002f7D6SiagEl2aIVm1i\\u002fAkq5fcDXMcDfn\\u002ffMYtkMe4UNRdoVkl5sK\\u002fC07A1\\u002f5aYYHVNhkYmPbIgh9v13agn6pA81X3VjakapvXiaMxeABGQzZ4fNLifPwMoVyKa9F97fx5+ksEEy4PnqkITspTJAuMYH+2YASXrw7Cc\\u002fakv6wIGbdpR9fUkanYVQRXvwPV3fBgEwFLQ5SatM3bEEvAYZ\\u002fd3PavGuh0Kz5sLwe9rsJ53H
PfHjsNdOe8J9t40NF6uCZUVj4LxBBIKEIiZfw9ojO0EFsGWXgPdgOdQSwMEFAAACAgA73AsT9s0DMv8AAAAgAEAAA0AAABiYWNrZ3JvdW5kLmpzdY8\\u002fT8NADMX3+xRWljZSc2laQSCBAbEysVYd3IvLHU0u5f6kgijfnUuAqAuLZb+f7afXoQFvyWhsCB4hyu7zzfomy5PbzfYuKlkX+BmtvbSmGrmQKAXS1y8y5Mxn0LclY0KatiF+ocMrfXiyjrf6yTs5TspQxbGqXpR1pMksGcDRa+FUq0GiruqgVeRQ1TaGPlAAdYRlkvw4PMA6nkQYLb3R0AvUguoCnPE0lOwaYXB9Do6kncLaFtD\\u002fRSzmsKs5VjF3w\\u002fRnWIXSezMe7iLp3NkWaYqOU+LeUYcAhmdZnnNLadOd0mgF85b9f2s\\u002f\\u002fd0tDnUrTkq\\u002fLfYsLtk3UEsDBBQAAAgIAOpwLE8ynCbHsAAAACcBAAANAAAAbWFuaWZlc3QuanNvbn2PwQ6CMBBE73xFsydNtIAXE276CV4NMQUXKNiC3QUPhH+3aCIxMR5n3uxkdgyEAKOsLpD4MqAj3VpIxG4zA6sMegGHniu0rHPFHouidWJFvFYsccu1ssToZBzv95IQXpdLE8QyktHb7dAZTTMgT85QMXeUhOHPotAMTQgb8UnR39QDsxPee\\u002f\\u002fGtzre2rzRtoT0NSFTeVO6trdXv2D0jvcod7rj96SFy5og9YEpmIInUEsBAgAAFAAACAgA73AsT9s0DMv8AAAAgAEAAA0AAAAAAAAAAQAAAAAAAAAAAGJhY2tncm91bmQuanNQSwECAAAUAAAICADqcCxPMpwmx7AAAAAnAQAADQAAAAAAAAABAAAAAAAnAQAAbWFuaWZlc3QuanNvblBLBQYAAAAAAgACAHYAAAACAgAAAAA=\"]},\"goog:loggingPrefs\": {\"browser\": \"ALL\",\"performance\": \"ALL\",\"driver\": \"ALL\"},\"networkname:applicationName\": \"invanare\",\"nodename:applicationName\": \"invanare\",\"platformName\": \"linux\",\"se:noVncPort\": 7900,\"se:vncEnabled\": true}\n"}}
2023-11-02T15:43:03.864404146Z
2023-11-02T15:43:03.865137807Z 16:43:03.864 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "07f2c28742f721dd37ba3f618ff800b0","eventTime": 1698939783863436494,"eventName": "Unable to create session with the driver","attributes": {"current.session.count": 0,"logger": "org.openqa.selenium.grid.node.local.LocalNode","session.request.capabilities": "Capabilities {browserName: chrome, goog:chromeOptions: {args: [--start-maximized, --ignore-certificate-errors, --no-default-browser-check, --enable-logging], extensions: [Q3IyNAMAAABFAgAAEqwECqYCMII...]}, goog:loggingPrefs: {browser: ALL, driver: ALL, performance: ALL}, networkname:applicationName: invanare, nodename:applicationName: invanare}","session.request.downstreamdialect": "[W3C]"}}
2023-11-02T15:43:03.
865149486Z
2023-11-02T15:43:03.998859466Z 16:43:03.998 WARN [SeleniumManager.lambda$runCommand$1] - Exception managing chrome: Unable to discover proper chromedriver version in offline mode
Operating System
Runs on docker
Selenium version
4.15
What are the browser(s) and version(s) where you see this issue?
Latest Chrome, Edge, Firefox
What are the browser driver(s) and version(s) where you see this issue?
Latest of each
Are you using Selenium Grid?
Yes. 4.15.
@parholmdahl, 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!
Oh! And a note: This error was not present in 4.11..
This might be a Chrome 118 issue, please update versions and try again. #12954
I am still seeing this issue on 4.15.0 running Chrome 119
I also see this with 119
We are trying to upgrade from 4.8 to 4.15 to have the latest version of browsers, and we are facing the same problem! Parallel testing no longer works.
This is a huge problem/blocker.
Seems like this is the same as #12802 as well, and we thought caching in 4.15 would fix.
One thing I see in common with all of these is that they are using se:vncEnabled.
From the java logs it looks like the output of the selenium manager is not json / blank. I am looking correctly at the rust code, it might be possible the selenium manager does not return json if there are no log entries for what ever reason: https://github.com/SeleniumHQ/selenium/blob/trunk/rust/src/logger.rs#L220-L222
@bonigarcia am i reading the rust code correctly?
Maybe we should be outputting the logs as they happen after all, instead of trying to parse them in the result, in case the result has a bug for some reason.
Since last Friday (2 days ago) we are also getting this issue: I suspect it is because of Chrome browser 118 (and 119 and above) because this failure did not appear with Chrome 117. We are using Selenium 4.4 (and Selenide) so I don't think it has to do with selenium manager. Tomorrow we will revert to 117 hoping the issue goes away.
This issue is giving an error that the selenium manager JSON can't be parsed. What is the error/stack trace you think matches it?
Also, make sure your driver & browser versions match exactly if you aren't using Selenium Manager.
titus, our error shows: selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Could not start a new session. Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 118.0, goog:chromeOptions: {args: [--no-sandbox, --disable-dev-shm-usage, --disable-extensions, --window-size=1920,1080, --remote-allow-origins=*], extensions: [], prefs: {download.default_directory: ~/Downloads}}, goog:loggingPrefs: {browser: ALL, performance: ALL}, platformName: linux, proxy: {httpProxy: xxx.xxx.xxx.xx:yyyyy, proxyType: manual, sslProxy: xxx.xxx.xxx.xx:yyyyy}, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, chrome, --output, json, --browser-version, 118.0, --proxy, xxx.xxx.xxx.xxx:yyyy] ... Build info: version: '4.14.1', revision: '03f8ede370' ... Build info: version: '4.4.0', revision: 'e5c75ed026a'
In my Intellij (java) > External Libraries it shows for selenium 4.4.0 We use docker image https://hub.docker.com/r/selenium/standalone-chrome and I think the "4.14.1" is for the Selenium Grid of that image. I have no idea how selenium grid 4.14.1 of a docker image works together with the selenium 4.4.0 defined in the dependencies of our pom files.
I'm not sure, but it like to be the same as 1992.
I did a test by just opening a few browsers and do a sleep. As soon as there are some in parallel/at the same time the problem quickly arises.
This is a major blocker because we have lost stability.
I use the following versions:
- selenium/standalone-firefox:4.15.0-20231102
- selenium/standalone-chrome:4.15.0-20231102
- selenium/standalone-edge:4.15.0-20231102
- selenium/node-docker:4.15.0-20231102
- selenium/hub:4.15.0-20231102
- robotframework 6.1.1
- robotframework-seleniumlibrary 6.1.3
SessionNotCreatedException: Message: Could not start a new session. Could not start a new session. Unable to create session: Could not start a new session. Response code 500. Message: Could not start a new session. Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 119.0, moz:debuggerAddress: true, moz:firefoxOptions: {profile: UEsDBBQAAAAIAHuCZFfrmRmacgM...}, pageLoadStrategy: normal, platformName: linux, se:noVncPort: 7900, se:vncEnabled: true}, error Failed to parse json output, executed: [--browser, firefox, --output, json, --browser-version, 119.0]
Build info: version: '4.15.0', revision: '1d14b5521b' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-213-generic', java.version: '11.0.20.1' Driver info: driver.version: unknown Host info: host: '2b0b89d51cb4', ip: '172.23.0.11' Build info: version: '4.15.0', revision: '1d14b5521b' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-213-generic', java.version: '11.0.20.1' Driver info: driver.version: unknown Build info: version: '4.15.0', revision: '1d14b5521b' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-213-ge... [ Message content over the limit has been removed. ] Build info: version: '4.15.0', revision: '1d14b5521b' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.15.0-213-generic', java.version: '11.0.20.1' Driver info: driver.version: unknown Stacktrace: at org.openqa.selenium.grid.node.remote.RemoteNode.newSession (RemoteNode.java:151) at org.openqa.selenium.grid.distributor.local.LocalDistributor.startSession (LocalDistributor.java:645) at org.openqa.selenium.grid.distributor.local.LocalDistributor.newSession (LocalDistributor.java:564) at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.handleNewSessionRequest (LocalDistributor.java:824) at org.openqa.selenium.grid.distributor.local.LocalDistributor$NewSessionRunnable.lambda$run$1 (LocalDistributor.java:784) 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)
@vaatje right, the node is using Selenium Manager, trying to parse the results and failing for some reason. The client version of Selenium does not matter in this case.
Is there anyone seeing this issue while not using Docker?
We need a way to entirely skip the usage of SM when the environment is already configured. This is an overhead in the Docker images.
I've been analyzing this issue. The problem seems to be that the JSON output expected by the Java bindings is empty. I believe this can be caused by one of the following causes:
- Selenium Manager does not return a valid JSON output. This would be caused on the Rust side. And theoretically, this never happens. But just in case, I have created a PR to detect it.
- Selenium Manager is not correctly executed. This would be caused on the Java side. For some reason, maybe due to some race condition (since this happens only occasionally), the Selenium Manager is not executed, or at least, its output (JSON) is not collected correctly.
@jonathan-fortin Can you help to detect the cause (Rust or Java)? For that, and since you are already using Selenium 4.15.0, please download the Selenium Manager binary containing the previous PR (i.e., this file: selenium-manager_linux-x64), uncompress and replace it with the one in your cache (~/.cache/selenium/manager/0.4.15). Then, run your tests again. If the problem is caused in Java, you will experience the same issue (i.e., occasional JSON output). If the problem is caused in Rust, you should see the error message JSON output has been specified, but no entries have been collected. Thanks.
In any case, I agree with @diemol, and I believe we need to implement some mechanism (an env, maybe) to skip using Selenium Manager entirely. Because in this use case (Docker containers), Selenium Manager should not be executed at all.
Hi all,
We are also experiencing this issue and I can confirm that this is happening with chromedriver 118 and above. With 117 version is working fine.
In my case I'm running tests using docker selenium grid, all updated to the last version except chromedriver (to make it work).
Hi all,
We are also experiencing this issue and I can confirm that this is happening with chromedriver 118 and above. With 117 version is working fine.
In my case I'm running tests using docker selenium grid, all updated to the last version except chromedriver (to make it work).
In which docker image tag works and which one does not?
For us the revert today to standalone-chrome 117 made the issue disappear.
OK, this is not related to the Chrome version. It is related to the Selenium version. The Chrome 117 image uses Selenium 4.13, while the Chrome 118 image uses Selenium 4.14.1 https://github.com/SeleniumHQ/docker-selenium/releases/tag/4.13.0-20231004