webdriver_manager icon indicating copy to clipboard operation
webdriver_manager copied to clipboard

Edge driver download fails due to outdated CDN (msedgedriver.azureedge.net)

Open Valeriamejia1 opened this issue 5 months ago • 7 comments

Summary

The current implementation of webdriver-manager fails to download the Edge driver because it still tries to access the outdated CDN:

https://msedgedriver.azureedge.net/

This domain is no longer available. Microsoft has officially migrated to:

https://msedgedriver.microsoft.com/

Steps to Reproduce

  1. Use EdgeChromiumDriverManager().install() in any script.
  2. Run the script.
  3. The request to azureedge.net fails with a ConnectionError.

Environment

  • OS: Windows 10 / 11
  • webdriver-manager version: 4.0.2
  • Edge version: 138.0.x.x
  • Python version: 3.x

Expected Behavior

The manager should automatically use the new Microsoft CDN: https://msedgedriver.microsoft.com/

Suggested Fix

Update the internal references to point to the new domain, as recommended by Microsoft: https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/#download-and-install

Additional Notes

Microsoft support has confirmed this is expected behavior due to the CDN migration. Please update the download logic to reflect this change.

Thanks!

Valeriamejia1 avatar Jul 16 '25 18:07 Valeriamejia1

Same issue. Please update ASAP as this library has been used in serveral projects. Thank you and thank you again.

pan000987 avatar Jul 17 '25 05:07 pan000987

Same issue here.

Related links:

  • https://github.com/SeleniumHQ/selenium/issues/16063
  • https://github.com/webdriverio/selenium-standalone/issues/945
  • https://github.com/webdriverio/selenium-standalone/pull/946

Stacktrace:

Traceback (most recent call last):
  File "C:\python\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 38, in get_path
    path = SeleniumManager().driver_location(options) if path is None else path
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 94, in driver_location
    output = self.run(args)
             ^^^^^^^^^^^^^^
  File "C:\python\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 140, in run
    raise WebDriverException(f"Unsuccessful command executed: {command}.\n{result}{stderr}")
selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\python\Lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser MicrosoftEdge --output json.
{'code': 65, 'message': 'error sending request for url (https://msedgedriver.azureedge.net/LATEST_RELEASE_138_WINDOWS): error trying to connect: dns error: No such host is known. (os error 11001)', 'driver_path': '', 'browser_path': ''}


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 69, in <module>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\python\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 38, in get_path
    path = SeleniumManager().driver_location(options) if path is None else path
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 94, in driver_location
    output = self.run(args)
             ^^^^^^^^^^^^^^
  File "C:\python\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 140, in run
    raise WebDriverException(f"Unsuccessful command executed: {command}.\n{result}{stderr}")
selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\python\Lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser MicrosoftEdge --output json.
{'code': 65, 'message': 'error sending request for url (https://msedgedriver.azureedge.net/LATEST_RELEASE_138_WINDOWS): error trying to connect: dns error: No such host is known. (os error 11001)', 'driver_path': '', 'browser_path': ''}


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 69, in <module>
  File "C:\python\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 94, in driver_location
    output = self.run(args)
             ^^^^^^^^^^^^^^
  File "C:\python\Lib\site-packages\selenium\webdriver\common\selenium_manager.py", line 140, in run
    raise WebDriverException(f"Unsuccessful command executed: {command}.\n{result}{stderr}")
selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\python\Lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser MicrosoftEdge --output json.
{'code': 65, 'message': 'error sending request for url (https://msedgedriver.azureedge.net/LATEST_RELEASE_138_WINDOWS): error trying to connect: dns error: No such host is known. (os error 11001)', 'driver_path': '', 'browser_path': ''}


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 69, in <module>
selenium.common.exceptions.WebDriverException: Message: Unsuccessful command executed: C:\python\Lib\site-packages\selenium\webdriver\common\windows\selenium-manager.exe --browser MicrosoftEdge --output json.
{'code': 65, 'message': 'error sending request for url (https://msedgedriver.azureedge.net/LATEST_RELEASE_138_WINDOWS): error trying to connect: dns error: No such host is known. (os error 11001)', 'driver_path': '', 'browser_path': ''}


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 69, in <module>


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 69, in <module>

Traceback (most recent call last):
  File "test.py", line 69, in <module>
Traceback (most recent call last):
  File "test.py", line 69, in <module>
  File "test.py", line 69, in <module>
    driver = my_webdriver.create_webdriver(download_directory)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "my_webdriver.py", line 26, in create_webdriver
    driver = webdriver.Edge(options = options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python\Lib\site-packages\selenium\webdriver\edge\webdriver.py", line 45, in __init__
    super().__init__(
  File "C:\python\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 51, in __init__
    self.service.path = DriverFinder.get_path(self.service, options)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\python\Lib\site-packages\selenium\webdriver\common\driver_finder.py", line 41, in get_path
    raise NoSuchDriverException(msg) from err
selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain driver for MicrosoftEdge using Selenium Manager.; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location

Please fix asap.

Masterxilo avatar Jul 18 '25 17:07 Masterxilo

Workaround:

        # WORKAROUND
        class CustomHttpClient(HttpClient):
            def get(self, url, params=None, **kwargs) -> Response:
                """
                Add you own logic here like session or proxy etc.
                """
                # WORKAROUND: https://msedgedriver.azureedge.net/LATEST_RELEASE_138_WINDOWS is now at https://msedgedriver.microsoft.com/LATEST_RELEASE_138_WINDOWS ; so replace azureedge.net with microsoft.com
                original_url = url
                url = original_url.replace("azureedge.net", "microsoft.com")
                log(f"my_webdriver CustomHttpClient: GET request to {url} (original: {original_url}) with params {params}")
                return requests.get(url, params, **kwargs)

        driver = webdriver.Edge(
            # service=EdgeService(EdgeChromiumDriverManager().install()), options = options # without WORKAROUND
            service=EdgeService(EdgeChromiumDriverManager(download_manager=WDMDownloadManager(CustomHttpClient())).install()), options = options
        )

Masterxilo avatar Jul 18 '25 18:07 Masterxilo

A temporarily way to solve it in Python is as below:

driverPath = EdgeChromiumDriverManager( url="https://msedgedriver.microsoft.com/", latest_release_url="https://msedgedriver.microsoft.com/LATEST_RELEASE" ).install()

pan000987 avatar Jul 21 '25 04:07 pan000987

Why has it not been fixed yet?

Dylan96 avatar Aug 31 '25 19:08 Dylan96

When can we expect this issue to be fixed?

ganeshprabu1997 avatar Sep 08 '25 07:09 ganeshprabu1997

When can we expect this issue to be fixed?

Updating selenium server jar to 4.35 fixed my issue .Thanks

ganeshprabu1997 avatar Sep 08 '25 14:09 ganeshprabu1997