Driver starts with Java-Client 4.1.2 but fails with java-client-5.0.0-BETA8

Appium 1.6.4

Our tests run smoothly with the Java-Client 4.1.2.
Now when we change it to the latest java-client-5.0.0-BETA8 the app is installed but the driver is failing to initialize.
Below is our desired capabilities.
Are we missing somthing there? Can someone with similar ENV can share his desired capabilities for comparison?

Maybe there is other dependencies that we are missing?
Any help will be most appreciated!

DesiredCapabilities capabilities =;
capabilities.setCapability(MobileCapabilityType.APP, genMeth.getValueFromPropFile(“appPath”));
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, genMeth.getValueFromPropFile(“deviceName”));
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 120);
driver = new AndroidDriver(service.getUrl(),capabilities);

I also encountered the same problem

you need to share the error logs… there can be many reasons why its not starting… make sure selenium-java is the minimum version

I have updated the selenium-Java to the latest version (2.53) but the issue remains.

I have tried to run the automation with the capabilities.setCapability(“automationName”,“uiautomator2”) & without & It fails for both cases (see 2 logs failures attached).
Is the desired capabilities seems ok?
Thanks to the assistantwithout the uiautomator2 capabilities.txt (8.6 KB)
with uiautomator2 capabilities.txt (82.0 KB)

@menypeled your issue is not related to “automationName”… looks like you system setup is not complete yet…

first fix the below issue
Encountered internal error running command: Error: JAVA_HOME is not set currently. Please set JAVA_HOME.

Seconldy, run the appium-doctor and see if u get a green light