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]: DeprecationWarning raised by default init args of Chrome webdriver #14687

Open
drammock opened this issue Oct 30, 2024 · 3 comments · May be fixed by #14690
Open

[🐛 Bug]: DeprecationWarning raised by default init args of Chrome webdriver #14687

drammock opened this issue Oct 30, 2024 · 3 comments · May be fixed by #14690

Comments

@drammock
Copy link

What happened?

#13286 introduced a DeprecationWarning:

setting remote_server_addr in RemoteConnection() is deprecated, set in ClientConfig instance instead

We're seeing this warning on a very simple use case that uses only default webdriver options except for headless. Seems like the culprit is probably this line:

remote_server_addr=self.service.service_url,

but I'm unfamiliar with your codebase so I'm not sure what the right fix would be.

How can we reproduce the issue?

our usage looks like this:


from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("--headless=new")
driver = webdriver.Chrome(options=options)  # <- this line triggers the DeprecationWarning


(simplified from https://github.com/mne-tools/mne-python/blob/f00deb44e2996a3b707c3f0399cfa0d8b842c566/doc/sphinxext/contrib_avatars.py#L21-L29)

Relevant log output

Traceback (most recent call last):
  File "/home/circleci/python_env/lib/python3.12/site-packages/sphinx/events.py", line 404, in emit
    results.append(listener.handler(self.app, *args))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/project/doc/sphinxext/contrib_avatars.py", line 29, in generate_contrib_avatars
    driver = webdriver.Chrome(options=options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/python_env/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/home/circleci/python_env/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 57, in __init__
    executor = ChromiumRemoteConnection(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/circleci/python_env/lib/python3.12/site-packages/selenium/webdriver/chromium/remote_connection.py", line 33, in __init__
    super().__init__(
  File "/home/circleci/python_env/lib/python3.12/site-packages/selenium/webdriver/remote/remote_connection.py", line 302, in __init__
    warnings.warn(
DeprecationWarning: setting remote_server_addr in RemoteConnection() is deprecated, set in ClientConfig instance instead


(from here: https://app.circleci.com/pipelines/github/mne-tools/mne-python/25647/workflows/8fe55c7b-0c19-44dc-a007-9cab0cb274a5/jobs/69427?invite=true#step-142-1157_34)

Operating System

Linux

Selenium version

Python, 4.26.0 (https://app.circleci.com/pipelines/github/mne-tools/mne-python/25647/workflows/8fe55c7b-0c19-44dc-a007-9cab0cb274a5/jobs/69427?invite=true#step-118-9272_35)

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

sadly our CI log doesn't show that info

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

sadly our CI log doesn't show that info

Are you using Selenium Grid?

n/a

Copy link

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

@drammock drammock changed the title [🐛 Bug]: [🐛 Bug]: DeprecationWarning raised by default init args of Chrome webdriver Oct 30, 2024
@pquentin
Copy link

I also reported this in #14686.

@drammock
Copy link
Author

I also reported this in #14686.

ha, you were 2 minutes faster than me :)

@VietND96 VietND96 linked a pull request Oct 30, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants