java-client: Java 8.3.0 is not compatible with selenium 4.8.2

Description

selenium java version 4.8.2 was released not long ago and appium java-client 8.3.0 cannot invoke appium server programmatically(manually it works well). I get SurefireExecutionException: Exception in provider error when executing the test and I can see in the logs that appium server wasn’t able to launch.

Is there any time estimation for a compatible java-client version? or maybe a workaround for meanwhile?

Environment

  • Java client build version or git revision if you use some snapshot: 8.3.0
  • Appium server version or git revision if you use some snapshot: 2.0.0-beta.57
  • Desktop OS/version used to run Appium if necessary: MacOS Ventura, m1 machine
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 16.16.0
  • Mobile platform/version under test: android api 30, iOS 15.5
  • Real device or emulator/simulator: emulator and simulator on both platforms

Details

I use maven, testng and surefire-plugin setup. Maven automatically updates selenium’s version.

Exception Stacktraces

SurefireExecutionException: Exception in provider

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 38 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Solved it by going to $HOME/.m2/repository/io/appium/java-client/8.3.0 and adjusting the file: java-client-8.3.0.pom. Changing all selenium related dependencies’ version tag from: <version>[4.7.0, 5.0)</version> to <version>[4.7.0, 4.8.2)</version> to eliminate incompatible 4.8.2 selenium version.

Still would like to have a time estimation for a compatible version, Thanks.

In SeleniumConf now, will do it tonight.

Another workaround is to exclude selenium dependency in pom.xml and the add selenium dependency explicitly. In case if not working then delete the appium java-client 8.3.0 version from local repository %userprofile%.m2\repository\io\appium\java-client

 <dependencies>
        <dependency>
            <groupId>io.appium</groupId>
            <artifactId>java-client</artifactId>
            <version>8.3.0</version>
            <exclusions>

                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-remote-driver</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-support</artifactId>
                </exclusion>

                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.8.1</version>
        </dependency>

    </dependencies>

i have updated now appium version 8.3.0 and selenium java 4.8.2 and using latest appium 2 beta, but the AppiumDriverLocalService throws n ow a nullpointer Exception

java.lang.NullPointerExceptionio.appium.java_client.service.local.AppiumDriverLocalService.destroyProcess(AppiumDriverLocalService.java:220) Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.

Anyone know if there has something changed in the AppiumServerBuilder i have to adjust now ?

you don’t have to do anything in the java-client-8.3.0.pom instead just change the version of your selenium maven libraries in your project pom file to 4.8.2.

Solved it by going to $HOME/.m2/repository/io/appium/java-client/8.3.0 and adjusting the file: java-client-8.3.0.pom. Changing all selenium related dependencies’ version tag from: <version>[4.7.0, 5.0)</version> to <version>[4.7.0, 4.8.2)</version> to eliminate incompatible 4.8.2 selenium version.

Still would like to have a time estimation for a compatible version, Thanks.

Thank you for your fix. I faced the same issue.

I’ve just merged https://github.com/appium/java-client/pull/1878

It will be published with the next java client patch

@mykola-mokhnach https://gist.github.com/Idoserovitz/58c2b2e41ede8c950d7ffb4bc3eeaffd

Note that “CustomTestListenerAdapter” is a class I created which implements test failure post action and triggered by testng. It should not cause such an issue. And again, appium server never started.