0

I recently updated Selenium (Java) from 4.8.1 to 4.9.0 - this seems to be part of the error below. Note: I'm using the latest stable releases of Selenium and Appium via my pom.xml. I've also tried this compiling to Java 8 and Java 17.

Attempting to build the Appium driver with AppiumDriverLocalService works, but fails when calling the start() method. Debugging, I see a variable called nodeJSExec is never set.

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.os.CommandLine.isRunning()" because "this.process" is null
    at io.appium.java_client.service.local.AppiumDriverLocalService.destroyProcess(AppiumDriverLocalService.java:220)
    at io.appium.java_client.service.local.AppiumDriverLocalService.destroyProcess(AppiumDriverLocalService.java:253)
    at io.appium.java_client.service.local.AppiumDriverLocalService.start(AppiumDriverLocalService.java:176)
    at testbase.TestBaseAndroid.startAppiumAndAndroid(TestBaseAndroid.java:32)
    at Test.main(Test.java:24)
<!-- BROWSER AUTOMATION  -->                  
<dependency>                                  
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-java</artifactId>    
    <version>4.9.0</version>                  
</dependency>                                 
<dependency>                                  
    <groupId>io.github.bonigarcia</groupId>   
    <artifactId>webdrivermanager</artifactId> 
    <version>5.3.1</version>                  
</dependency>                                 
<!-- ANDROID / WINDOWS AUTOMATION -->         
<dependency>                                  
    <groupId>io.appium</groupId>              
    <artifactId>java-client</artifactId>      
    <version>8.3.0</version>                  
</dependency>                                 
<!-- OPTICAL CHARACTER RECOGNITION -->        

I can downgrade, but I'm wondering if there's a workaround for the latest versions of Selenium and Appium for Java.

I've attempted to manually set the Appium Node executable path with AppiumServiceBuilder::withAppiumJS AppiumDriverLocalService::setExecutable to no avail.

Is there a workaround, or should I downgrade?

  • This is still an open issue, Appium 8.3.0 is not compatible with selenium version > 4.8.1 , you can check out this open bug here [Java 8.3.0 is not compatible with selenium 4.8.2](https://github.com/appium/java-client/issues/1872) – Abhay Chaudhary May 06 '23 at 06:05

0 Answers0