When I launching apk from my emulator and run in eclipse, the error is shown below:
Appium java code
public class TestBase {
/*
* public static AndroidDriver capabilities() throws MalformedURLException
*/
public static AndroidDriver<AndroidElement> capabilities() throws MalformedURLException
{
File fs = new File("src");
File f1 = new File(fs,"com.bsb.hike.apk");
DesiredCapabilities cp = new DesiredCapabilities();
cp.setCapability(MobileCapabilityType.AUTOMATION_NAME,"UiAutomator2");
cp.setCapability(MobileCapabilityType.DEVICE_NAME,"EmulatorPie");
cp.setCapability(MobileCapabilityType.APP,f1.getAbsolutePath());
AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),cp);
return driver;
}
}
homepage
public class HomePage extends TestBase{
public static void main(String[] args) throws MalformedURLException {
// TODO Auto-generated method stub
AndroidDriver<AndroidElement> driver = TestBase.capabilities();
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
driver.findElementByXPath("//android.widget.TextView[@text='Preference']").click();
driver.findElementByXPath("//android.widget.TextView[@text='3. Preference dependencies']").click();
driver.findElementById("android:id/checkbox").click();
driver.findElementByXPath("(//android.widget.RelativeLayout)[2]").click();
driver.findElementByClassName("android.widget.EditText").sendKeys("Hello");
driver.findElementsByClassName("android.widget.Button").get(1).click();
}
}
Error
Appium logs error:
Microsoft Windows [Version 6.1.7601]
Copyright © 2009 Microsoft Corporation. All rights reserved.
C:\Users\hp>appium
[Appium] Welcome to Appium v1.16.0
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“app”:“D:\selinium\Framework\AppiumFramework2
\src\com.bsb.hike.apk”,“automationName”:“UiAutomator2”,“platformName”:“Android”
,“deviceName”:“EmulatorPie”},“capabilities”:{“firstMatch”:[{“appium:app”:“D:\se
linium\Framework\AppiumFramework2\src\com.bsb.hike.apk”,“appium:automationNa
me”:“UiAutomator2”,“appium:deviceName”:“EmulatorPie”,“platformName”:“android”}]}
}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{“app”:“D:\selin
ium\Framework\AppiumFramework2\src\com.bsb.hike.apk”,“automationName”:“UiAut
omator2”,“platformName”:“Android”,“deviceName”:“EmulatorPie”},null,{“firstMatch”
:[{“appium:app”:“D:\selinium\Framework\AppiumFramework2\src\com.bsb.hike.ap
k”,“appium:automationName”:“UiAutomator2”,“appium:deviceName”:“EmulatorPie”,“pla
tformName”:“android”}]}]
[debug] [BaseDriver] Event ‘newSessionRequested’ logged at 1580317952799 (22:42:
32 GMT+0530 (India Standard Time))
[Appium] Appium v1.16.0 creating new AndroidUiautomator2Driver (v1.40.0) session
[debug] [BaseDriver] W3C capabilities and MJSONWP desired capabilities were prov
ided
[debug] [BaseDriver] Creating session with W3C capabilities: {
[debug] [BaseDriver] “alwaysMatch”: {
[debug] [BaseDriver] “platformName”: “android”,
[debug] [BaseDriver] “appium:app”: “D:\selinium\Framework\AppiumFramework
2\src\com.bsb.hike.apk”,
[debug] [BaseDriver] “appium:automationName”: “UiAutomator2”,
[debug] [BaseDriver] “appium:deviceName”: “EmulatorPie”
[debug] [BaseDriver] },
[debug] [BaseDriver] “firstMatch”: [
[debug] [BaseDriver] {}
[debug] [BaseDriver] ]
[debug] [BaseDriver] }
[BaseDriver] Session created with session id: 9332c37d-6f18-4d57-bb88-e221283d9c
62
[BaseDriver] Using local app ‘D:\selinium\Framework\AppiumFramework2\src\com.bsb
.hike.apk’
[debug] [UiAutomator2] Checking whether app is actually present
[ADB] Found 1 ‘build-tools’ folders under 'C:\Users\hp\AppData\Local\Android\Sdk
’ (newest first):
[ADB] C:/Users/hp/AppData/Local/Android/Sdk/build-tools/29.0.2
[ADB] Using ‘adb.exe’ from ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools
\adb.exe’
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices…
[debug] [ADB] Connected devices: [{“udid”:“emulator-5554”,“state”:“device”}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using ‘adb.exe’ from ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools
\adb.exe’
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk’
[debug] [ADB] Current device property ‘ro.build.version.sdk’: 28
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell getprop ro.build.version.release’
[debug] [ADB] Current device property ‘ro.build.version.release’: 9
[debug] [ADB] Device API level: 28
[UiAutomator2] Relaxing hidden api policy
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_pre_p_a
pps 1’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy_p_apps
1’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell settings put global hidden_api_policy 1’
[debug] [AndroidDriver] Parsing package and activity from app manifest
[ADB] Package name: ‘com.bsb.hike’
[ADB] Main activity name: ‘com.bsb.hike.ui.HomeActivity’
[debug] [AndroidDriver] Parsed package and activity are: com.bsb.hike/com.bsb.hi
ke.ui.HomeActivity
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 wait-for-device’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
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\hp\AppData\Local\Android\Sdk\platform-tools\adb.
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\hp\AppData\Local\Android\Sdk\platform-tools\adb.
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.15.0’ >= ‘2.15.0’)
[debug] [ADB] There is no need to install/upgrade ‘C:\Users\hp\AppData\Roaming\n
pm\node_modules\appium\node_modules\io.appium.settings\apks\settings_apk-debug.a
pk’
[debug] [ADB] Getting IDs of all ‘io.appium.settings’ processes
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell ‘pgrep --help; echo $?’’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell pgrep -f io\.appium\.settings’
[debug] [AndroidDriver] io.appium.settings is already running. There is no need
to reset its permissions.
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell appops set io.appium.settings android:mock_l
ocation allow’
[debug] [Logcat] Starting logcat capture
[debug] [UiAutomator2] Forwarding UiAutomator2 Server port 6790 to 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790’
[debug] [ADB] Getting install status for io.appium.uiautomator2.server
[debug] [ADB] Running 'C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server
’
[debug] [ADB] ‘io.appium.uiautomator2.server’ is installed
[debug] [ADB] Getting package info for ‘io.appium.uiautomator2.server’
[debug] [ADB] Running 'C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server
’
[debug] [ADB] The version name of the installed ‘io.appium.uiautomator2.server’
is greater or equal to the application version name (‘4.5.2’ >= ‘4.5.2’)
[debug] [UiAutomator2] io.appium.uiautomator2.server installation state: sameVer
sionInstalled
[debug] [ADB] Checking app cert for C:\Users\hp\AppData\Roaming\npm\node_modules
\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-
v4.5.2.apk
[ADB] Using ‘apksigner.bat’ from ‘C:\Users\hp\AppData\Local\Android\Sdk\build-to
ols\29.0.2\apksigner.bat’
[debug] [ADB] Starting ‘C:\Users\hp\AppData\Local\Android\Sdk\build-tools\29.0.2
\apksigner.bat’ with args ‘[“verify”,"–print-certs",“C:\Users\hp\AppData\Ro
aming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks
\appium-uiautomator2-server-v4.5.2.apk”]’
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@a
ndroid.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C
=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c
454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b
0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] ‘C:\Users\hp\AppData\Roaming\npm\node_modules\appium\node_modules
appium-uiautomator2-server\apks\appium-uiautomator2-server-v4.5.2.apk’ is alread
y signed.
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server
.test’
[debug] [ADB] ‘io.appium.uiautomator2.server.test’ is installed
[debug] [ADB] Checking app cert for C:\Users\hp\AppData\Roaming\npm\node_modules
\appium\node_modules\appium-uiautomator2-server\apks\appium-uiautomator2-server-
debug-androidTest.apk
[debug] [ADB] Starting ‘C:\Users\hp\AppData\Local\Android\Sdk\build-tools\29.0.2
\apksigner.bat’ with args ‘[“verify”,"–print-certs",“C:\Users\hp\AppData\Ro
aming\npm\node_modules\appium\node_modules\appium-uiautomator2-server\apks
\appium-uiautomator2-server-debug-androidTest.apk”]’
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@a
ndroid.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C
=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c
454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b
0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] 'C:\Users\hp\AppData\Roaming\npm\node_modules\appium\node_modules
appium-uiautomator2-server\apks\appium-uiautomator2-server-debug-androidTest.apk
’ is already signed.
[UiAutomator2] Server packages are not going to be (re)installed
[debug] [UiAutomator2] Waiting up to 30000ms for services to be available
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell pm list instrumentation’
[debug] [UiAutomator2] Instrumentation target ‘io.appium.uiautomator2.server.tes
t/androidx.test.runner.AndroidJUnitRunner’ is available
[debug] [ADB] Checking app cert for D:\selinium\Framework\AppiumFramework2\src\c
om.bsb.hike.apk
[debug] [ADB] Starting ‘C:\Users\hp\AppData\Local\Android\Sdk\build-tools\29.0.2
\apksigner.bat’ with args ‘[“verify”,"–print-certs",“D:\selinium\Framework\A
ppiumFramework2\src\com.bsb.hike.apk”]’
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@a
ndroid.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C
=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c
454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b
0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB]
[debug] [ADB] ‘D:\selinium\Framework\AppiumFramework2\src\com.bsb.hike.apk’ is a
lready signed.
[debug] [ADB] Getting install status for com.bsb.hike
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell dumpsys package com.bsb.hike’
[debug] [ADB] ‘com.bsb.hike’ is not installed
[debug] [ADB] App ‘D:\selinium\Framework\AppiumFramework2\src\com.bsb.hike.apk’
is not installed
[debug] [ADB] Installing ‘D:\selinium\Framework\AppiumFramework2\src\com.bsb.hik
e.apk’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell ‘ls -t -1 /data/local/tmp/appium_cache 2>&1 |
| echo ERROR’’
[debug] [ADB] The count of applications in the cache: 9
[ADB] The application at ‘D:\selinium\Framework\AppiumFramework2\src\com.bsb.hik
e.apk’ is already cached to ‘/data/local/tmp/appium_cache/6986a672143596948fc701
fc540111d8a8975a5e.apk’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appium_cache/6986a
672143596948fc701fc540111d8a8975a5e.apk’
[debug] [UiAutomator2] Deleting UiAutomator2 session
[debug] [UiAutomator2] Deleting UiAutomator2 server session
[debug] [WD Proxy] Matched ‘/’ to command name ‘deleteSession’
[UiAutomator2] Did not get confirmation UiAutomator2 deleteSession worked; Error
was: UnknownError: An unknown server-side error occurred while processing the c
ommand. Original error: Trying to proxy a session command without session id
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell am force-stop com.bsb.hike’
[debug] [Logcat] Stopping logcat capture
[debug] [ADB] Removing forwarded port socket connection: 8200
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 forward --remove tcp:8200’
[UiAutomator2] Restoring hidden api policy to the device default configuration
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_pre_
p_apps’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy_p_ap
ps’
[debug] [ADB] Running ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.
exe -P 5037 -s emulator-5554 shell settings delete global hidden_api_policy’
[debug] [BaseDriver] Event ‘newSessionStarted’ logged at 1580317962863 (22:42:42
GMT+0530 (India Standard Time))
[debug] [W3C] Encountered internal error running command: Error executing adbExe
c. Original error: ‘Command ‘C:\Users\hp\AppData\Local\Android\Sdk\platfo
rm-tools\adb.exe -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appi
um_cache/6986a672143596948fc701fc540111d8a8975a5e.apk’ exited with code 1’; Stde
rr: ‘’; Code: ‘1’
[debug] [W3C] Error: Command ‘C:\Users\hp\AppData\Local\Android\Sdk\platf
orm-tools\adb.exe -P 5037 -s emulator-5554 shell pm install /data/local/tmp/app
ium_cache/6986a672143596948fc701fc540111d8a8975a5e.apk’ exited with code 1
[debug] [W3C] at ChildProcess. (C:\Users\hp\AppData\Roaming\npm\n
ode_modules\appium\node_modules\teen_process\lib\exec.js:113:19)
[debug] [W3C] at ChildProcess.emit (events.js:209:13)
[debug] [W3C] at maybeClose (internal/child_process.js:1021:16)
[debug] [W3C] at Process.ChildProcess._handle.onexit (internal/child_process
.js:283:5)
[HTTP] <-- POST /wd/hub/session 500 10150 ms - 1145
[HTTP]
Eclipse logs
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: Error executing adbExec. Original error: ‘Command ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appium_cache/6986a672143596948fc701fc540111d8a8975a5e.apk’ exited with code 1’; Stderr: ‘’; Code: ‘1’
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘HP-PC’, ip: ‘192.168.40.1’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_131’
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appium_cache/6986a672143596948fc701fc540111d8a8975a5e.apk’ exited with code 1’; Stderr: ‘’; Code: ‘1’
at getResponseForW3CError (C:\Users\hp\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\Users\hp\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:388:37)
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘HP-PC’, ip: ‘192.168.40.1’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_131’
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:41)
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 io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:88)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:98)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:94)
at com.appium.qa.Base.TestBase.capabilities(TestBase.java:30)
at com.appium.qa.Pages.HomePage.main(HomePage.java:15)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
… 15 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appium_cache/6986a672143596948fc701fc540111d8a8975a5e.apk’ exited with code 1’; Stderr: ‘’; Code: ‘1’
Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
System info: host: ‘HP-PC’, ip: ‘192.168.40.1’, os.name: ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_131’
Driver info: driver.version: AndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: ‘Command ‘C:\Users\hp\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s emulator-5554 shell pm install /data/local/tmp/appium_cache/6986a672143596948fc701fc540111d8a8975a5e.apk’ exited with code 1’; Stderr: ‘’; Code: ‘1’
at getResponseForW3CError (C:\Users\hp\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\Users\hp\AppData\Roaming\npm\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:388:37)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
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(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
… 20 more