SeleniumHQ / selenium

A browser automation framework and ecosystem.

Home Page:https://selenium.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ivy-lmu opened this issue · comments

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

@ivy-lmu, 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!

@bonigarcia I thought this was fixed a while ago, do you know?

Yes, it was reported in the .Net bindings: #11947

... and solved here: bfcda90

Perhaps it is happening also in the Java bindings.