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
- Update pom.xml Downgrade version because of the https://github.com/appium/java-client/issues/1872 bug — committed to sora-xor/sora2-passport-appium-tests by adaagava a year ago
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
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.
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.