Skip to content

[🐛 Bug]: NoSuchDriverException under Windows if user home contains special characters #13653

@ivy-lmu

Description

@ivy-lmu

What happened?

Under Windows, it is possible that the user's home directory contains special characters such as ü, ä and ö etc..
With the user home C:\Users\DieLücke the following line of code in Java leads to NoSuchDriverException:
WebDriver driver = new ChromeDriver();

With C:\Users\hello the same code works fine.

How can we reproduce the issue?

https://github.com/ivy-lmu/webdriver

Relevant log output

C:\Users\DieLücke
Exception in thread "main" org.openqa.selenium.remote.NoSuchDriverException: chromedriver at location C:\Users\DieL?¼cke\.cache\selenium\chromedriver\win64\122.0.6261.94\chromedriver.exe, does not exist
For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/
Build info: version: '4.18.1', revision: 'b1d3319b48'
System info: os.name: 'Windows Server 2022', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.10'
Driver info: driver.version: ChromeDriver
        at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:76)
        at org.openqa.selenium.remote.service.DriverFinder.getPath(DriverFinder.java:33)
        at org.openqa.selenium.chrome.ChromeDriver.generateExecutor(ChromeDriver.java:99)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:89)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:84)
        at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:52)
        at com.example.Main.main(Main.java:9)

Operating System

Windows

Selenium version

Java 4.18.1

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

Chrome, Firefox

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

ChromeDriver, GeckoDriver

Are you using Selenium Grid?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-javaJava BindingsI-defectSomething is not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions