I'm Working in appium. previously, my code doesn't work in above 5.o When I changed its working fine. android version. driver = new AndroidDriver(new URL(""), capabilities); above code works fine in above 5.0 android version. And the app was launch and couldn't open the app and still got the same error.

Android setup

public class AndroidSetup {

    protected AndroidDriver driver;

    protected void prepareAndroidForAppium() throws MalformedURLException {
        DesiredCapabilities capabilities = new DesiredCapabilities();
        capabilities.setCapability("appium-version", "1.6.3");
        capabilities.setCapability("platformName", "Android");
        capabilities.setCapability("platformVersion", "6.0");
        capabilities.setCapability("deviceName", "Mi Phone");
        capabilities.setCapability("app", "/home/naveen/IdeaProjects/QberLoginPage/app/Qber_Customer_V1.6.0.apk");
        capabilities.setCapability("appPackage", "com.ionicframework");
        capabilities.setCapability("appActivity", "");
        driver = new AndroidDriver(new URL(""), capabilities);


public class Logintest extends AndroidSetup {
    public void setUp() throws Exception {
    public void tearDown() throws Exception {

    public void login() {
        new Login(driver).invalidLogin();


public class Login extends BasePage {

    public Login(WebDriver driver) {

    public Login invalidLogin() {
        return new Login(driver);


Mar 21, 2017 2:02:10 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Mar 21, 2017 2:02:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Falling back to original OSS JSON Wire Protocol.
Mar 21, 2017 2:02:52 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Falling back to straight W3C remote end connection
    org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{app=/home/naveen/IdeaProjects/QberLoginPage/app/Qber_Customer_V1.6.0.apk, appPackage=com.ionicframework.qber653346, appActivity=Main Activity, appium-version=1.6.3, platformVersion=6.0, platformName=Android, deviceName=Mi Phone}], required capabilities = Capabilities [{}]
    Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
    System info: host: 'naveen-Inspiron-3542', ip: '', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-66-generic', java.version: '1.8.0_121'
    Driver info: driver.version: AndroidDriver
  • After fail 1000 times and 3 weeks of time finally I made it, it is all happen run jenkins and appium server in local machine. Thanks a ton
    – Ganesh Ram
    Commented Aug 20, 2017 at 20:13
  • hello guys I am facing the same kind of issue , I am unable to create the session with my real device my Appium server starts but after some time it freezes and it throws an exception org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c "java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\sign.jar" C:\Software\selendroid-test-app-0.17.0.apk --override" java.util.zip.ZipException: zip file is empty Environment 1) eclipse 2) appium 3) window 7 4) seleni Commented Mar 2, 2018 at 7:31
  • I am also facing the same issue org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'farms.io.farmsiofo' application. Visit github.com/appium/appium/blob/master/docs/en/… for troubleshooting. Original error: 'farms.io.activity.StartActivity' or 'farms.io.farmsiofo.farms.io.activity.StartActivity' never started. Visit github.com/appium
    – arun kumar
    Commented Sep 23, 2021 at 8:19

1 Answer 1


Seems like session between client and server is failing to get initiated. I noticed that URL you use for Appium server is "". This could be an issue, since as I understood you are running Appium on the same machine where your client scripts reside, try using "http://localhost:4723/wd/hub" instead. Or use your local host ip address "".

In general make sure that your Appium server is started and running. You can do this by visiting URL in browser localhost:4723/wd/hub/status. You will be able to connect to URL and see something like this:{"status":0,"value":{"build":{"version":"1.5.3","revision":null}},"sessionId":null}

PS. It strange though if you are able to initiate session with the same settings for KitKat devices. I would expect it to fail for all devices since it couldn't pass desired capabilities to server to initiate automation session.

  • THis question is resolved because appActivity name there is a space between the words.
    – user24314
    Commented Mar 21, 2017 at 11:54