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]: Unable to download in offline mode when network is Online #12521

Closed
RohitM-IN opened this issue Aug 8, 2023 · 33 comments
Closed

Comments

@RohitM-IN
Copy link

RohitM-IN commented Aug 8, 2023

What happened?

while booting the application the application does not load the IE, safari which i know is not present in my local system but the prompt says it also tried downloading it but it not able to discover it in offline mode Is this a bug ?

I have given initial debug log with fine level hope this helps in debug.

How can we reproduce the issue?

Java -jar  selenium-server-4.11.0.jar standalone --log-level FINE --log ./trace.log

Relevant log output

21:40:52.547 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking chromedriver in PATH
21:40:52.547 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: chromedriver --version
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "ChromeDriver 115.0.5790.170 (cc0d30c2ca5577520c8646671513241faa0bc105-refs/branch-heads/5790@{#1923})"
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: where chromedriver
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "C:\\WebDriver\\chromedriver.exe"
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Found chromedriver 115.0.5790.170 in PATH: C:\WebDriver\chromedriver.exe
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - chrome detected at C:\Program Files\Google\Chrome\Application\chrome.exe
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Using shell command to find out chrome version
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: wmic datafile where name='C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe' get Version /value
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "\r\r\n\r\r\nVersion=115.0.5790.170\r\r\n\r\r\n\r\r\n\r"
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Detected browser: chrome 115.0.5790.170
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: chromedriver 115.0.5790.170
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Driver path: C:\WebDriver\chromedriver.exe
21:40:52.548 DEBUG [SeleniumManager.lambda$runCommand$1] - Browser path: C:\Program Files\Google\Chrome\Application\chrome.exe
21:40:52.549 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: C:\WebDriver\chromedriver.exe, browser at location C:\Program Files\Google\Chrome\Application\chrome.exe
21:40:52.549 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe
21:40:52.549 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe, --browser, MicrosoftEdge, --output, json, --debug, --offline]
21:40:52.752 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking msedgedriver in PATH
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: msedgedriver --version
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "Microsoft Edge WebDriver 115.0.1901.188 (b51b39339c49c4dc7c61b77f8b61420ca0ab7b68)"
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: where msedgedriver
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "C:\\WebDriver\\msedgedriver.exe"
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Found msedgedriver 115.0.1901.188 in PATH: C:\WebDriver\msedgedriver.exe
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - edge detected at C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Using shell command to find out edge version
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: wmic datafile where name='C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe' get Version /value
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "\r\r\n\r\r\nVersion=115.0.1901.188\r\r\n\r\r\n\r\r\n\r"
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Detected browser: edge 115.0.1901.188
21:40:52.753 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover msedgedriver version: Unable to discover proper msedgedriver version in offline mode
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Driver path: C:\WebDriver\msedgedriver.exe
21:40:52.753 DEBUG [SeleniumManager.lambda$runCommand$1] - Browser path: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
21:40:52.753 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: C:\WebDriver\msedgedriver.exe, browser at location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
21:40:52.755 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe
21:40:52.755 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe, --browser, firefox, --output, json, --debug, --offline]
21:40:52.954 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking geckodriver in PATH
21:40:52.954 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: geckodriver --version
21:40:52.954 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "geckodriver 0.33.0 (a80e5fd61076 2023-04-02 18:31 +0000)\n\nThe source code of this program is available from\ntesting/geckodriver in https://hg.mozilla.org/mozilla-central.\n\nThis program is subject to the terms of the Mozilla Public License 2.0.\nYou can obtain a copy of the license at https://mozilla.org/MPL/2.0/."
21:40:52.954 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: where geckodriver
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "C:\\WebDriver\\geckodriver.exe"
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Found geckodriver 0.33.0 in PATH: C:\WebDriver\geckodriver.exe
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - firefox detected at C:\Program Files\Mozilla Firefox\firefox.exe
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Using shell command to find out firefox version
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: wmic datafile where name='C:\\Program Files\\Mozilla Firefox\\firefox.exe' get Version /value
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "\r\r\n\r\r\nVersion=116.0.1.8615\r\r\n\r\r\n\r\r\n\r"
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Detected browser: firefox 116.0.1.8615
21:40:52.955 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover geckodriver version: Unable to discover proper geckodriver version in offline mode
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Driver path: C:\WebDriver\geckodriver.exe
21:40:52.955 DEBUG [SeleniumManager.lambda$runCommand$1] - Browser path: C:\Program Files\Mozilla Firefox\firefox.exe
21:40:52.955 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: C:\WebDriver\geckodriver.exe, browser at location C:\Program Files\Mozilla Firefox\firefox.exe
21:40:52.956 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe
21:40:52.956 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe, --browser, internet explorer, --output, json, --debug, --offline]
21:40:53.059 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking IEDriverServer in PATH
21:40:53.059 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: IEDriverServer --version
21:40:53.059 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: ""
21:40:53.059 DEBUG [SeleniumManager.lambda$runCommand$1] - IEDriverServer not found in PATH
21:40:53.059 DEBUG [SeleniumManager.lambda$runCommand$1] - iexplorer has not been discovered in the system
21:40:53.059 WARN [SeleniumManager.lambda$runCommand$1] - Unable to discover proper IEDriverServer version in offline mode
21:40:53.059 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: , browser at location 
21:40:53.061 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe
21:40:53.061 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe, --browser, safari, --output, json, --debug, --offline]
21:40:53.145 DEBUG [SeleniumManager.lambda$runCommand$1] - safari detected at C:\Program Files
21:40:53.146 DEBUG [SeleniumManager.lambda$runCommand$1] - safari has not been discovered in the system
21:40:53.146 WARN [SeleniumManager.lambda$runCommand$1] - The version of safari cannot be detected. Trying with latest driver version
21:40:53.146 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: safaridriver (local)
21:40:53.146 WARN [SeleniumManager.lambda$runCommand$1] - Unable to download safaridriver in offline mode
21:40:53.146 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: , browser at location 
21:40:53.147 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe
21:40:53.147 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager168757260992290016986365302404793685\selenium-manager.exe, --browser, Safari Technology Preview, --output, json, --debug, --offline]
21:40:53.231 DEBUG [SeleniumManager.lambda$runCommand$1] - safaritp detected at C:\Program Files
21:40:53.231 DEBUG [SeleniumManager.lambda$runCommand$1] - safaritp has not been discovered in the system
21:40:53.231 WARN [SeleniumManager.lambda$runCommand$1] - The version of safaritp cannot be detected. Trying with latest driver version
21:40:53.231 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: safaridriver (local)
21:40:53.231 WARN [SeleniumManager.lambda$runCommand$1] - Unable to download safaridriver in offline mode
21:40:53.232 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: , browser at location

Operating System

Windows 10

Selenium version

4.11.0

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

edge 115.0.1901.188, firefox 116.0.1.8615, chrome 115.0.5790.170

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

edge 115.0.1901.188, firefox 116.0.1.8615, chrome 115.0.5790.170

Are you using Selenium Grid?

No response

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

@RohitM-IN, 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

@bonigarcia we need to figure out a better error message...

Selenium manager is opt in for downloads, but gets used to find drivers on path. So we put it in offline mode if you don't opt in. Add
--selenium-manager true to your startup command.

@bonigarcia
Copy link
Member

we need to figure out a better error message..

Which error message do you mean?

@titusfortner
Copy link
Member

21:40:52.753 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover msedgedriver version: Unable to discover proper msedgedriver version in offline mode

Somehow we want people to know that the "fix" for this message is to enable selenium-manager. But maybe it doesn't belong in the Selenium Manager binary.

@diemol is there a place to put this in the Java code?

@RohitM-IN
Copy link
Author

@bonigarcia we need to figure out a better error message...

Selenium manager is opt in for downloads, but gets used to find drivers on path. So we put it in offline mode if you don't opt in. Add --selenium-manager true to your startup command.

I did added but it seems its like that

java -jar selenium-server-4.11.0.jar  standalone --selenium-manager true --log-level FINE --log ./trace.log

the output log hasn't changed Have i missed something ?

20:38:25.934 INFO [LoggingOptions.configureLogEncoding] - Using the system default encoding
20:38:25.937 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
20:38:25.971 DEBUG [AutoConfiguredOpenTelemetrySdkBuilder.build] - Global OpenTelemetry set to OpenTelemetrySdk{tracerProvider=SdkTracerProvider{clock=SystemClock{}, idGenerator=RandomIdGenerator{}, resource=Resource{schemaUrl=https://opentelemetry.io/schemas/1.19.0, attributes={service.name="unknown_service:java", telemetry.sdk.language="java", telemetry.sdk.name="opentelemetry", telemetry.sdk.version="1.26.0"}}, spanLimitsSupplier=SpanLimitsValue{maxNumberOfAttributes=128, maxNumberOfEvents=128, maxNumberOfLinks=128, maxNumberOfAttributesPerEvent=128, maxNumberOfAttributesPerLink=128, maxAttributeValueLength=2147483647}, sampler=ParentBased{root:AlwaysOnSampler,remoteParentSampled:AlwaysOnSampler,remoteParentNotSampled:AlwaysOffSampler,localParentSampled:AlwaysOnSampler,localParentNotSampled:AlwaysOffSampler}, spanProcessor=SimpleSpanProcessor{spanExporter=org.openqa.selenium.remote.tracing.opentelemetry.SeleniumSpanExporter$1@158a8276}}, meterProvider=SdkMeterProvider{clock=SystemClock{}, resource=Resource{schemaUrl=https://opentelemetry.io/schemas/1.19.0, attributes={service.name="unknown_service:java", telemetry.sdk.language="java", telemetry.sdk.name="opentelemetry", telemetry.sdk.version="1.26.0"}}, metricReaders=[], views=[]}, loggerProvider=SdkLoggerProvider{clock=SystemClock{}, resource=Resource{schemaUrl=https://opentelemetry.io/schemas/1.19.0, attributes={service.name="unknown_service:java", telemetry.sdk.language="java", telemetry.sdk.name="opentelemetry", telemetry.sdk.version="1.26.0"}}, logLimits=LogLimits{maxNumberOfAttributes=128, maxAttributeValueLength=2147483647}, logRecordProcessor=io.opentelemetry.sdk.logs.NoopLogRecordProcessor@7530ad9c}, propagators=DefaultContextPropagators{textMapPropagator=MultiTextMapPropagator{textMapPropagators=[W3CTraceContextPropagator, W3CBaggagePropagator]}}} by autoconfiguration
20:38:27.000 INFO [NodeOptions.getSessionFactories] - Detected 16 available processors
20:38:27.127 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:27.128 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, chrome, --output, json, --debug, --offline]
20:38:27.372 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking chromedriver in PATH
20:38:27.372 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: chromedriver --version
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "ChromeDriver 115.0.5790.170 (cc0d30c2ca5577520c8646671513241faa0bc105-refs/branch-heads/5790@{#1923})"
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: where chromedriver
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "C:\\WebDriver\\chromedriver.exe"
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Found chromedriver 115.0.5790.170 in PATH: C:\WebDriver\chromedriver.exe
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - chrome detected at C:\Program Files\Google\Chrome\Application\chrome.exe
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Using shell command to find out chrome version
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: wmic datafile where name='C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe' get Version /value
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "\r\r\n\r\r\nVersion=115.0.5790.171\r\r\n\r\r\n\r\r\n\r"
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Detected browser: chrome 115.0.5790.171
20:38:27.373 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover chromedriver version: Unable to discover proper chromedriver version in offline mode
20:38:27.373 DEBUG [SeleniumManager.lambda$runCommand$1] - Driver path: C:\WebDriver\chromedriver.exe
20:38:27.374 DEBUG [SeleniumManager.lambda$runCommand$1] - Browser path: C:\Program Files\Google\Chrome\Application\chrome.exe
20:38:27.374 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: C:\WebDriver\chromedriver.exe, browser at location C:\Program Files\Google\Chrome\Application\chrome.exe
20:38:27.375 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:27.375 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, MicrosoftEdge, --output, json, --debug, --offline]
20:38:27.577 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking msedgedriver in PATH
20:38:27.577 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: msedgedriver --version
20:38:27.577 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "Microsoft Edge WebDriver 115.0.1901.188 (b51b39339c49c4dc7c61b77f8b61420ca0ab7b68)"
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: where msedgedriver
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "C:\\WebDriver\\msedgedriver.exe"
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Found msedgedriver 115.0.1901.188 in PATH: C:\WebDriver\msedgedriver.exe
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - edge detected at C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Using shell command to find out edge version
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: wmic datafile where name='C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe' get Version /value
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "\r\r\n\r\r\nVersion=115.0.1901.188\r\r\n\r\r\n\r\r\n\r"
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Detected browser: edge 115.0.1901.188
20:38:27.578 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover msedgedriver version: Unable to discover proper msedgedriver version in offline mode
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Driver path: C:\WebDriver\msedgedriver.exe
20:38:27.578 DEBUG [SeleniumManager.lambda$runCommand$1] - Browser path: C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
20:38:27.578 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: C:\WebDriver\msedgedriver.exe, browser at location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
20:38:27.579 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:27.580 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, firefox, --output, json, --debug, --offline]
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking geckodriver in PATH
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: geckodriver --version
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "geckodriver 0.33.0 (a80e5fd61076 2023-04-02 18:31 +0000)\n\nThe source code of this program is available from\ntesting/geckodriver in https://hg.mozilla.org/mozilla-central.\n\nThis program is subject to the terms of the Mozilla Public License 2.0.\nYou can obtain a copy of the license at https://mozilla.org/MPL/2.0/."
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: where geckodriver
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "C:\\WebDriver\\geckodriver.exe"
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Found geckodriver 0.33.0 in PATH: C:\WebDriver\geckodriver.exe
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - firefox detected at C:\Program Files\Mozilla Firefox\firefox.exe
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Using shell command to find out firefox version
20:38:27.778 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: wmic datafile where name='C:\\Program Files\\Mozilla Firefox\\firefox.exe' get Version /value
20:38:27.779 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: "\r\r\n\r\r\nVersion=116.0.2.8617\r\r\n\r\r\n\r\r\n\r"
20:38:27.779 DEBUG [SeleniumManager.lambda$runCommand$1] - Detected browser: firefox 116.0.2.8617
20:38:27.779 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover geckodriver version: Unable to discover proper geckodriver version in offline mode
20:38:27.779 DEBUG [SeleniumManager.lambda$runCommand$1] - Driver path: C:\WebDriver\geckodriver.exe
20:38:27.779 DEBUG [SeleniumManager.lambda$runCommand$1] - Browser path: C:\Program Files\Mozilla Firefox\firefox.exe
20:38:27.779 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: C:\WebDriver\geckodriver.exe, browser at location C:\Program Files\Mozilla Firefox\firefox.exe
20:38:27.780 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:27.780 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, internet explorer, --output, json, --debug, --offline]
20:38:27.871 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking IEDriverServer in PATH
20:38:27.872 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: IEDriverServer --version
20:38:27.872 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: ""
20:38:27.872 DEBUG [SeleniumManager.lambda$runCommand$1] - IEDriverServer not found in PATH
20:38:27.872 DEBUG [SeleniumManager.lambda$runCommand$1] - iexplorer has not been discovered in the system
20:38:27.872 WARN [SeleniumManager.lambda$runCommand$1] - Unable to discover proper IEDriverServer version in offline mode
20:38:27.872 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: , browser at location 
20:38:27.874 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:27.874 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, safari, --output, json, --debug, --offline]
20:38:27.955 DEBUG [SeleniumManager.lambda$runCommand$1] - safari detected at C:\Program Files
20:38:27.955 DEBUG [SeleniumManager.lambda$runCommand$1] - safari has not been discovered in the system
20:38:27.956 WARN [SeleniumManager.lambda$runCommand$1] - The version of safari cannot be detected. Trying with latest driver version
20:38:27.956 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: safaridriver (local)
20:38:27.956 WARN [SeleniumManager.lambda$runCommand$1] - Unable to download safaridriver in offline mode
20:38:27.956 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: , browser at location 
20:38:27.957 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:27.957 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, Safari Technology Preview, --output, json, --debug, --offline]
20:38:28.039 DEBUG [SeleniumManager.lambda$runCommand$1] - safaritp detected at C:\Program Files
20:38:28.039 DEBUG [SeleniumManager.lambda$runCommand$1] - safaritp has not been discovered in the system
20:38:28.039 WARN [SeleniumManager.lambda$runCommand$1] - The version of safaritp cannot be detected. Trying with latest driver version
20:38:28.039 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: safaridriver (local)
20:38:28.040 WARN [SeleniumManager.lambda$runCommand$1] - Unable to download safaridriver in offline mode
20:38:28.040 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: , browser at location 
20:38:28.041 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:28.041 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, internet explorer, --output, json, --debug]
20:38:28.419 DEBUG [SeleniumManager.lambda$runCommand$1] - Checking IEDriverServer in PATH
20:38:28.419 DEBUG [SeleniumManager.lambda$runCommand$1] - Running command: IEDriverServer --version
20:38:28.419 DEBUG [SeleniumManager.lambda$runCommand$1] - Output: ""
20:38:28.419 DEBUG [SeleniumManager.lambda$runCommand$1] - IEDriverServer not found in PATH
20:38:28.419 DEBUG [SeleniumManager.lambda$runCommand$1] - iexplorer has not been discovered in the system
20:38:28.420 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: IEDriverServer 4.11.0
20:38:28.420 DEBUG [SeleniumManager.lambda$runCommand$1] - IEDriverServer 4.11.0 already in the cache
20:38:28.420 DEBUG [SeleniumManager.lambda$runCommand$1] - Driver path: C:\Users\rohit\.cache\selenium\IEDriverServer\win32\4.11.0\IEDriverServer.exe
20:38:28.420 DEBUG [SeleniumManager.getDriverPath] - Using driver at location: C:\Users\rohit\.cache\selenium\IEDriverServer\win32\4.11.0\IEDriverServer.exe, browser at location 
20:38:28.420 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:28.421 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, safari, --output, json, --debug]
20:38:28.506 DEBUG [SeleniumManager.lambda$runCommand$1] - safari detected at C:\Program Files
20:38:28.506 DEBUG [SeleniumManager.lambda$runCommand$1] - safari has not been discovered in the system
20:38:28.507 WARN [SeleniumManager.lambda$runCommand$1] - The version of safari cannot be detected. Trying with latest driver version
20:38:28.507 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: safaridriver (local)
20:38:28.509 DEBUG [SeleniumManager.getBinary] - Selenium Manager binary found at: C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe
20:38:28.509 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, Safari Technology Preview, --output, json, --debug]
20:38:28.591 DEBUG [SeleniumManager.lambda$runCommand$1] - safaritp detected at C:\Program Files
20:38:28.591 DEBUG [SeleniumManager.lambda$runCommand$1] - safaritp has not been discovered in the system
20:38:28.591 WARN [SeleniumManager.lambda$runCommand$1] - The version of safaritp cannot be detected. Trying with latest driver version
20:38:28.591 DEBUG [SeleniumManager.lambda$runCommand$1] - Required driver: safaridriver (local)

@titusfortner
Copy link
Member

@bonigarcia it shouldn't be in offline mode if --selenium-manager true is set?

@bonigarcia
Copy link
Member

I think so, but I don't know the internal logic of Grid. Maybe @diemol knows.

We can see in the provided logs that SM is called with the offline flag at the beginning:

20:38:27.128 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, chrome, --output, json, --debug, --offline]

... but not at the end:

20:38:28.041 DEBUG [SeleniumManager.runCommand] - Executing Process: [C:\Users\rohit\AppData\Local\Temp\selenium-manager8313153926720010046251528778882370\selenium-manager.exe, --browser, internet explorer, --output, json, --debug]

@titusfortner
Copy link
Member

Good catch, that's weird. I'm reopening until we get it figured out.

@titusfortner titusfortner reopened this Aug 11, 2023
@diemol
Copy link
Member

diemol commented Aug 12, 2023

Grid first tries to find drivers on the PATH through Selenium Manager and uses the offline mode, which explains the first set of messages. Then, if the --selenium-manager true flag is used, it will download drivers for the browsers it finds.

I think the confusion arises with this message:

20:38:27.373 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover chromedriver version: Unable to discover proper chromedriver version in offline mode

I believe it is a DEBUG rather than a WARN because if SM is running offline, it is something intentional.

@titusfortner
Copy link
Member

If --selenium-manager is true there is no reason to be in offline mode for anything, which is my confusion. The whole point of "offline mode" was to default to opted-out with respect to downloading for people who hadn't enabled selenium manager. Somehow we need to suggest that people enable it if there is a problem, though.

@RohitM-IN
Copy link
Author

if you need my help with anything for debug I am here :)

again I tried the it with following command

java -jar selenium-server-4.11.0.jar  standalone --selenium-manager true --log-level FINE --log ./trace.log

and trace.log if needed

trace.log

@jvargas-minitab
Copy link

I did the same, but what I noticed when looking at the --log-level FINE is that the path the chromedriver was being installed to did download the drivers even though I got that offline message. I was able to verify that on my hub, since I'm running a hub with multiple nodes.

@diemol diemol added this to the 4.12 milestone Aug 23, 2023
@mahmoudsamy1610
Copy link

Hello
I am having this issue while trying to work with Grid with multiple nodes

While this command "--selenium-manager true"
is not working while working with toml file

So let's say it is fixed for stand alone .. will this also works for Grid ? .. i am asking because Grid was working normally in 4.10.0 with neither local drivers nor the manager true command

Thanks in advance

@diemol
Copy link
Member

diemol commented Aug 28, 2023

Hello I am having this issue while trying to work with Grid with multiple nodes

While this command "--selenium-manager true" is not working while working with toml file

So let's say it is fixed for stand alone .. will this also works for Grid ? .. i am asking because Grid was working normally in 4.10.0 with neither local drivers nor the manager true command

Thanks in advance

How does your toml file look like?

diemol added a commit that referenced this issue Aug 28, 2023
@diemol diemol closed this as completed in 71ccb89 Aug 28, 2023
@diemol
Copy link
Member

diemol commented Aug 28, 2023

I've pushed a fix that covers the following:

  • Avoid checking for Safari and Safari Technology Preview when the host OS differs from macOS.
  • Log a message suggesting the use of --selenium-manager true to help the user when offline mode is used.
  • Using either offline mode for Selenium Manager or online when --selenium-manager true is passed avoids combining both, which confuses.

@titusfortner
Copy link
Member

Didn't look at code are we already ensuring IE is only windows?

@mahmoudsamy1610
Copy link

mahmoudsamy1610 commented Aug 28, 2023

Hello I am having this issue while trying to work with Grid with multiple nodes
While this command "--selenium-manager true" is not working while working with toml file
So let's say it is fixed for stand alone .. will this also works for Grid ? .. i am asking because Grid was working normally in 4.10.0 with neither local drivers nor the manager true command
Thanks in advance

How does your toml file look like?

This is a sample ...
Note : They were working very fine in 4.10.0


[server]
port=91321

[node]
[[node.driver-configuration]]
display-name ="Chrome"
stereotype="{"browserName": "Chrome","platformName": "MacOs"}"


Thanks for your reply

@mahmoudsamy1610
Copy link

I've pushed a fix that covers the following:

  • Avoid checking for Safari and Safari Technology Preview when the host OS differs from macOS.
  • Log a message suggesting the use of --selenium-manager true to help the user when offline mode is used.
  • Using either offline mode for Selenium Manager or online when --selenium-manager true is passed avoids combining both, which confuses.

Thanks for your efforts ..
do we need to reDownlaoad the selenium server Jar file ?

@titusfortner
Copy link
Member

Selenium 4.12 will hopefully be out today.

@diemol
Copy link
Member

diemol commented Aug 28, 2023

Didn't look at code are we already ensuring IE is only windows?

Yes. This did not change.

@harishindegene
Copy link

This is not yet fixed in Selenium 4,12 version. For chrome we are thrown with offline error. Please advice.

Unable to discover proper chromedriver version in offline mode

@diemol
Copy link
Member

diemol commented Sep 7, 2023

What error? Please share logs otherwise it is hard to understand what you mean.

@harishindegene
Copy link

harishindegene commented Sep 7, 2023

@diemol Thanks for the response, sharing the log below

13:18:43.721 INFO [LogManager$RootLogger.log] - Using the system default encoding
13:18:43.721 INFO [OpenTelemetryTracer.createTracer] - Using OpenTelemetry for tracing
13:18:44.767 INFO [NodeOptions.getSessionFactories] - Detected 2 available processors
13:18:44.767 INFO [NodeOptions.discoverDrivers] - Looking for existing drivers on the PATH.
13:18:44.767 INFO [NodeOptions.discoverDrivers] - Add '--selenium-manager true' to the startup command to setup drivers automatically.
13:18:47.080 WARN [SeleniumManager.lambda$runCommand$1] - Exception managing chrome: Unable to discover proper chromedriver version in offline mode
13:18:47.674 WARN [SeleniumManager.lambda$runCommand$1] - edge cannot be downloaded
13:18:48.252 WARN [SeleniumManager.lambda$runCommand$1] - Unable to discover proper geckodriver version in offline mode
13:18:49.236 WARN [SeleniumManager.lambda$runCommand$1] - Exception managing iexplorer: Unable to discover proper IEDriverServer version in offline mode
13:18:49.252 INFO [NodeOptions.report] - Adding Chrome for {"browserName": "chrome","goog:chromeOptions": {"args": ["--remote-allow-origins=*"]},"platformName": "Windows XP"} 2 times
13:18:49.268 INFO [NodeOptions.report] - Adding Internet Explorer for {"browserName": "internet explorer","platformName": "Windows XP"} 1 times
13:18:49.268 INFO [Node.<init>] - Binding additional locator mechanisms: relative
13:18:49.283 INFO [GridModel.setAvailability] - Switching Node db5f881b-79f7-45c8-a0ca-ae032d9797f4 (uri: http://192.0.0.40:4444) from DOWN to UP
13:18:49.283 INFO [LocalDistributor.add] - Added node db5f881b-79f7-45c8-a0ca-ae032d9797f4 at Health check every 120s

@diemol
Copy link
Member

diemol commented Sep 7, 2023

What is the error? I see warning messages but no error.

@harishindegene
Copy link

Sorry my bad, its working fine post restart. Thanks.

@limuyuan
Copy link

02:33:19.951 WARN [SeleniumManager.lambda$runCommand$1] - Exception trying to discover chromedriver version: Unable to discover proper chromedriver version in offline mode
Same issue from my side. I'm also using Selenium Server 4.11

@titusfortner
Copy link
Member

@limuyuan you need to use the latest version of Selenium. Update to Selenium 4.12.1

@mahmoudsamy1610
Copy link

Hello @titusfortner
Thanks for your efforts

If I am working with selenium grid version 4.12.0

How to make the drivers to be downloaded automatically.. It was working fine on the same version ...

now I am facing the error
(No drivers have been found)
After multiple errors like
(Unable to discover the proper chromedriver version in offline mode)

I am expecting you may guide me to add "--selenium-manager true"

But i really do not know where to add this command while running command to register node from TOML file
cd src\main\resources\AutomationResources\ExecutableFiles && java -jar selenium-server-4.12.0.jar node --config "D:\Automation\Autofox\src\main\resources\AutomationResources\TomlFiles\GridHubNodes\Linux\firefox\LinuxfirefoxNode_1021.toml"

image

@titusfortner
Copy link
Member

Should just be add this to your toml:

[node]
selenium-manager = true

@mahmoudsamy1610
Copy link

Should just be add this to your toml:

[node]
selenium-manager = true

I've checked my code .. the TOML file was created empty .. don't know why suddenly ! .. but I fixed it anyway .. and the TOML file registration back normally to working without adding this line .. maybe there's some kind of default value ... as I was facing the error but the process was resumed correctly

eventually I've added the line and I can no longer see the error .... Many Thanks @titusfortner

@rpmabhishek
Copy link

[node]
selenium-manager = true

Hi @titusfortner Can you please share how to use this in docker-compose.yaml file

@krmahadevan
Copy link
Contributor

@rpmabhishek - Refer here

Replace the steps that setup volumes via commandline for docker, with the volume section in docker-compose yaml file.

Copy link

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

10 participants