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]: Selenium manger in offline mode emits a warning which it should not do. #13809

Closed
aaltat opened this issue Apr 12, 2024 · 3 comments · Fixed by #13810
Closed

[🐛 Bug]: Selenium manger in offline mode emits a warning which it should not do. #13809

aaltat opened this issue Apr 12, 2024 · 3 comments · Fixed by #13810

Comments

@aaltat
Copy link

aaltat commented Apr 12, 2024

What happened?

When selenium manager is run in a restricted environment (access to public internet is not allowed) and when offline mode is to true. Then selenium manager creates a warning (at least with Python bindings) that it can not access to public internet. When offline mode is set to true, I think such warning should not be created.

How can we reproduce the issue?

  1. Make sure that your environment is isolated and set SE_OFFLINE environment variable to true
  2. Run following Python code
from selenium import webdriver

driver = webdriver.Firefox()
driver.quit()

Then selenium manager will be run like this:
/path/to/python/site-packages/selenium/webdriver/common/linux/selenium-manager --browser firefox --language-binding python --trace --output json In this case the selenium manager output will contain this json snippet:

    {

       "level": "WARN",
       "timestamp": 1712839173,
       "message": "Exception managing firefox: Unable to discover proper geckodriver version in offline mode"

     }

After that, selenium Python bindings will collect the output and log all warning messages: https://github.com/SeleniumHQ/selenium/blob/selenium-4.19.0/py/selenium/webdriver/common/selenium_manager.py#L148

Relevant log output

In logs, I see this warning: Exception managing firefox: Unable to discover proper geckodriver version in offline mode

Operating System

Ubuntu 22

Selenium version

Python 4.19

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

Firefox 124.0.1

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

Geckodriver 0.34.0

Are you using Selenium Grid?

Not using

Copy link

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

@aaltat aaltat changed the title [🐛 Bug]: Selenium mmanger in offline mode emits a warning which is should not do. [🐛 Bug]: Selenium manger in offline mode emits a warning which it should not do. Apr 12, 2024
@diemol diemol linked a pull request Apr 12, 2024 that will close this issue
8 tasks
@aaltat
Copy link
Author

aaltat commented Apr 12, 2024

Thank you for lighting fast fix.

Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants