webdrivermanager: Getting java.lang.NumberFormatException: For input string: "public" issue in version 5.6.4

Description of the problem: I am getting the java.lang.NumberFormatException: For input string: “public” exception while running the test in chrome Browser and version: Browser Version of Chrome : Version 121.0.6167.185

Operating system and architecture: Windows 10 & 64 Bit

Selenium version: 4.13.0

WebDriverManager version: 5.6.4

WebDriverManager call:

WebDriverManager.chromedriver().clearDriverCache().setup();
WebDriverManager.chromedriver().setup();

WebDriverManager traces:

io.github.bonigarcia.wdm.config.WebDriverManagerException: java.lang.NumberFormatException: For input string: "public"
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1445)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1205)
at io.github.bonigarcia.wdm.WebDriverManager.fallback(WebDriverManager.java:1461)
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1442)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1205)
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1435)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1205)
at io.github.bonigarcia.wdm.WebDriverManager.setup(WebDriverManager.java:427)
Caused by: java.lang.NumberFormatException: For input string: "public"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.parseInt(Integer.java:615)
at io.github.bonigarcia.wdm.managers.ChromeDriverManager.buildUrl(ChromeDriverManager.java:178)
at io.github.bonigarcia.wdm.managers.ChromeDriverManager.buildUrl(ChromeDriverManager.java:155)
at io.github.bonigarcia.wdm.WebDriverManager.download(WebDriverManager.java:1282)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1199)
at io.github.bonigarcia.wdm.WebDriverManager.fallback(WebDriverManager.java:1461)
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1442)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1205)
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1435)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1205)
at io.github.bonigarcia.wdm.WebDriverManager.setup(WebDriverManager.java:427)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.cucumber.java.Invoker.doInvoke(Invoker.java:66)
at io.cucumber.java.Invoker.invoke(Invoker.java:24)
at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
at io.cucumber.java.JavaHookDefinition.execute(JavaHookDefinition.java:59)
at io.cucumber.core.runner.CoreHookDefinition.execute(CoreHookDefinition.java:46)
at io.cucumber.core.runner.HookDefinitionMatch.runStep(HookDefinitionMatch.java:21)
at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92)
at io.cucumber.core.runner.TestStep.run(TestStep.java:64)
at io.cucumber.core.runner.TestCase.run(TestCase.java:98)
at io.cucumber.core.runner.Runner.runPickle(Runner.java:71)
at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:151)
at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:135)
at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:27)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at io.cucumber.junit.Cucumber.runChild(Cucumber.java:199)
at io.cucumber.junit.Cucumber.runChild(Cucumber.java:90)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at io.cucumber.junit.Cucumber$RunCucumber.evaluate(Cucumber.java:234)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Error log:

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 30 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Thanks for the info, @Szyoo. I confirmed the issue. I have just committed https://github.com/bonigarcia/webdrivermanager/commit/509e56b5d48160f4eda6e149bbcb32bc96cb5461 that should solve it. I plan to make a new WDM release soon.

@Szyoo In this trace, I can see the metadata is already corrupted:

2024-02-21 00:44:54 [main] DEBUG i.g.b.wdm.cache.ResolutionCache.checkKeyInResolutionCache(186) - Resolution chrome121=public in cache (valid until 00:38:08 22/02/2024 CST)

So you need to clear the driver cache and run again:

WebDriverManager.chromedriver().clearDriverCache().setup();

This solved the error for me - WebDriverManager.chromedriver().arch32().clearDriverCache().setup();

===================================================

Try this code, It worked for me

WebDriverManager.chromedriver().clearDriverCache().setup(); driver = new ChromeDriver();

Thanks! When will it be available in the Maven repository? Lates version there is 5.6.4

https://central.sonatype.com/artifact/io.github.bonigarcia/webdrivermanager/5.7.0

WebDriverManager 5.7.0 is out. This release should fix this problem. If not, please open a new issue a follow the issue template to report it.

Hi I’ve just had the same issue. Was using 5.6.2 version, but when I changed it to 5.6.4 it started working

Same issue here, however in my case it is very difficult to reproduce (one test class with this error for several hundred test classes). The problem appeared after upgrading webdrivermanager to version 5.6.3.

Hello, you’ve to update webdrivermanager to version 5.6.4