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.0 Selenium Grid stopped working (PersistentCapabilities cannot be cast to class MutableCapabilities) #12663

Closed
eugenedani opened this issue Sep 1, 2023 · 3 comments

Comments

@eugenedani
Copy link

What happened?

We use Hub and Node to run Selenium tests, after updating to v. 4.12.0 Selenium Grid stopped working because of error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)

Is MutableCapabilities class was deprecated and we should use PersistentCapabilities class?

How can we reproduce the issue?

Hub command 
java -Xms512m -Xmx3g -Dwebdriver.http.factory=jdk-http-client -jar /root/selenium412/selenium-server.jar --ext /root/selenium412/selenium-http-jdk-client.jar hub --bind-host false --session-request-timeout 600 --newsession-threadpool-size 3 --session-retry-interval 5 --relax-checks true --port 4444

Node command on another machine 
java -Xms512m -Xmx4g -Dwebdriver.http.factory=jdk-http-client -jar /root/selenium412/selenium-server.jar --ext /root/selenium412/selenium-http-jdk-client.jar node --bind-host false --max-threads 3 --config /root/config.toml

Java 17 code 
`   
 protected RemoteWebDriver remoteWebDriver(@NotNull URL remoteAddress, @NotNull MutableCapabilities capabilities) {
        RemoteWebDriver remoteWebDriver = new RemoteWebDriver(remoteAddress, capabilities); // it fails here
        remoteWebDriver.setFileDetector(new LocalFileDetector());
        return remoteWebDriver;
    }
    `

Relevant log output

Could not start a new session. Response code 500. Message: Could not start a new session. Could not start a new session. Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 116.0, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}, error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44) For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/ Build info: version: '4.12.0', revision: '249f2a7d1b*' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1' Driver info: driver.version: unknown Host info: host: '95a1aca9a21c', ip: '172.140.110.4' Build info: version: '4.12.0', revision: '249f2a7d1b*' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1' Driver info: driver.version: unknown Build info: version: '4.12.0', revision: '249f2a7d1b*' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1' Driver info: driver.version: unknown Build info: version: '4.12.0', revision: '249f2a7d1b*' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1' Driver info: org.openqa.selenium.remote.RemoteWebDriver Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}]}] Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Could not start a new session. Could not start a new session. Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 116.0, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}, error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown 
Host info: host: '95a1aca9a21c', ip: '172.140.110.4'
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Command: [null, newSession {capabilities=[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}]}]
Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}
	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.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
	at org.openqa.selenium.remote.TracedCommandExecutor.execute(TracedCommandExecutor.java:51)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:602)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:163)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:143)
	at com.polarion.selenium.framework.web.driver.types.PolarionDriver.remoteWebDriver(PolarionDriver.java:46)
	at com.polarion.selenium.framework.web.driver.types.RemoteDriver.create(RemoteDriver.java:30)
	at com.polarion.selenium.framework.web.driver.DelegatingWebDriver.<init>(DelegatingWebDriver.java:69)
	at com.polarion.selenium.framework.web.driver.WebBrowser.<init>(WebBrowser.java:41)
	at com.polarion.selenium.framework.web.driver.BrowserFactory.initializeWebDriver(BrowserFactory.java:32)
	at com.polarion.selenium.framework.web.driver.BrowserFactory.openNewBrowserWith(BrowserFactory.java:21)
	at com.polarion.selenium.framework.ConfigurationData.getWebBrowserWith(ConfigurationData.java:193)
	at com.polarion.selenium.framework.PolarionWatcherTestRule.loadWebBrowser(PolarionWatcherTestRule.java:66)
	at com.polarion.selenium.framework.PolarionWatcherTestRule.webBrowser(PolarionWatcherTestRule.java:56)
	at com.polarion.selenium.framework.tests.BaseTestCase.<init>(BaseTestCase.java:55)
	at com.polarion.selenium.framework.tests.BaseTestCase.<init>(BaseTestCase.java:45)
	at com.polarion.selenium.framework.tests.ParameterizedBaseTestCase.<init>(ParameterizedBaseTestCase.java:18)
	at com.polarion.selenium.test.cases.home.HomePageTests.<init>(HomePageTests.java:39)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)

############################# Hub Log ######################
16:59:01.224 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
16:59:01.230 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
16:59:01.342 INFO [BoundZmqEventBus.<init>] - XPUB binding to [binding to tcp:https://*:4442, advertising as tcp:https://172.140.110.2:4442], XSUB binding to [binding to tcp:https://*:4443, advertising as tcp:https://172.140.110.2:4443]
16:59:01.409 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp:https://172.140.110.2:4442 and tcp:https://172.140.110.2:4443
16:59:01.427 INFO [UnboundZmqEventBus.<init>] - Sockets created
16:59:02.428 INFO [UnboundZmqEventBus.<init>] - Event bus ready
16:59:03.003 INFO [Hub.execute] - Started Selenium Hub 4.12.0 (revision 249f2a7d1b*): https://172.140.110.2:4444
17:16:58.212 INFO [Node.<init>] - Binding additional locator mechanisms: relative
17:16:58.536 INFO [GridModel.setAvailability] - Switching Node 77cf9dbd-732b-4b9d-96c8-40db55828b76 (uri: https://firefox:5555) from DOWN to UP
17:16:58.536 INFO [LocalDistributor.add] - Added node 77cf9dbd-732b-4b9d-96c8-40db55828b76 at https://firefox:5555. Health check every 120s
17:16:58.538 INFO [Node.<init>] - Binding additional locator mechanisms: relative
17:16:58.615 INFO [GridModel.setAvailability] - Switching Node ece45130-fac8-47ab-bf68-78b6254f98df (uri: https://chrome:5555) from DOWN to UP
17:16:58.616 INFO [LocalDistributor.add] - Added node ece45130-fac8-47ab-bf68-78b6254f98df at https://chrome:5555. Health check every 120s
17:17:06.730 INFO [LocalDistributor.newSession] - Session request received by the Distributor: 
 [Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}]
17:17:06.845 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "5c3954890f55d1c76ba950b6c7801116","eventTime": 1693581426729274655,"eventName": "Session request received by the Distributor","attributes": {"logger": "org.openqa.selenium.grid.distributor.local.LocalDistributor","request.payload": "[Capabilities {acceptInsecureCerts: true, browserName: chrome, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: \u002fusr\u002fbin\u002fgoogle-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}]"}}

17:17:06.846 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 {acceptInsecureCerts: true, browserName: chrome, browserVersion: 116.0, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}, error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown 
Host info: host: '95a1aca9a21c', ip: '172.140.110.4'
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
17:17:06.846 WARN [SeleniumSpanExporter$1.lambda$export$1] - org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Could not start a new session. Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 116.0, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}, error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown 
Host info: host: '95a1aca9a21c', ip: '172.140.110.4'
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.grid.node.remote.RemoteNode.newSession(RemoteNode.java:151)
	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:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)

####################### Chrome Node Log ############################
17:16:56.646 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
17:16:56.650 WARN [NodeServer.lambda$execute$7] - Support for max-threads flag is deprecated. The intent of the flag is to set the thread pool size in the Distributor. Please use newsession-threadpool-size flag instead.
17:16:56.652 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
17:16:56.774 INFO [UnboundZmqEventBus.<init>] - Connecting to tcp:https://selenium:4442 and tcp:https://selenium:4443
17:16:56.833 INFO [UnboundZmqEventBus.<init>] - Sockets created
17:16:57.835 INFO [UnboundZmqEventBus.<init>] - Event bus ready
17:16:57.924 INFO [NodeServer.createHandlers] - Reporting self as: https://chrome:5555
17:16:57.937 INFO [NodeOptions.getSessionFactories] - Detected 12 available processors
17:16:57.970 INFO [NodeOptions.report] - Adding chrome for {"browserName": "chrome","browserVersion": "116.0","platformName": "linux"} 2 times
17:16:57.990 INFO [Node.<init>] - Binding additional locator mechanisms: relative
17:16:58.169 INFO [NodeServer$1.start] - Starting registration process for Node https://chrome:5555
17:16:58.170 INFO [NodeServer.execute] - Started Selenium node 4.12.0 (revision 249f2a7d1b*): https://chrome:5555
17:16:58.184 INFO [NodeServer$1.lambda$start$1] - Sending registration event...
17:16:58.629 INFO [NodeServer.lambda$createHandlers$2] - Node has been added
17:17:06.830 WARN [DriverServiceSessionFactory.apply] - Error while creating session with the driver service. Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 116.0, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}, error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
17:17:06.833 WARN [SeleniumSpanExporter$1.lambda$export$1] - Error while creating session with the driver service. Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 116.0, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}, error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
17:17:06.833 WARN [SeleniumSpanExporter$1.lambda$export$1] - org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 116.0, goog:chromeOptions: {args: [--no-default-browser-check, --enable-automation, --start-maximized, --disable-password-generation, --headless=new, --window-size=1920,1080, --disable-crash-reporter], binary: /usr/bin/google-chrome, extensions: [], prefs: {credentials_enable_service: false, profile.password_manager_enabled: false}}, pageLoadStrategy: normal, unhandledPromptBehavior: ignore}, error class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: '4.12.0', revision: '249f2a7d1b*'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.19.0-25-amd64', java.version: '17.0.8.1'
Driver info: driver.version: unknown
	at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:25)
	at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:13)
	at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:142)
	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.node.NewNodeSession.execute(NewNodeSession.java:50)
	at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle(Route.java:193)
	at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
	at org.openqa.selenium.grid.security.RequiresSecretFilter.lambda$apply$0(RequiresSecretFilter.java:62)
	at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute(SpanWrappedHttpHandler.java:91)
	at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
	at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:347)
	at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
	at org.openqa.selenium.grid.node.Node.execute(Node.java:262)
	at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:347)
	at org.openqa.selenium.remote.http.Route.execute(Route.java:69)
	at org.openqa.selenium.remote.AddWebDriverSpecHeaders.lambda$apply$0(AddWebDriverSpecHeaders.java:35)
	at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
	at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
	at org.openqa.selenium.remote.ErrorFilter.lambda$apply$0(ErrorFilter.java:44)
	at org.openqa.selenium.remote.http.Filter$1.execute(Filter.java:63)
	at org.openqa.selenium.netty.server.SeleniumHandler.lambda$channelRead0$0(SeleniumHandler.java:44)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.ClassCastException: class org.openqa.selenium.PersistentCapabilities cannot be cast to class org.openqa.selenium.MutableCapabilities (org.openqa.selenium.PersistentCapabilities and org.openqa.selenium.MutableCapabilities are in unnamed module of loader org.openqa.selenium.grid.Bootstrap$PossessiveClassLoader @29453f44)
	at org.openqa.selenium.manager.SeleniumManager.getDriverPath(SeleniumManager.java:261)
	at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:22)
	... 27 more

Operating System

ubuntu:jammy-20230624

Selenium version

4.12.0

What are the browser(s) and version(s) where you see this issue?

any

What are the browser driver(s) and version(s) where you see this issue?

any

Are you using Selenium Grid?

4.12.0

@github-actions
Copy link

github-actions bot commented Sep 1, 2023

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

@titusfortner
Copy link
Member

This is a known issue. We'll be releasing Selenium 4.12.1 for Java soon.

@diemol diemol closed this as completed in 0178bb1 Sep 4, 2023
diemol added a commit that referenced this issue Sep 4, 2023
Copy link

github-actions bot commented Dec 6, 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 6, 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