[ selenium grid 4] driver.version: unknown

33 views
Skip to first unread message

cen maple

unread,
May 17, 2024, 2:28:23 AMMay 17
to Selenium Users
if i set the browserVersion in capability will has this issue,
if  no set, run normally

i don't know why, the driver version and chrome version is the same.

bellow is the code and log
CODE:
from selenium import webdriver

option = webdriver.ChromeOptions()

option.set_capability("browserVersion","124.0.6367.207")

webdriver = webdriver.Remote(command_executor ='http://192.168.3.35:4444/wd/hub' ,options=option)

webdriver.get("https://www.selenium.dev")




ERROR LOG
D:\Python\Python311\python.exe D:/OfflineaCare/ndb/program/test/test_oooooooo.py
Traceback (most recent call last):
  File "D:\OfflineaCare\ndb\program\test\test_oooooooo.py", line 12, in <module>
   
  File "D:\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 208, in __init__
    self.start_session(capabilities)
  File "D:\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 292, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 347, in execute
    self.error_handler.check_response(response)
  File "D:\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Could not start a new session. New session request timed out
Host info: host: 'DESKTOP-N03GIE9', ip: '192.168.56.1'
Build info: version: '4.20.0', revision: '866c76ca80'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '21.0.3'
Driver info: driver.version: unknown
Stacktrace:
    at org.openqa.selenium.grid.sessionqueue.local.LocalNewSessionQueue.addToQueue (LocalNewSessionQueue.java:221)
    at org.openqa.selenium.grid.sessionqueue.NewSessionQueue.lambda$new$0 (NewSessionQueue.java:68)
    at org.openqa.selenium.remote.http.Route$TemplatizedRoute.handle (Route.java:192)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:346)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.grid.sessionqueue.NewSessionQueue.execute (NewSessionQueue.java:128)
    at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler.execute (SpanWrappedHttpHandler.java:87)
    at org.openqa.selenium.remote.http.Filter$1.execute (Filter.java:63)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:346)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.grid.router.Router.execute (Router.java:87)
    at org.openqa.selenium.grid.web.CheckOriginHeader.lambda$apply$0 (CheckOriginHeader.java:69)
    at org.openqa.selenium.grid.web.CheckContentTypeHeader.lambda$apply$0 (CheckContentTypeHeader.java:75)
    at org.openqa.selenium.grid.web.EnsureSpecCompliantResponseHeaders.lambda$apply$0 (EnsureSpecCompliantResponseHeaders.java:34)
    at org.openqa.selenium.remote.http.Filter$1.execute (Filter.java:63)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:346)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.remote.http.Route$NestedRoute.handle (Route.java:270)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:346)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:346)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:346)
    at org.openqa.selenium.remote.http.Route.execute (Route.java:69)
    at org.openqa.selenium.remote.http.Route$CombinedRoute.handle (Route.java:346)
    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.util.concurrent.Executors$RunnableAdapter.call (Executors.java:572)
    at java.util.concurrent.FutureTask.run (FutureTask.java:317)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1144)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:642)
    at java.lang.Thread.run (Thread.java:1583)

Process finished with exit code 1
Reply all
Reply to author
Forward
0 new messages