Open ketanb02 opened 3 weeks ago
@ketanb02, thank you for creating this issue. We will troubleshoot it as soon as we can.
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!
It shouldn't attempt to make any network calls when selenium-manager is not set to true. What is your config.toml
?
Grid won't use Selenium Manager at all if the location of the drivers are set by System Property.
Set logging to FINE
to see exactly what is happening.
`[node] detect-drivers = false override-max-sessions = false max-sessions = 2 grid-url = "https://IP:PORT"
[[node.driver-configuration]] display-name = "Chrome" stereotype = "{\"browserName\": \"chrome\", \"browserVersion\": \"125.0\", \"platformName\": \"windows\"}"
[[node.driver-configuration]] display-name = "Firefox" stereotype = "{\"browserName\": \"firefox\", \"browserVersion\": \"126.0\", \"platformName\": \"windows\"}"
[[node.driver-configuration]] display-name = "MicrosoftEdge" stereotype = "{\"browserName\": \"MicrosoftEdge\", \"browserVersion\": \"125.0\", \"platformName\": \"windows\"}"
[server] host = "IP" port = PORT https-certificate = "CER.pem" https-private-key = "CER.key"
[events] publish = "tcp://IP:4442" subscribe = "tcp://IP:4443"
`
log-level FINE
20:10:04.482 DEBUG [RequestConverter.channelRead0] - Incoming message: DefaultHttpRequest(decodeResult: success, version: HTTP/1.1) POST /se/grid/node/session HTTP/1.1 Content-Length: 278 Host: ip:5555 traceparent: 00-1058358e6fa380fa47703990bb028068-5d6ea86f8c7971b8-01 User-Agent: selenium/4.21.0 (java unix) X-REGISTRATION-SECRET: 20:10:04.513 DEBUG [RequestConverter.channelRead0] - Start of http request: DefaultHttpRequest(decodeResult: success, version: HTTP/1.1) POST /se/grid/node/session HTTP/1.1 Content-Length: 278 Host: ip:5555 traceparent: 00-1058358e6fa380fa47703990bb028068-5d6ea86f8c7971b8-01 User-Agent: selenium/4.21.0 (java unix) X-REGISTRATION-SECRET: 20:10:04.529 DEBUG [RequestConverter.channelRead0] - Incoming message: DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 0, widx: 278, cap: 278/278, unwrapped: PooledUnsafeDirectByteBuf(ridx: 278, widx: 278, cap: 316)), decoderResult: success) 20:10:04.529 DEBUG [RequestConverter.channelRead0] - End of http request: DefaultLastHttpContent(data: PooledSlicedByteBuf(ridx: 278, widx: 278, cap: 278/278, unwrapped: PooledUnsafeDirectByteBuf(ridx: 278, widx: 278, cap: 316)), decoderResult: success) 20:10:04.529 DEBUG [SpanWrappedHttpHandler.execute] - Wrapping request. Before OpenTelemetryContext{tracer=io.opentelemetry.sdk.trace.SdkTracer@4387b79e, context={}, span id=0000000000000000, trace id=00000000000000000000000000000000} and after OpenTelemetryContext{tracer=io.opentelemetry.sdk.trace.SdkTracer@4387b79e, context={opentelemetry-trace-span-key=SdkSpan{traceId=1058358e6fa380fa47703990bb028068, spanId=ceb4099ab171a2e9, parentSpanContext=ImmutableSpanContext{traceId=1058358e6fa380fa47703990bb028068, spanId=5d6ea86f8c7971b8, traceFlags=01, traceState=ArrayBasedTraceState{entries=[]}, remote=true, valid=true}, name=node.new_session, kind=INTERNAL, attributes=AttributesMap{data={random.key=8a3a9e35-0b56-4272-b8eb-dcb751c3f974}, capacity=128, totalAddedValues=1}, status=ImmutableStatusData{statusCode=UNSET, description=}, totalRecordedEvents=0, totalRecordedLinks=0, startEpochNanos=1717697404529527600, endEpochNanos=0}}, span id=ceb4099ab171a2e9, trace id=1058358e6fa380fa47703990bb028068} 20:10:04.529 DEBUG [HttpTracing.inject] - Injecting (POST) /se/grid/node/session into OpenTelemetrySpan{traceId=1058358e6fa380fa47703990bb028068,spanId=ceb4099ab171a2e9} at org.openqa.selenium.remote.tracing.SpanWrappedHttpHandler:85 20:10:04.592 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\user.cache\selenium\manager\0.4.21\selenium-manager.exe 20:10:04.607 DEBUG [SeleniumManager.runCommand] - Executing Process: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json, --debug] 20:10:05.721 DEBUG [ExternalProcess$Builder.lambda$start$0] - completed to copy the output of process 6148 20:10:05.737 DEBUG [SeleniumManager.lambda$runCommand$1] - Sending stats to Plausible: Props { browser: "chrome", browser_version: "125.0", os: "windows", arch: "amd64", lang: "java", selenium_version: "4.21" } 20:10:05.737 DEBUG [SeleniumManager.lambda$runCommand$1] - Found chromedriver 125.0.6422.141 in PATH: O:\sel4\chromedriver.exe 20:10:05.737 DEBUG [SeleniumManager.lambda$runCommand$1] - Found chrome in PATH: O:\sel4\chrome-win64\chrome-win64\chrome.exe 20:10:05.737 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: wmic datafile where name='O:\sel4\chrome-win64\chrome-win64\chrome.exe' get Version /value 20:10:05.737 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "\r\r\n\r\r\nVersion=125.0.6422.141\r\r\n\r\r\n\r\r\n\r" 20:10:05.737 DEBUG [SeleniumManager.lambda$runCommand$1] - Detected browser: chrome 125.0.6422.141 20:10:05.737 DEBUG [SeleniumManager.lambda$runCommand$1] - Discovering versions from https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json 20:10:05.737 WARN [SeleniumManager.lambda$runCommand$1] - error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) 20:10:05.753 WARN [DriverServiceSessionFactory.apply] - Error while creating session with the driver service. Unable to obtain: chromedriver, error Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json, --debug] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown 20:10:05.753 DEBUG [SeleniumSpanExporter$1.lambda$export$4] - SpanData{spanContext=ImmutableSpanContext{traceId=1058358e6fa380fa47703990bb028068, spanId=7dfc3eb76584fdb2, traceFlags=01, traceState=ArrayBasedTraceState{entries=[]}, remote=false, valid=true}, parentSpanContext=ImmutableSpanContext{traceId=1058358e6fa380fa47703990bb028068, spanId=18441ef3c944c350, traceFlags=01, traceState=ArrayBasedTraceState{entries=[]}, remote=false, valid=true}, resource=Resource{schemaUrl=null, attributes={service.name="unknown_service:java", telemetry.sdk.language="java", telemetry.sdk.name="opentelemetry", telemetry.sdk.version="1.38.0"}}, instrumentationScopeInfo=InstrumentationScopeInfo{name=default, version=null, schemaUrl=null, attributes={}}, name=driver_service_factory.apply, kind=INTERNAL, startEpochNanos=1717697404564250800, endEpochNanos=1717697405755903900, attributes=AttributesMap{data={error=true, session.capabilities={"acceptInsecureCerts": true,"browserName": "chrome","browserVersion": "125.0","goog:chromeOptions": {"args": [],"extensions": []},"platformName": "windows"} }, capacity=128, totalAddedValues=2}, totalAttributeCount=2, events=[ImmutableEventData{name=exception, attributes={exception.message="Error while creating session with the driver service. Unable to obtain: chromedriver, error Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json, --debug] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown", exception.stacktrace="org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: chromedriver, error Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json, --debug] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:121) at org.openqa.selenium.remote.service.DriverFinder.getDriverPath(DriverFinder.java:55) at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:134) at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:71) at org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147) at org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:469) at org.openqa.selenium.grid.node.NewNodeSession.execute(NewNodeSession.java:50) 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.grid.security.RequiresSecretFilter.lambda$apply$0(RequiresSecretFilter.java:62) 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:360) at org.openqa.selenium.remote.http.Route.execute(Route.java:69) at org.openqa.selenium.grid.node.Node.execute(Node.java:270) at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:360) 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: org.openqa.selenium.WebDriverException: Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json, --debug] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:169) at org.openqa.selenium.manager.SeleniumManager.getBinaryPaths(SeleniumManager.java:244) at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:102) ... 27 more ", exception.type="org.openqa.selenium.remote.NoSuchDriverException", logger="org.openqa.selenium.grid.node.config.DriverServiceSessionFactory", session.capabilities="{"acceptInsecureCerts": true,"browserName": "chrome","browserVersion": "125.0","goog:chromeOptions": {"args": [],"extensions": []},"platformName": "windows"} "}, epochNanos=1717697405752537900, totalAttributeCount=5}], totalRecordedEvents=1, links=[], totalRecordedLinks=0, status=ImmutableStatusData{statusCode=ERROR, description=Kind: CANCELLED Description:}, hasEnded=true}
You're right, when --selenium-manager is not set, this should include offline mode:
[--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json, --debug]
I have an idea of why this might be the case (feature that makes sense for bindings that isn't backwards compatible with grid; there's a lot of complexity to maintaining backwards compatibility and work properly in both grid and bindings.
@bonigarcia if we have a valid driver for a valid browser we shouldn't need to make calls to known good versions?
Of note, in the future selenium-manager will default to true, and if you don't want network calls, you can specify the driver location with system properties, or in your toml file with webdriver-executable = '/path/to/chromedriver/95/chromedriver'
if we have a valid driver for a valid browser we shouldn't need to make calls to known good versions?
In its usual regular way of working SM, it checks the corresponding online endpoint (e.g., CfT) to discover the proper driver version for a given browser version. Then, in the online mode, SM should not make network requests. Moreover, SM implements a best-effort function to discover the more convenient driver from the cache.
But if that fails, shouldn't it still use the valid one that was already located?
If SM fails requesting the online endpoints, yes, it will execute the previous best effort logic to try locate some valid driver in the cache.
Please add thr webdriver-executable
to the configs or set detect-drivers = true
.
yes, it will execute the previous best effort logic to try locate some valid driver in the cache
But what about a valid driver in PATH?
What happened?
Selenium Grid node 4.21 trying to download driver even when driver are present on the system. I understood that selenium manager is false by default, still when test is executed it is trying to download driver from the external sites (external to my org). We are using in house cloud setup and don't have access to internet via proxy or direct. All driver path are setup in environment variable. Running chromedriver --version in cmd gives me below response ChromeDriver 125.0.6422.141 (4b1e83937122185343ba92e909b021f307c719ca-refs/branch-heads/6422@{#1186})
It works fine if I start the node on 4.10
Error message at node side
14:56:44.346 WARN [SeleniumManager.lambda$runCommand$1] - error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) 14:56:44.361 WARN [DriverServiceSessionFactory.apply] - Error while creating session with the driver service. Unable to obtain: chromedriver, error Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown 14:56:44.361 WARN [SeleniumSpanExporter$1.lambda$export$1] - Error while creating session with the driver service. Unable to obtain: chromedriver, error Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown 14:56:44.361 WARN [SeleniumSpanExporter$1.lambda$export$1] - org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: chromedriver, error Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:121) at org.openqa.selenium.remote.service.DriverFinder.getDriverPath(DriverFinder.java:55) at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:134) at org.openqa.selenium.grid.node.config.DriverServiceSessionFactory.apply(DriverServiceSessionFactory.java:71) at org.openqa.selenium.grid.node.local.SessionSlot.apply(SessionSlot.java:147) at org.openqa.selenium.grid.node.local.LocalNode.newSession(LocalNode.java:469) at org.openqa.selenium.grid.node.NewNodeSession.execute(NewNodeSession.java:50) 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.grid.security.RequiresSecretFilter.lambda$apply$0(RequiresSecretFilter.java:62) 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:360) at org.openqa.selenium.remote.http.Route.execute(Route.java:69) at org.openqa.selenium.grid.node.Node.execute(Node.java:270) at org.openqa.selenium.remote.http.Route$CombinedRoute.handle(Route.java:360) 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: org.openqa.selenium.WebDriverException: Command failed with code: 65, executed: [--browser, chrome, --browser-version, 125.0, --language-binding, java, --output, json] error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json) Build info: version: '4.21.0', revision: '79ed462ef4' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17' Driver info: driver.version: unknown at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:169) at org.openqa.selenium.manager.SeleniumManager.getBinaryPaths(SeleniumManager.java:244) at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:102) ... 27 more
How can we reproduce the issue?
Relevant log output
Operating System
Windows Server 2019
Selenium version
4.21
What are the browser(s) and version(s) where you see this issue?
Chrome 125
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 125.0.6422.141
Are you using Selenium Grid?
Yes 4.21