Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome Version 121 -Could not instantiate class org.openqa.selenium.chrome.ChromeDriver #3408

Closed
tarun04sharma opened this issue Feb 21, 2024 · 21 comments

Comments

@tarun04sharma
Copy link

tarun04sharma commented Feb 21, 2024

Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 121.0.6167.184 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Build info: version: '4.1.2' .

had a similar issue in August with Chrome 116 update , is there any solution for this now .

I am using the below versions ,
<serenity.version>3.2.1</serenity.version>
io.github.bonigarcia
webdrivermanager
5.5.0

        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-chrome-driver</artifactId>
        <version>4.1.2</version>

Similar to the issue #3227 , any fix for this ?

@wakaleo

@mbarua1
Copy link

mbarua1 commented Feb 22, 2024

I am also having same issue and after upgrading serenity version from 3.6 to 4.0 now stuck in TestRunner » AbstractMethod Receiver class io.cucumber.junit.JUnitCucumberOptionsProvider$JunitCucumberOptions does not define or inherit an implementation of the resolved method 'abstract java.lang.Class uuidGenerator()' of interface io.cucumber.core.options.CucumberOptionsAnnotationParser$CucumberOptions

[INFO]
`

@wakaleo
Copy link
Member

wakaleo commented Feb 22, 2024

I am also having same issue and after upgrading serenity version from 3.6 to 4.0 now stuck in TestRunner » AbstractMethod Receiver class io.cucumber.junit.JUnitCucumberOptionsProvider$JunitCucumberOptions does not define or inherit an implementation of the resolved method 'abstract java.lang.Class uuidGenerator()' of interface io.cucumber.core.options.CucumberOptionsAnnotationParser$CucumberOptions

[INFO] `

That is a different issue, most likely a dependency conflict.

@mbarua1
Copy link

mbarua1 commented Feb 22, 2024

Thanks John @wakaleo . Okay and not able to identify the dependency conflict. Can you help me please?

@wakaleo
Copy link
Member

wakaleo commented Feb 22, 2024

Could not instantiate new WebDriver instance of type class org.openqa.selenium.chrome.ChromeDriver (Could not start a new session. Response code 500. Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 121.0.6167.184 with binary path /Applications/Google Chrome.app/Contents/MacOS/Google Chrome Build info: version: '4.1.2' .

had a similar issue in August with Chrome 116 update , is there any solution for this now .

I am using the below versions , <serenity.version>3.2.1</serenity.version> io.github.bonigarcia webdrivermanager 5.5.0

        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-chrome-driver</artifactId>
        <version>4.1.2</version>

Similar to the issue #3227 , any fix for this ?

@wakaleo

This isn't a Serenity issue directly, it is possibly related to old dependencies or drivers in your project or on your system path. See https://github.com/serenity-bdd/serenity-cucumber-starter for an example of the correct dependency configuration.

@mbarua1
Copy link

mbarua1 commented Feb 23, 2024

Thanks John @wakaleo . above Pom helped to resolved Chrome driver issue. However I am now having below issue. Injectors.getInjector method not supporting in new serenity version. Is there any way to resolve this situation.

Injectors.getInjector() method is not supported in Serenity version 4.0.28

@wakaleo
Copy link
Member

wakaleo commented Feb 25, 2024

Thanks John @wakaleo . above Pom helped to resolved Chrome driver issue. However I am now having below issue. Injectors.getInjector method not supporting in new serenity version. Is there any way to resolve this situation.

Injectors.getInjector() method is not supported in Serenity version 4.0.28

Read the release notes for 4.0.1

@mbarua1
Copy link

mbarua1 commented Mar 1, 2024

Thanks John @wakaleo . It worked and was able to reconfigure environment variable. Now another issue arises Parallel execution is not working. I had parallel execution from 3.2, 3.6 and with same configuration it is not working for 4.1.0. I had max pool size and parallal for 4 thread. Initially it is opening 4 thread but from second go was opening one by one browser which increased my total execution time from 28min to 56min. Please advise me where to find info from this issue. I do not see any release note for parallel in 4.0.1

@wakaleo
Copy link
Member

wakaleo commented Mar 1, 2024

Parallel execution with JUnit 5 is different to JUnit 4 - have a look at the JUnit 5 docs to see how it works.

@mbarua1
Copy link

mbarua1 commented Mar 1, 2024

I am using Junit5

@wakaleo
Copy link
Member

wakaleo commented Mar 1, 2024

@wakaleo
Copy link
Member

wakaleo commented Mar 5, 2024

Closing presumed resolved

@wakaleo wakaleo closed this as completed Mar 5, 2024
@mbarua1
Copy link

mbarua1 commented Mar 5, 2024

Not yet please

@mbarua1
Copy link

mbarua1 commented Mar 5, 2024

@wakaleo John, I tried all possible solution according to doc you provided still not working. So What happened to my case, I was running parallel for 3 thread and running scenarion outline for 4 test users, i am expecting to open 3 browser in first initiative and one more browser in 2nd attempt to complete same steps with 4 users in parallel execution 3, rather I see 3 browser opened in 1st attempt (which is expected), then more from 2nd, 3rd initiative it is opening single browser and keep continuing for couple times. below is my Junit-Platform-properties file
`cucumber.execution.parallel.enabled=true
cucumber.execution.parallel.config.strategy=fixed
cucumber.execution.parallel.config.fixed.parallelism=3
cucumber.plugin=io.cucumber.core.plugin.SerenityReporterParallel
cucumber.execution.parallel.config.fixed.max-pool-size=3

And POM

perties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<serenity.version>4.1.0</serenity.version>
<junit-vintage-engine.version>5.10.1</junit-vintage-engine.version>
<junit-platform-suite.version>1.10.1</junit-platform-suite.version>
<cucumber-junit-platform-engine.version>7.15.0</cucumber-junit-platform-engine.version>
UTF-8





net.serenity-bdd
serenity-core
${serenity.version}
test


net.serenity-bdd
serenity-junit5
${serenity.version}


net.serenity-bdd
serenity-cucumber
${serenity.version}
test


net.serenity-bdd
serenity-screenplay
${serenity.version}
test


net.serenity-bdd
serenity-screenplay-webdriver
${serenity.version}
test


net.serenity-bdd
serenity-ensure
${serenity.version}
test


org.junit.platform
junit-platform-launcher
${junit-platform-suite.version}
test


io.cucumber
cucumber-junit-platform-engine
${cucumber-junit-platform-engine.version}
test


org.junit.platform
junit-platform-suite
${junit-platform-suite.version}
test


org.junit.jupiter
junit-jupiter-engine
${junit-vintage-engine.version}
test


org.junit.vintage
junit-vintage-engine
${junit-vintage-engine.version}
test



jline
jline
2.11


io.rest-assured
rest-assured
5.3.0
test


com.github.javafaker
javafaker
1.0.2

    <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>3.23.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
           <!-- <version>3.1.2</version> -->
            <version>3.2.1</version>
            <configuration>
                <skip>true</skip>
            </configuration>
        </plugin>
        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
           <!-- <version>3.1.2</version>-->
            <version>3.2.1</version>
            <configuration>
                <includes>
                    <include>**/*Test.java</include>
                    <include>**/Test*.java</include>
                    <include>**/*TestSuite.java</include>
                    <include>**/When*.java</include>
                </includes>
              <!--   <systemPropertyVariables>
                    <webdriver.base.url>${webdriver.base.url}</webdriver.base.url> 
                </systemPropertyVariables> -->
                <parallel>classes</parallel>
                <parallel>methods</parallel>
               <!-- <threadCount>4</threadCount>-->
                <useUnlimitedThreads>true</useUnlimitedThreads> 
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <goal>verify</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>net.serenity-bdd.maven.plugins</groupId>
            <artifactId>serenity-maven-plugin</artifactId>
            <version>${serenity.version}</version>
            <configuration>
                <tags>${tags}</tags>
                <reports>single-page-html</reports>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>net.serenity-bdd</groupId>
                    <artifactId>serenity-single-page-report</artifactId>
                    <version>${serenity.version}</version>
                </dependency>
            </dependencies>
            <executions>
                <execution>
                    <id>serenity-reports</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>aggregate</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

@mbarua1
Copy link

mbarua1 commented Mar 5, 2024

@tarun04sharma - Is parallel working for you?

@tarun04sharma
Copy link
Author

@mbarua1 I have not yet implemented and tried parallel testing

@wakaleo
Copy link
Member

wakaleo commented Mar 6, 2024

@mbarua1 see https://github.com/serenity-bdd/screenplay-pattern-todomvc.git for an example of how to configure parallel execution with JUnit 5 and Cucumber in Serenity.

@mbarua1
Copy link

mbarua1 commented Mar 6, 2024

@wakaleo - Thanks John. Doing it now

@mbarua1
Copy link

mbarua1 commented Mar 6, 2024

John, I tried all options enlisted here with max pool size 4 and 3 test cases(just scenario, not scenario outline), So initially 3 browser opened and all 3 scenario (from same feature file) ran, then i am expecting to finish test execution and generate report. However it is not and again one by one browser was opening and one by one test was running. So total six browser opened (3 in first initiative and one by one). And report says 3 test ran which is weird, I am not understanding which causing this issue. With same set up (junit-platform file and with 4 max pool size )just with serenity 3.6 , I ws running same sets(30 test case) of smoke suite for last 8 month within 25 min and now it is taking 55 just for double run. Initially running as parallel and after a few min open one by one browser. Please suggest me how I can resolve this issue. @wakaleo

@wakaleo
Copy link
Member

wakaleo commented Mar 6, 2024

I would need to look at the project setup. Sometimes JUnit 5 can be tricky to configure. If you do need project-specific support we can do this as part of a commercial support contract.

@mbarua1
Copy link

mbarua1 commented Mar 6, 2024

alright, How to do it and what will be procedure for that?
@wakaleo

@wakaleo
Copy link
Member

wakaleo commented Mar 6, 2024

alright, How to do it and what will be procedure for that? @wakaleo

See https://www.serenitydojo.academy/serenity-bdd-support-packages
for all the options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants