Me too facing the issue . Could any one look help on this.
Appium Server:1.6.2
Appium v1.8.1
client: Java-Client-6.1.0
Selenium: 3.13.0
Attached Log
[Appium] Welcome to Appium v1.8.1
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {“desiredCapabilities”:{“appActivity”:“com.amazon.micron.GatewayActivity”,“appPackage”:“in.amazon.mShop.android.shopping”,“noReset”:“true”,“platformVersion”:“5.1”,“platformName”:“Android”,“udid”:“BH905RC60M”,“deviceName”:“Sony”},“capabilities”:{“alwaysMatch”:{“appium:appActivity”:“com.amazon.micron.GatewayActivity”,“appium:appPackage”:“in.amazon.mShop.android.shopping”,“appium:deviceName”:“Sony”,“appium:noReset”:“true”,“platformName”:“android”,“appium:platformVersion”:“5.1”,“appium:udid”:“BH905RC60M”},“firstMatch”:[{}]}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{“appActivity”:“com.amazon.micron.GatewayActivity”,“appPackage”:“in.amazon.mShop.android.shopping”,“noReset”:“true”,“platformVersion”:“5.1”,“platformName”:“Android”,“udid”:“BH905RC60M”,“deviceName”:“Sony”},null,{“alwaysMatch”:{“appium:appActivity”:“com.amazon.micron.GatewayActivity”,“appium:appPackage”:“in.amazon.mShop.android.shopping”,“appium:deviceName”:“Sony”,“appium:noReset”:“true”,“platformName”:“android”,“appium:platformVersion”:“5.1”,“appium:udid”:“BH905RC60M”},“firstMatch”:[{}]}]
[BaseDriver] Event ‘newSessionRequested’ logged at 1533449478876 (11:41:18 GMT+0530 (India Standard Time))
[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.
[Appium] Creating new AndroidDriver (v2.7.0) session
[Appium] Capabilities:
[Appium] platformName: android
[Appium] appActivity: com.amazon.micron.GatewayActivity
[Appium] appPackage: in.amazon.mShop.android.shopping
[Appium] deviceName: Sony
[Appium] noReset: true
[Appium] platformVersion: 5.1
[Appium] udid: BH905RC60M
[BaseDriver] W3C capabilities {“alwaysMatch”:{“platformNa… and MJSONWP desired capabilities [object Object] were provided
[BaseDriver] Creating session with W3C capabilities: {“alwaysMatch”:{“platformNa…
[BaseDriver] Boolean capability passed in as string. Functionality may be compromised.
[BaseDriver] Capability ‘noReset’ changed from string to boolean. This may cause unexpected behavior
[BaseDriver] Session created with session id: 4d13204c-0e3e-4093-bc27-7a4b9702afe4
[AndroidDriver] Getting Java version
[AndroidDriver] Java version is: 1.8.0_181
[ADB] Checking whether adb is present
[ADB] Found 1 ‘build-tools’ folders under ‘C:\Android’ (newest first):
[ADB] C:/Android/build-tools/28.0.1
[ADB] Using adb.exe from C:\Android\platform-tools\adb.exe
[AndroidDriver] Retrieving device list
[ADB] Trying to find a connected android device
[ADB] Getting connected devices…
[ADB] 1 device(s) connected
[AndroidDriver] Using device: BH905RC60M
[ADB] Setting device id to BH905RC60M
[AndroidDriver] App file was not listed, instead we’re going to run in.amazon.mShop.android.shopping directly on the device
[AndroidDriver] Checking whether package is present on the device
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell pm list packages in.amazon.mShop.android.shopping’
[AndroidDriver] Starting Android session
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M wait-for-device’
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell echo ping’
[AndroidDriver] Pushing settings apk to device…
[ADB] Getting install status for io.appium.settings
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell pm list packages io.appium.settings’
[ADB] App is installed
[ADB] Getting package info for ‘io.appium.settings’
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell dumpsys package io.appium.settings’
[ADB] Checking whether aapt is present
[ADB] Using aapt.exe from C:\Android\build-tools\28.0.1\aapt.exe
[ADB] The installed ‘io.appium.settings’ package does not require upgrade (‘2.3.0’ >= ‘2.3.0’)
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell ps’
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell getprop ro.build.version.sdk’
[ADB] Current device property ‘ro.build.version.sdk’: 22
[ADB] Device API level: 22
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell am start -W -n io.appium.settings/.Settings -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000’
[ADB] Device API level: 22
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell settings put secure mock_location 1’
[AndroidDriver] setDeviceLanguageCountry requires language or country.
[AndroidDriver] Got language: ‘undefined’ and country: ‘undefined’
[Logcat] Starting logcat capture
[AndroidDriver] Pushing unlock helper app to device…
[ADB] Getting install status for io.appium.unlock
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell pm list packages io.appium.unlock’
[ADB] App is installed
[ADB] Getting package info for ‘io.appium.unlock’
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell dumpsys package io.appium.unlock’
[ADB] The installed ‘io.appium.unlock’ package does not require upgrade (‘2.0.0’ >= ‘2.0.0’)
[ADB] Getting device platform version
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell getprop ro.build.version.release’
[ADB] Current device property ‘ro.build.version.release’: 5.1.1
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell wm size’
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell getprop ro.product.model’
[ADB] Current device property ‘ro.product.model’: C6903
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell getprop ro.product.manufacturer’
[ADB] Current device property ‘ro.product.manufacturer’: Sony
[AndroidDriver] No app sent in, not parsing package/activity
[AndroidDriver] No app capability. Assuming it is already on the device
[AndroidBootstrap] Watching for bootstrap disconnect
[ADB] Forwarding system: 4724 to device: 4724
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M forward tcp:4724 tcp:4724’
[UiAutomator] Starting UiAutomator
[UiAutomator] Moving to state ‘starting’
[UiAutomator] Parsing uiautomator jar
[UiAutomator] Found jar name: ‘AppiumBootstrap.jar’
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M push ‘C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-android-bootstrap\bootstrap\bin\AppiumBootstrap.jar’ /data/local/tmp/’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell ps’
[ADB] No uiautomator process found to kill, continuing…
[UiAutomator] Starting UIAutomator
[ADB] Creating ADB subprocess with args: [”-P”,5037,"-s",“BH905RC60M”,“shell”,“uiautomator”,“runtest”,“AppiumBootstrap.jar”,"-c",“io.appium.android.bootstrap.Bootstrap”,"-e",“pkg”,“in.amazon.mShop.android.shopping”,"-e",“disableAndroidWatchers”,false,"-e",“acceptSslCerts”,false]
[UiAutomator] Moving to state ‘online’
[AndroidBootstrap] Android bootstrap socket is now connected
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell dumpsys window’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Registered crash watchers.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Client connected
[AndroidDriver] Screen already unlocked, doing nothing
[ADB] Device API level: 22
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell am start -W -n in.amazon.mShop.android.shopping/com.amazon.micron.GatewayActivity -S’
[AndroidDriver] Shutting down Android driver
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell am force-stop in.amazon.mShop.android.shopping’
[ADB] Pressing the HOME button
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell input keyevent 3’
[AndroidBootstrap] Sending command to android: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {“cmd”:“shutdown”}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type SHUTDOWN
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
[AndroidBootstrap] Received command result from bootstrap
[UiAutomator] Shutting down UiAutomator
[UiAutomator] Moving to state ‘stopping’
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Closed client connection
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: numtests=1
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: stream=.
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
[AndroidBootstrap] [UIAUTO STDOUT] INSTRUMENTATION_STATUS: current=1
[UiAutomator] UiAutomator shut down normally
[UiAutomator] Moving to state ‘stopped’
[ADB] Attempting to kill all uiautomator processes
[ADB] Getting all processes with uiautomator
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell ps’
[ADB] No uiautomator process found to kill, continuing…
[UiAutomator] Moving to state ‘stopped’
[Logcat] Stopping logcat capture
[ADB] Running ‘C:\Android\platform-tools\adb.exe -P 5037 -s BH905RC60M shell am force-stop io.appium.unlock’
[AndroidDriver] Not cleaning generated files. Add clearSystemFiles
capability if wanted.
[BaseDriver] Event ‘newSessionStarted’ logged at 1533449487529 (11:41:27 GMT+0530 (India Standard Time))
[W3C] Encountered internal error running command: Error: Cannot start the ‘in.amazon.mShop.android.shopping’ application. Original error: The permission to start ‘com.amazon.micron.GatewayActivity’ activity has been denied.Make sure the activity/package names are correct.
[W3C] at ADB.callee$0$0$ (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:125:11)
[W3C] at tryCatch (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
[W3C] at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
[W3C] at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
[W3C] at GeneratorFunctionPrototype.invoke (C:\Program Files (x86)\Appium\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[W3C] at
[HTTP] <-- POST /wd/hub/session 500 8682 ms - 1750
[HTTP]
Appium server stopped successfully