Skip to content

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

Closed

Description

@drammock

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

Activity

  1. added
    I-defect
    A-needs-triaging
    on Oct 30, 2024
  2. github-actions commented on Oct 30, 2024

    @github-actions
    Contributor

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

  3. changed the title [-][🐛 Bug]: [/-] [+][🐛 Bug]: DeprecationWarning raised by default init args of Chrome webdriver[/+] on Oct 30, 2024
  4. pquentin commented on Oct 30, 2024

    @pquentin

    I also reported this in #14686.

  5. drammock commented on Oct 30, 2024

    @drammock
    Author

    I also reported this in #14686.

    ha, you were 2 minutes faster than me :)

  6. added
    C-py
    and removed
    A-needs-triaging
    on Oct 31, 2024
  7. github-actions commented on Nov 30, 2024

    @github-actions
    Contributor

    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.

  8. locked and limited conversation to collaborators on Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-pyI-defect

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions