Skip to content

[🐛 Bug]: Selenium 4.32.0 Browser initialisation is failing with error: unexpected argument '--language-binding' found #15750

@prashantpawarlogicmonitor

Description

Description

When we try to initiate the browser using selenium manager in selenium 4.32.0
we are seeing the initiation is failing with following error

error: unexpected argument '--language-binding' found

org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: geckodriver, error Command failed with code: 2, executed: [--browser, firefox, --language-binding, java, --output, json]
error: unexpected argument '--language-binding' found

Usage: selenium-manager <--browser |--driver |--grid [<GRID_VERSION>]|--driver-version <DRIVER_VERSION>|--browser-version <BROWSER_VERSION>|--browser-path <BROWSER_PATH>|--driver-mirror-url <DRIVER_MIRROR_URL>|--browser-mirror-url <BROWSER_MIRROR_URL>|--output |--os |--arch |--proxy |--timeout |--ttl |--cache-path <CACHE_PATH>|--clear-cache|--clear-metadata|--debug|--trace|--offline|--force-browser-download|--avoid-browser-download>

Reproducible Code

ChromeOptions options = new ChromeOptions();
                Map<String, Object> prefs = new HashMap<String, Object>();
                prefs.put("download.prompt_for_download", false);
                options.setExperimentalOption("prefs", prefs);
                logger.info("Returning ChromeDriver Object");
                return new ChromeDriver(options);

Debugging Logs

org.openqa.selenium.remote.NoSuchDriverException: Unable to obtain: geckodriver, error Command failed with code: 2, executed: [--browser, firefox, --language-binding, java, --output, json]
error: unexpected argument '--language-binding' found

Usage: selenium-manager <--browser <BROWSER>|--driver <DRIVER>|--grid [<GRID_VERSION>]|--driver-version <DRIVER_VERSION>|--browser-version <BROWSER_VERSION>|--browser-path <BROWSER_PATH>|--driver-mirror-url <DRIVER_MIRROR_URL>|--browser-mirror-url <BROWSER_MIRROR_URL>|--output <OUTPUT>|--os <OS>|--arch <ARCH>|--proxy <PROXY>|--timeout <TIMEOUT>|--ttl <TTL>|--cache-path <CACHE_PATH>|--clear-cache|--clear-metadata|--debug|--trace|--offline|--force-browser-download|--avoid-browser-download>

For more information, try '--help'.


	at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:121)
	at org.openqa.selenium.remote.service.DriverFinder.getDriverPath(DriverFinder.java:55)
	at org.openqa.selenium.firefox.FirefoxDriver.generateExecutor(FirefoxDriver.java:128)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:119)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:114)
	at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:99)
	at com.santaba.auto.lib.ui.common.DriverUtils.getWebDriver(DriverUtils.java:52)
	at com.santaba.auto.lib.ui.factories.DriverFactory.getDriver(DriverFactory.java:101)
	at com.santaba.auto.lib.ui.driver.Driver.initDriver(Driver.java:31)
	at com.santaba.tdd.cases.ui.common.UiTestBaseHelper.initializeBrowser(UiTestBaseHelper.java:202)
	at com.santaba.tdd.cases.ui.common.UiTestBase.initializeBrowser(UiTestBase.java:117)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
	at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:361)
	at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:296)
	at org.testng.internal.invokers.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:180)
	at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:122)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at org.testng.TestRunner.privateRun(TestRunner.java:829)
	at org.testng.TestRunner.run(TestRunner.java:602)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:437)
	at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:475)
	at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:58)
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
	at --- Async.Stack.Trace --- (captured by IntelliJ IDEA debugger)
	at java.base/java.util.concurrent.FutureTask.<init>(FutureTask.java:132)
	at java.base/java.util.concurrent.AbstractExecutorService.newTaskFor(AbstractExecutorService.java:113)
	at java.base/java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:274)
	at org.testng.internal.thread.ThreadUtil.execute(ThreadUtil.java:64)
	at org.testng.SuiteRunner.runInParallelTestMode(SuiteRunner.java:458)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:389)
	at org.testng.SuiteRunner.run(SuiteRunner.java:330)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1256)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1176)
	at org.testng.TestNG.runSuites(TestNG.java:1099)
	at org.testng.TestNG.run(TestNG.java:1067)
	at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:65)
	at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:105)
Caused by: org.openqa.selenium.WebDriverException: Command failed with code: 2, executed: [--browser, firefox, --language-binding, java, --output, json]
error: unexpected argument '--language-binding' found

Usage: selenium-manager <--browser <BROWSER>|--driver <DRIVER>|--grid [<GRID_VERSION>]|--driver-version <DRIVER_VERSION>|--browser-version <BROWSER_VERSION>|--browser-path <BROWSER_PATH>|--driver-mirror-url <DRIVER_MIRROR_URL>|--browser-mirror-url <BROWSER_MIRROR_URL>|--output <OUTPUT>|--os <OS>|--arch <ARCH>|--proxy <PROXY>|--timeout <TIMEOUT>|--ttl <TTL>|--cache-path <CACHE_PATH>|--clear-cache|--clear-metadata|--debug|--trace|--offline|--force-browser-download|--avoid-browser-download>

For more information, try '--help'.

	at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:173)
	at org.openqa.selenium.manager.SeleniumManager.getBinaryPaths(SeleniumManager.java:254)
	at org.openqa.selenium.remote.service.DriverFinder.getBinaryPaths(DriverFinder.java:102)
	... 44 more
Caused by: org.openqa.selenium.json.JsonException: Unable to parse: error: unexpected argument '--language-binding' found

Usage: selenium-manager <--browser <BROWSER>|--driver <DRIVER>|--grid [<GRID_VERSION>]|--driver-version <DRIVER_VERSION>|--browser-version <BROWSER_VERSION>|--browser-path <BROWSER_PATH>|--driver-mirror-url <DRIVER_MIRROR_URL>|--browser-mirror-url <BROWSER_MIRROR_URL>|--output <OUTPUT>|--os <OS>|--arch <ARCH>|--proxy <PROXY>|--timeout <TIMEOUT>|--ttl <TTL>|--cache-path <CACHE_PATH>|--clear-cache|--clear-metadata|--debug|--trace|--offline|--force-browser-download|--avoid-browser-download>

For more information, try '--help'.

	at org.openqa.selenium.json.Json.toType(Json.java:169)
	at org.openqa.selenium.json.Json.toType(Json.java:152)
	at org.openqa.selenium.manager.SeleniumManager.runCommand(SeleniumManager.java:158)
	... 46 more
Caused by: org.openqa.selenium.json.JsonException: Unable to determine type from: e. Last 1 characters read: e, next 128 characters to read: rror: unexpected argument '--language-binding' found

Usage: selenium-manager <--browser <BROWSER>|--driver <DRIVER>|--grid [<GR
Build info: version: '4.0.0', revision: '3a21814679'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '15.4.1', java.version: '17.0.14'
Driver info: driver.version: Driver
	at org.openqa.selenium.json.JsonInput.peek(JsonInput.java:166)
	at org.openqa.selenium.json.JsonTypeCoercer.lambda$buildCoercer$6(JsonTypeCoercer.java:167)
	at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:146)
	at org.openqa.selenium.json.Json.toType(Json.java:206)
	at org.openqa.selenium.json.Json.toType(Json.java:167)
	... 48 more

ℹ️ Last known working version: 4.16.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-javaJava BindingsD-chromeI-defectSomething is not working as intendedJ-awaiting answerQuestion asked of user; a reply moves it to triage againOS-mac

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions