Appium-desktop: 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: The desired capabilities must include either an app, appPackage or browserName

Created on 17 Apr 2019  路  18Comments  路  Source: appium/appium-desktop

Appium or Appium Desktop?

You are reporting an issue at the Appium Desktop repository. Appium Desktop is a wrapper around Appium. If you are having trouble running tests, it is much more likely that the problem you are encountering is not a problem with Appium Desktop but with Appium. For that reason we require you to have tried your testcase with Appium CLI before reporting issues. Check the checkbox below to confirm that you have proven your issue does _not_ reproduce on Appium itself:

  • [ ] I have verified that my issue does not occur with Appium and should be investigated as an Appium Desktop issue

I am facing this error: 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: The desired capabilities must include either an app, appPackage or browserName.

_

My code looks simply like this:
public class Appi2 {

public static void main(String[] args) throws SQLException, ClassNotFoundException, MalformedURLException{
    // TODO Auto-generated method stub

    File f = new File("src");

    DesiredCapabilities cap = new DesiredCapabilities();
    cap.setCapability(MobileCapabilityType.PLATFORM_NAME, MobilePlatform.ANDROID);
            cap.setCapability(MobileCapabilityType.DEVICE_NAME, "SamsungSM-G930F");
            cap.setCapability (MobileCapabilityType.PLATFORM_VERSION, "8");
    cap.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT ,"25");
    AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http:127.0.0.1:4723/wd/hub"), cap); 

    cap.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "net.one97.paytm");
    cap.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "net.one97.paytm.oauth.activity.OAuthMainActivity");

I have tried using the Package and Activity names as fetched from adb shell command:

dumpsys window windows | grep -E 'mcurrentFocus |mFocusedApp'
(net.one97.paytm/.oauth.activity.OAuthMainActivity )
-I have tried by appending a Package name with Activity name too but that still doesn't work.
-what I am getting from the error is that the App package is not getting read by the client.

Logs look like this in Eclipse and no such logs are appearing in Appium-CLI.
>
Exception in thread "main" 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: The desired capabilities must include either an app, appPackage or browserName
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'VX-LT65', ip: '192.168.7.102', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: The desired capabilities must include either an app, appPackage or browserName
at getResponseForW3CError (C:\Users\waqas.ahmed\AppData\Roamingnpm\node_modulesappium\node_modulesappium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\waqas.ahmed\AppData\Roamingnpm\node_modulesappium\node_modulesappium-base-driver\lib\protocol\protocol.js:447:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'VX-LT65', ip: '192.168.7.102', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:94)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:95)
at Appi2.main(Appi2.java:26)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
... 13 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: The desired capabilities must include either an app, appPackage or browserName
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'VX-LT65', ip: '192.168.7.102', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: The desired capabilities must include either an app, appPackage or browserName
at getResponseForW3CError (C:\Users\waqas.ahmed\AppData\Roamingnpm\node_modulesappium\node_modulesappium-base-driver\lib\protocol\errors.js:826:9)
at asyncHandler (C:\Users\waqas.ahmed\AppData\Roamingnpm\node_modulesappium\node_modulesappium-base-driver\lib\protocol\protocol.js:447:37)
at process._tickCallback (internal/process/next_tick.js:68:7)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
... 18 more

<
Please help in resolving this. thanks.

Environment

  • I am running Appium CLI version _<1.11.1>_.
  • I am on (pick one):

    • [ ] Windows

Most helpful comment

uninstall appium settings on your phone before running your application

All 18 comments

Hi, I am having the same issue

uninstall appium settings on your phone before running your application

uninstall appium settings on your phone before running your application

This works for me. Thank you!

I Uninstalled Appium settings but still getting the same error.

Exception in thread "main" 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 'io.appium.android.apis' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: 'io.appium.android.apis.ApiDemos' or 'io.appium.android.apis.io.appium.android.apis.ApiDemos' never started. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'RHP-PPMELKKRLT', ip: '192.168.83.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '12.0.1'
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'io.appium.android.apis' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: 'io.appium.android.apis.ApiDemos' or 'io.appium.android.apis.io.appium.android.apis.ApiDemos' never started. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting
at getResponseForW3CError

What about providing appActivitym, appPackage, appWaitActivity and appWaitPackage as the error message pointed?

This is my code with appPackage and appActivity, I still receive the same error

public class SetUp {

static DesiredCapabilities dcap= new DesiredCapabilities();


public static void main(String[] args) throws MalformedURLException
{
    File rootPath = new File(System.getProperty("user.dir"));
    File src = new File(rootPath,"/app/");
    File appPath = new File(src,"ApiDemos-debug.apk");
    dcap.setCapability(MobileCapabilityType.DEVICE_NAME, "emulator-5554");
    //dcap.setCapability(MobileCapabilityType.APPIUM_VERSION, 10);
    dcap.setCapability(MobileCapabilityType.APP,appPath.getAbsolutePath());
    dcap.setCapability(AndroidMobileCapabilityType.APP_WAIT_ACTIVITY, "your.package.name.*");
    dcap.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "com.touchboarder.android.api.demos");
    dcap.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "com.touchboarder.androidapidemos.MainActivity");

    AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),dcap);
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

My code
File rootPath = new File(System.getProperty("user.dir"));
File src = new File(rootPath,"/app/");
File appPath = new File(src,"myer.com.android_2019-06-12.apk");
dcap.setCapability(MobileCapabilityType.DEVICE_NAME, "emulator-5554");
dcap.setCapability(MobileCapabilityType.APP,appPath.getAbsolutePath());
dcap.setCapability("autoGrantPermissions",true);
dcap.setCapability("appWaitActivity", ".DispatchActivity");
dcap.setCapability("appWaitActivity", ".activities.SubActivity");
AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),dcap);
dcap.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, "myer.com.android");
dcap.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, "myer.com.android.ui.activity.LaunchActivity");
dcap.setCapability(AndroidMobileCapabilityType.APP_WAIT_ACTIVITY, "myer.com.android.ui.activity.LaunchActivity");
dcap.setCapability(AndroidMobileCapabilityType.APP_WAIT_PACKAGE, "myer.com.android");
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.findElementByXPath("//*[@text='JOIN TODAY']").click();

This is the error i get in Appium
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"app":"C:\Users\Tester\eclipse-workspace\Appium\E2E-MobileAutomation\app\myer.com.android_2019-06-12.apk","appWaitActivity":".activities.SubActivity","autoGrantPermissions":true,"platformName":"Android","deviceName":"emulator-5554"},null,{"firstMatch":[{"appium:app":"C:\Users\Tester\eclipse-workspace\Appium\E2E-MobileAutomation\app\myer.com.android_2019-06-12.apk","appium:appWaitActivity":".activities.SubActivity","appium:autoGrantPermissions":true,"appium:deviceName":"emulator-5554","platformName":"android"}]}]
[debug] [BaseDriver] Event 'newSessionRequested' logged at 1582380222477 (01:03:42 GMT+1100 (Australian Eastern Daylight Time))
[Appium] Creating new AndroidDriver (v1.40.1) session
[Appium] Capabilities:
[Appium] app: 'C:\Users\Tester\eclipse-workspace\Appium\E2E-MobileAutomation\app\myer.com.android_2019-06-12.apk'
[Appium] appWaitActivity: '.activities.SubActivity'
[Appium] autoGrantPermissions: true
[Appium] platformName: 'Android'
[Appium] deviceName: 'emulator-5554'
[debug] [BaseDriver] W3C capabilities [] and MJSONWP desired capabilities were provided
[BaseDriver] Falling back to MJSONWP desired capabilities
[BaseDriver] Session created with session id: a3d8773d-0bb8-471b-bfc5-2d9df54eeffa
[debug] [AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_231
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices...
[debug] [ADB] 1 device(s) connected
[AndroidDriver] Using device: emulator-5554
[debug] [ADB] Setting device id to emulator-5554
[BaseDriver] Using local app 'C:\Users\Tester\eclipse-workspace\Appium\E2E-MobileAutomationapp\myer.com.android_2019-06-12.apk'
[debug] [AndroidDriver] Checking whether app is actually present
[AndroidDriver] Starting Android session
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting install status for io.appium.settings
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] 'io.appium.settings' is installed
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('2.16.2' >= '2.16.2')
[debug] [ADB] There is no need to install/upgrade 'C:\Users\Tester\AppData\Roamingnpm\node_modulesappium\node_modules\io.appium.settingsapks\settings_apk-debug.apk'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell ps'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 29
[debug] [ADB] Device API level: 29
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android\:mock_location allow'
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: 'null' and country: 'null'
[debug] [Logcat] Starting logcat capture
[debug] [AndroidDriver] Pushing unlock helper app to device...
[debug] [ADB] Getting install status for io.appium.unlock
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.unlock'
[debug] [ADB] 'io.appium.unlock' is installed
[debug] [ADB] Getting package info for 'io.appium.unlock'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.unlock'
[debug] [ADB] The version name of the installed 'io.appium.unlock' is greater or equal to the application version name ('2.0.0' >= '2.0.0')
[debug] [ADB] There is no need to install/upgrade 'C:\Users\Tester\AppData\Roamingnpm\node_modulesappium\node_modulesappium-unlockbin\unlock_apk-debug.apk'
[ADB] Getting device platform version
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 10
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell wm size'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell getprop ro.product.model'
[debug] [ADB] Current device property 'ro.product.model': Android SDK built for x86
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell getprop ro.product.manufacturer'
[debug] [ADB] Current device property 'ro.product.manufacturer': Google
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Using the alternative activity name detection method because of: Could not find apkanalyzer.bat in C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsapkanalyzer.bat,C:\Users\Tester\AppData\Local\Android\Sdk\emulatorapkanalyzer.bat,C:\Users\Tester\AppData\Local\Android\Sdk\toolsapkanalyzer.bat,C:\Users\Tester\AppData\Local\Android\Sdk\toolsbinapkanalyzer.bat,C:\Users\Tester\AppData\Local\Android\Sdkbuild-tools\30.0.0-rc1apkanalyzer.bat,C:\Users\Tester\AppData\Local\Android\Sdkbuild-tools\29.0.2apkanalyzer.bat. Do you have the Android SDK installed at 'C:\Users\Tester\AppData\Local\Android\Sdk'?
[ADB] Extracting package and launch activity from manifest
[ADB] Package name: 'myer.com.android'
[ADB] Main activity name: 'myer.com.android.ui.activity.LaunchActivity'
[debug] [AndroidDriver] Parsed package and activity are: myer.com.android/myer.com.android.ui.activity.LaunchActivity
[debug] [ADB] Getting install status for myer.com.android
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package myer.com.android'
[debug] [ADB] 'myer.com.android' is installed
[debug] [ADB] Getting package info for 'myer.com.android'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package myer.com.android'
[debug] [ADB] The version name of the installed 'myer.com.android' is equal to application version name (40237 === 40237)
[debug] [ADB] There is no need to install/upgrade 'C:\Users\Tester\eclipse-workspace\Appium\E2E-MobileAutomationapp\myer.com.android_2019-06-12.apk'
[AndroidDriver] Performing fast reset on 'myer.com.android'
[debug] [ADB] Getting install status for myer.com.android
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package myer.com.android'
[debug] [ADB] 'myer.com.android' is installed
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell am force-stop myer.com.android'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell pm clear myer.com.android'
[debug] [ADB] Device API level: 29
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys package myer.com.android'
[debug] [ADB] Retrieving requested permissions
[debug] [ADB] Retrieved 14 permission(s) from ["requested"] group(s)
[debug] [ADB] Retrieving granted permissions
[debug] [ADB] Retrieved 4 permission(s) from ["install","runtime"] group(s)
[debug] [ADB] Granting permissions ["android.permission.ACCESS_COARSE_LOCATION","android.permission.CAMERA","android.permission.ACCESS_BACKGROUND_LOCATION","android.permission.ACCESS_COARSE_LOCATION","android.permission.CAMERA","android.permission.ACCESS_BACKGROUND_LOCATION"] to 'myer.com.android'
[debug] [ADB] Got the following command chunks to execute: [["pm","grant","myer.com.android","android.permission.ACCESS_COARSE_LOCATION",";","pm","grant","myer.com.android","android.permission.CAMERA",";","pm","grant","myer.com.android","android.permission.ACCESS_BACKGROUND_LOCATION",";","pm","grant","myer.com.android","android.permission.ACCESS_COARSE_LOCATION",";","pm","grant","myer.com.android","android.permission.CAMERA",";","pm","grant","myer.com.android","android.permission.ACCESS_BACKGROUND_LOCATION",";"]]
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell pm grant myer.com.android android.permission.ACCESS_COARSE_LOCATION \; pm grant myer.com.android android.permission.CAMERA \; pm grant myer.com.android android.permission.ACCESS_BACKGROUND_LOCATION \; pm grant myer.com.android android.permission.ACCESS_COARSE_LOCATION \; pm grant myer.com.android android.permission.CAMERA \; pm grant myer.com.android android.permission.ACCESS_BACKGROUND_LOCATION \;'
[debug] [AndroidDriver] Performed fast reset on the installed 'myer.com.android' application (stop and clear)
[debug] [AndroidDriver] Extracting strings from apk
[debug] [AndroidDriver] C:\Users\Tester\eclipse-workspace\Appium\E2E-MobileAutomationapp\myer.com.android_2019-06-12.apk
[debug] [AndroidDriver] null
[debug] [AndroidDriver] C:\Users\KAVITH~1\AppData\Local\Temp\myer.com.android
[debug] [ADB] Extracting strings from for language: default
[ADB] Successfully extracted 528 strings from 'C:\Users\Tester\eclipse-workspace\Appium\E2E-MobileAutomationapp\myer.com.android_2019-06-12.apk' resources for '(default)' configuration
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 push C:\Users\KAVITH~1\AppData\Local\Temp\myer.com.android\strings.json /data/local/tmp'
[debug] [AndroidBootstrap] Watching for bootstrap disconnect
[debug] [ADB] Forwarding system: 4724 to device: 4724
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 forward tcp\:4724 tcp\:4724'
[debug] [UiAutomator] Starting UiAutomator
[debug] [UiAutomator] Moving to state 'starting'
[debug] [UiAutomator] Parsing uiautomator jar
[debug] [UiAutomator] Found jar name: 'AppiumBootstrap.jar'
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 push C:\Users\Tester\AppData\Roaming\npm\node_modules\appium\node_modules\appium-android-bootstrap\bootstrap\bin\AppiumBootstrap.jar /data/local/tmp/'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell ps'
[ADB] No 'uiautomator' process has been found
[debug] [UiAutomator] Starting UIAutomator
[debug] [ADB] Creating ADB subprocess with args: ["-P",5037,"-s","emulator-5554","shell","uiautomator","runtest","AppiumBootstrap.jar","-c","io.appium.android.bootstrap.Bootstrap","-e","pkg","myer.com.android","-e","disableAndroidWatchers",false,"-e","acceptSslCerts",false]
[debug] [UiAutomator] Moving to state 'online'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Loading json...
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] json loading complete.
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] Android bootstrap socket is now connected
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[debug] [ADB] Device API level: 29
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell am start -W -n myer.com.android/myer.com.android.ui.activity.LaunchActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000'
[debug] [ADB] Waiting up to 20000ms for activity matching pkg: 'myer.com.android' and activity: '.activities.SubActivity' to be focused
[debug] [ADB] Possible activities, to be checked: 'myer.com.android.activities.SubActivity'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [ADB] Getting focused package and activity
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell dumpsys window windows'
[debug] [AndroidDriver] Shutting down Android driver
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell am force-stop myer.com.android'
[debug] [ADB] Pressing the HOME button
[debug] [ADB] Running 'C:\Users\Tester\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell input keyevent 3'
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"shutdown"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [UiAutomator] Shutting down UiAutomator
[debug] [UiAutomator] Moving to state 'stopping'
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: 0
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Test results for WatcherResultPrinter=.
[debug] [AndroidBootstrap] [UIAUTO STDOUT] Time: 28.985
[debug] [AndroidBootstrap] [UIAUTO STDOUT] OK (1 test)
[debug] [AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS_CODE: -1
[debug] [UiAutomator] UiAutomator shut down normally
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [ADB] Attempting to kill all uiautomator processes
[debug] [ADB] Getting all processes with uiautomator
[debug] [ADB] Running 'C:\Users\testr\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell ps'
[ADB] No 'uiautomator' process has been found
[debug] [UiAutomator] Moving to state 'stopped'
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Running 'C:\Users\test\AppData\Local\Android\Sdk\platform-toolsadb.exe -P 5037 -s emulator-5554 shell am force-stop io.appium.unlock'
[debug] [AndroidDriver] Not cleaning generated files. Add clearSystemFiles capability if wanted.
[W3C] Encountered internal error running command: Error: Cannot start the 'myer.com.android' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Could not get focusPackageAndActivity. Original error: Could not parse activity from dumpsys
[W3C] at ADB.apkUtilsMethods.startApp (../../../lib/tools/apk-utils.js:144:11)
[HTTP] <-- POST /wd/hub/session 500 36990 ms - 1

I was getting same and i was tried unistall Appium and again tried but error was same as "unable to create session"

I was getting same and i was tried unistall Appium and again tried but error was same as "unable to create session"

Please suggest any one please

import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import io.appium.java_client.remote.MobileCapabilityType;

public class base2 {

public static void main(String[] args) throws MalformedURLException {
    // TODO Auto-generated method stub

    File f=new File("src");
    File fs=new File(f,"original.apk");

    DesiredCapabilities cap= new DesiredCapabilities();
    cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Rahul");
    cap.setCapability(MobileCapabilityType.APP, fs.getAbsolutePath());

    AndroidDriver<AndroidElement> driver=new AndroidDriver<>(new URL("http://127.0.0.1:4723/wd/hub"),cap);

}

}

Hello there,
I have got an issue and need some helps from you team. im new to Appium. trying to learn more on this. please analyze it and give the solution. Thanks.

java.lang.reflect.InvocationTargetException
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 verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulator\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\cmdline-tools\latest\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\apksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-ADUL33K', ip: '192.168.43.215', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_271'
Driver info: driver.version: AppiumDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulator\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\cmdline-tools\latest\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\apksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
at getResponseForW3CError (F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-base-driver\lib\protocol\protocol.js:384:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-ADUL33K', ip: '192.168.43.215', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_271'
Driver info: driver.version: AppiumDriver
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 verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulator\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\cmdline-tools\latest\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\apksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-ADUL33K', ip: '192.168.43.215', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_271'
Driver info: driver.version: AppiumDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulator\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\cmdline-tools\latest\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\apksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
at getResponseForW3CError (F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-base-driver\lib\protocol\protocol.js:384:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-ADUL33K', ip: '192.168.43.215', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_271'
Driver info: driver.version: AppiumDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:94)
at Appiumtest.AppiumBynge.openBynge(AppiumBynge.java:46)
at Appiumtest.AppiumBynge.main(AppiumBynge.java:21)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
... 12 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulator\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\cmdline-tools\latest\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\apksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-ADUL33K', ip: '192.168.43.215', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_271'
Driver info: driver.version: AppiumDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulator\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\cmdline-tools\latest\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\tools\bin\apksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\apksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
at getResponseForW3CError (F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-base-driver\lib\protocol\protocol.js:384:37)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
... 17 more

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 verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-toolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulatorapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkcmdline-toolslatestbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\toolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\toolsbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkapksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-ADUL33K', ip: '192.168.43.215', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_271'

Probably your environment had no apksigner because of incorrect ANDROID_HOME or not enough android tool chains..

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 verify the signature of 'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-toolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulatorapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkcmdline-toolslatestbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\toolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\toolsbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkapksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DESKTOP-ADUL33K', ip: '192.168.43.215', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_271'

Probably your environment had no apksigner because of incorrect ANDROID_HOME or not enough android tool chains..

thanks @KazuCocoa.. will try to find and resolve..

Hi, @KazuCocoa , i have set the correct path as ANDROID_HOME.. still im getting the same exception while running. im learning newly in appium.. please help me with that.. Thanks

Please confirm where is apksigner.jar on your environment. Android toolchain should have the jar in tools (afaik), but it could be different. If your environment had another path, then please let us know.

'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-toolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulatorapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkcmdline-toolslatestbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\toolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\toolsbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkapksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?

Please confirm where is apksigner.jar on your environment. Android toolchain should have the jar in tools (afaik), but it could be different. If your environment had another path, then please let us know.

'F:\Automation\Appium\resourcesapp\node_modulesappium\node_modulesappium-uiautomator2-serverapksappium-uiautomator2-server-v4.15.0.apk'. Original error: Could not find 'apksigner.jar' in ["F:\Automation\Android-command-line-tools\Android-sdk\platform-toolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdk\emulatorapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkcmdline-toolslatestbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdktoolsapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdktoolsbinapksigner.jar","F:\Automation\Android-command-line-tools\Android-sdkapksigner.jar"]. Do you have Android Build Tools installed at 'F:\Automation\Android-command-line-tools\Android-sdk'?

Hi @KazuCocoa, i have tried today again extracted through command line below:
[sdkmanager "platform-tools" "platforms-android-23"].. i did path have assigned correctly in environment variables.
this time i have tried from "C:" drive. but again i got the same issue only. i could not find "apksigner.jar" file.

How about updating your Android toolchain?
The jar is an official tool => https://developer.android.com/studio/command-line/apksigner

How about updating your Android toolchain?
The jar is an official tool => https://developer.android.com/studio/command-line/apksigner

Actually i have not installed android studio.. im using real device and connected as well. so i have downloaded command line tools and i extracted by the command inputs through command prompt. My API level is 23. android version is 6.0.1.

available in revision 24.0.3 and higher of the Android SDK Build Tools

You should update your sdk build tools to newer one.

My API level is 23. android version is 6.0.1.

It seems you're saying the device under test, not building the package stuff specified in the manifest.
Newer build tools are generally compatible with them.

Was this page helpful?
0 / 5 - 0 ratings