webdrivermanager icon indicating copy to clipboard operation
webdrivermanager copied to clipboard

[BUG] Error creating WebDriver object for Chrome version(108.0.5359.72) from webdrivermanager

Open raghunadh10 opened this issue 4 years ago • 12 comments

Description of the problem: I have updated my chrome to newer version yesterday . Before updation, everything works fine . After update , Chrome driver is not getting started succesfully . WebDriverManager is throwing the error as below logs .

Browser and version: Chrome , Version 108.0.5359.72 (Official Build) (64-bit)

Operating system: Windows 10 20H2 , Processor -- 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz 1.50 GHz

WebDriverManager version: I have used both the versions 5.3.0 and 5.3.1

WebDriverManager call: WebDriverManager.getInstance(browserMap.get(browser)).capabilities(getDefaultCapabilities()).create();

WebDriverManager traces:
io.github.bonigarcia.wdm.config.WebDriverManagerException: There was an error creating WebDriver object for Chrome at io.github.bonigarcia.wdm.WebDriverManager.instantiateDriver(WebDriverManager.java:1774) at io.github.bonigarcia.wdm.WebDriverManager.create(WebDriverManager.java:424) at com.company.global.qa.new_framework.Driver.createDriver(Driver.java:150) at com.company.global.qa.new_framework.Driver.createDriver(Driver.java:161) at com.company.global.qa.browser.stepdefns.BrowserSteps.openUrlInBrowser(BrowserSteps.java:81) at com.company.global.qa.browser.stepdefns.BrowserSteps.openInBrowser(BrowserSteps.java:96) at ✽.open "sn_url" in "chrome" browser(file:///C:/Users/name/IdeaProjects/automation-tests/src/test/resources/features/sample.feature:6) Caused by: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480) at io.github.bonigarcia.wdm.webdriver.WebDriverCreator.createLocalWebDriver(WebDriverCreator.java:61) at io.github.bonigarcia.wdm.WebDriverManager.createLocalWebDriver(WebDriverManager.java:1948) at io.github.bonigarcia.wdm.WebDriverManager.instantiateDriver(WebDriverManager.java:1763) at io.github.bonigarcia.wdm.WebDriverManager.create(WebDriverManager.java:424) at com.bt.global.qa.digico_framework.Driver.createDriver(Driver.java:150) at com.bt.global.qa.digico_framework.Driver.createDriver(Driver.java:161) at com.bt.global.qa.browser.stepdefns.BrowserSteps.openUrlInBrowser(BrowserSteps.java:81) at com.bt.global.qa.browser.stepdefns.BrowserSteps.openInBrowser(BrowserSteps.java:96) 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:568) 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.JavaStepDefinition.execute(JavaStepDefinition.java:29) at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66) at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63) at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10) at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:85) at io.cucumber.core.runner.TestStep.run(TestStep.java:57) at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51) at io.cucumber.core.runner.TestCase.run(TestCase.java:84) at io.cucumber.core.runner.Runner.runPickle(Runner.java:75) at io.cucumber.junit.PickleRunners$NoStepDescriptions.lambda$run$0(PickleRunners.java:151) at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$5(CucumberExecutionContext.java:129) at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23) at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:129) at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:148) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:144) at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:28) 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.FeatureRunner.run(FeatureRunner.java:137) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:196) at io.cucumber.junit.Cucumber.runChild(Cucumber.java:89) 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$RunBeforeAllHooks.evaluate(Cucumber.java:266) at io.cucumber.junit.Cucumber$RunAfterAllHooks.evaluate(Cucumber.java:281) at io.cucumber.junit.Cucumber$StartTestRun.evaluate(Cucumber.java:233) at io.cucumber.junit.Cucumber$FinishTestRun.evaluate(Cucumber.java:248) 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) Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:561) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:230) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:151) at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:108) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:104) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:91) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:80) ... 64 more

Additional details and screenshots ---

The chrome driver is not getting downloaded properly for the chrome browser newer version . It looks as below (0KB) .

image

raghunadh10 avatar Dec 02 '22 05:12 raghunadh10

@raghunadh10 I am facing the same issue. How did you resolve this issue as I see this has been closed. Any inputs would be really helpful. Thanks!

murugeshkp avatar Dec 13 '22 01:12 murugeshkp

The problem got resolved when I upgraded some of the Maven dependencies in my maven project to the latest version.

murugeshkp avatar Dec 14 '22 00:12 murugeshkp

I am facing the same issue. @raghunadh10 @murugeshkp Can you share the exact resolution here please?

HemanthKu-Kore avatar Jan 06 '23 07:01 HemanthKu-Kore

@HemanthKu-Kore resolved with adding dependency <dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>${last.version}</version> </dependency> end excluding "guava" from webdrivermanager: <dependency> <groupId>io.github.bonigarcia</groupId> <artifactId>webdrivermanager</artifactId> <version>5.3.1</version> <exclusions> <exclusion> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </exclusion> </exclusions> </dependency>

yyenko avatar Jan 06 '23 13:01 yyenko

Thank you @yyenko . Can you also share the version you are using for com.google.guava dependency please?

HemanthKu-Kore avatar Jan 06 '23 14:01 HemanthKu-Kore

@HemanthKu-Kore sure, I got this https://mvnrepository.com/artifact/com.google.guava/guava/31.1-jre

yyenko avatar Jan 07 '23 11:01 yyenko

I am using webdriver manager 5.3.1 my chromedriver version is 110.0.5481.77 google chrome version is 111.0.5563.110 and running selenium-java automation(Maven project) suit on Jenkins which is on EC2 and getting an error-io.github.bonigarcia.wdm.config.WebDriverManagerException: There was an error creating WebDriver object for Chrome Also tried above solution of excluding com.google.guava dependancy but did not work any solution please

mindset-stack avatar Mar 25 '23 03:03 mindset-stack

@mindset-stack @HemanthKu-Kore , did issue got resolved for u people, I have updated webdriver version, added guava dependency, still it is giving me the same error, please advise

ASiri08 avatar Apr 25 '23 11:04 ASiri08

Has this issue has been sloved even i am facing the same issue i have updated everything but it is getting failed in pipe line

aishwarya2801-ux avatar May 24 '23 08:05 aishwarya2801-ux

Hi @ASiri08 @aishwarya2801-ux . can you please paste your logs here?

raghunadh10 avatar May 24 '23 09:05 raghunadh10

I am facing the same issue. @raghunadh10 @murugeshkp Can you share the exact resolution here please?

Thank you @yyenko . Can you also share the version you are using for com.google.guava dependency please?

Hi @raghunadh10,

        <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
	<dependency>
	    <groupId>org.seleniumhq.selenium</groupId>
	    <artifactId>selenium-java</artifactId>
	    <version>4.11.0</version>
	</dependency>


	<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
	<dependency>
	    <groupId>io.github.bonigarcia</groupId>
	    <artifactId>webdrivermanager</artifactId>
	    <version>5.4.1</version>
	</dependency>
	

	<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
	<dependency>
	    <groupId>com.google.guava</groupId>
	    <artifactId>guava</artifactId>
	    <version>32.1.2-jre</version>
	</dependency>

asnirmal2014 avatar Aug 08 '23 08:08 asnirmal2014

I have used the following dependencies to resolve this issue. [Error creating WebDriver object for Chrome]

        <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
	<dependency>
	    <groupId>org.seleniumhq.selenium</groupId>
	    <artifactId>selenium-java</artifactId>
	    <version>4.11.0</version>
	</dependency>


	<!-- https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager -->
	<dependency>
	    <groupId>io.github.bonigarcia</groupId>
	    <artifactId>webdrivermanager</artifactId>
	    <version>5.4.1</version>
	</dependency>
	

	<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
	<dependency>
	    <groupId>com.google.guava</groupId>
	    <artifactId>guava</artifactId>
	    <version>32.1.2-jre</version>
	</dependency>

asnirmal2014 avatar Aug 08 '23 08:08 asnirmal2014