Skip to content

[🐛 Bug]: Grid does not get Driver when session capabilities expect "system" proxy #17358

@bhecquet

Description

@bhecquet

Description

Hello,

I open this issue which is equivalent to #16899
The issue 16899 has been closed without being corrected (if I'm not wrong)
I still get the problem

Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 146.0, goog:chromeOptions: {args: [--disable-translate, --disable-web-security, --no-sandbox, --disable-site-isolation-tr..., --disable-search-engine-cho..., --disable-features=IsolateO..., --remote-allow-origins=*], binary: C:/Program Files/Google/Chr..., extensions: [], perfLoggingPrefs: {enableNetwork: true, enablePage: true}, prefs: {download.default_directory: D:\outilsdev\.java-tmp\uuid..., download.prompt_for_download: false, profile.exit_type: Normal, savefile.default_directory: D:\outilsdev\.java-tmp\uuid...}}, goog:loggingPrefs: {performance: ALL}, pageLoadStrategy: normal, platformName: any, proxy: {proxyType: system}, se:downloadsEnabled: true, sr:beta: false, sr:creationRequestTime: 2026-04-17T09:30:15.5569797, unhandledPromptBehavior: {alert: ignore, beforeUnload: ignore, confirm: ignore, default: ignore, file: ignore, prompt: ignore}, webSocketUrl: true}

In method DriverFinder.toArguments(),

Proxy proxy = Proxy.extractFrom(options);
if (proxy != null
&& proxy.getProxyType() != Proxy.ProxyType.DIRECT
&& proxy.getProxyType() != Proxy.ProxyType.AUTODETECT) {
arguments.add("--proxy");
if (proxy.getSslProxy() != null) {

If the proxy is "system", the option "--proxy" is added whereas none of the following conditions apply (ssl proxy, http proxy, autoconfig)
And so, option remains with empty value leading to

org.openqa.selenium.WebDriverException: Command failed with code: 2, executed: [--browser, chrome, --browser-version, 146.0, --browser-path, C:/Program Files/Google/Chrome/Application/chrome.exe, --proxy, --language-binding, java, --output, json]
error: a value is required for '--proxy <PROXY>' but none was supplied

If you think that only excluding "System proxy" like "Direct" and "Autodetect" is enough, I can provide a PR

Reproducible Code

See https://github.com/SeleniumHQ/selenium/issues/16899

Debugging Logs

see description

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-needs-triagingA Selenium member will evaluate this soon!B-gridEverything grid and server relatedC-javaJava BindingsD-chromeI-defectSomething is not working as intendedOS-windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions