I am trying to launch an application using appium, I am seeing the following error while executing
org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: spawn OK) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 14.73 seconds
Here are my code and detailed error
import static org.junit.Assert.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.remote.MobileCapabilityType;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class FirstCase {
WebDriver driver;
@Test
public void test() throws MalformedURLException {
//Set up desired capabilities
DesiredCapabilities caps = new DesiredCapabilities();
//File app=new File("D:\Apps\EriBank\eribank.apk");
//caps.setCapability(MobileCapabilityType.APP,app);
caps.setCapability(MobileCapabilityType.PLATFORM_VERSION, "4.4.2");
caps.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
caps.setCapability(MobileCapabilityType.DEVICE_NAME, "3208645b4d6f614d");
//caps.setCapability("avd","Name of the AVD to launch");
caps.setCapability(MobileCapabilityType.APP_PACKAGE, "com.experitest.ExperiBank");
caps.setCapability(MobileCapabilityType.APP_ACTIVITY, "com.experitest.ExperiBank.LoginActivity");
caps.setCapability(MobileCapabilityType.BROWSER_NAME, "");// In case of web apps
driver = new AndroidDriver (new URL("http://127.0.0.1:4723/wd/hub"), caps);
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
//fail("Not yet implemented");
}
}
Error Detail
at Process.ChildProcess._handle.onexit (child_process.js:779:34)
info: [debug] Responding to client with error: {āstatusā:33,āvalueā:{āmessageā:āA new session could not be created. (Original error: spawn OK)ā,ācodeā:āOKā,āerrnoā:āOKā,āsyscallā:āspawnā,āorigValueā:āspawn OKā},āsessionIdā:null}
info: ā POST /wd/hub/session 500 14472.118 ms - 181
Please help me to resolve this.