HI Philippe_Pageau ,
I am beginner to appium . i have written the code to test some cases in hybrid_app. i.e "amazon kindle " app. I have run the same code on both emulator and as well as the mobile(Real) Device . It is working fine with the emulator . But i am facing the below error while running on the real device .
kindly help me out . I have been struggling to find out the reason and to make it work on real device from Past 1 week .
Emulator Logs
Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 21 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"21","automationName":"Appium"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"platform":"ANDROID","disableAndroidWatchers":false,"platformName":"Android","deviceName":"Android Emulator","browserName":"","appActivity":"com.amazon.kcp.library.StandaloneLibraryActivity","androidDeviceReadyTimeout":30,"deviceReadyTimeout":30,"appPackage":"com.amazon.kindle","version":"5.0.1"}}
info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.7.0_79)
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, androidDeviceReadyTimeout, version
info: [debug] Didn't get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session d58686c1-3a74-48d7-953d-3d71b21b7914
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.7.0_79
info: [debug] Checking whether adb is present
info: [debug] Using adb from E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe
warn: No app capability, can't parse package/activity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it's already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device 192.168.4.101:5555
info: [debug] Setting device id to 192.168.4.101:5555
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 30)
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 wait-for-device
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: Device API level is: 21
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn't exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "rm -rf /data/local/tmp/strings.json"
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 push "C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.amazon.kindle -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] WARNING: linker:
info: [debug] [UIAUTOMATOR STDOUT] libhoudini.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "dumpsys window"
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"\/data"}
info: [debug] dataDir set to: /data
info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":false}
info: [debug] Getting device API level
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.amazon.kindle/com.amazon.kcp.library.StandaloneLibraryActivity"
info: [debug] Waiting for pkg "com.amazon.kindle" and activity "com.amazon.kcp.library.StandaloneLibraryActivity" to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "dumpsys window windows"
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "getprop ro.build.version.release"
info: [debug] Device is at release version 5.0
info: [debug] Device launched! Ready for commands
info: [debug] Setting command timeout to the default of 60 secs
info: [debug] Appium session started with sessionId d58686c1-3a74-48d7-953d-3d71b21b7914
info: <-- POST /wd/hub/session 303 10663.732 ms - 74
info: --> GET /wd/hub/session/d58686c1-3a74-48d7-953d-3d71b21b7914 {}
info: [debug] Responding to client with success: {"status":0,"value":{"platform":"ANDROID","browserName":"","platformVersion":"5.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platform":"ANDROID","disableAndroidWatchers":false,"platformName":"Android","deviceName":"Android Emulator","browserName":"","appActivity":"com.amazon.kcp.library.StandaloneLibraryActivity","androidDeviceReadyTimeout":30,"deviceReadyTimeout":30,"appPackage":"com.amazon.kindle","version":"5.0.1"},"disableAndroidWatchers":false,"platformName":"Android","deviceName":"192.168.4.101:5555","appActivity":"com.amazon.kcp.library.StandaloneLibraryActivity","androidDeviceReadyTimeout":30,"deviceReadyTimeout":30,"appPackage":"com.amazon.kindle","version":"5.0.1"},"sessionId":"d58686c1-3a74-48d7-953d-3d71b21b7914"}
info: <-- GET /wd/hub/session/d58686c1-3a74-48d7-953d-3d71b21b7914 200 10.419 ms - 880 {"status":0,"value":{"platform":"ANDROID","browserName":"","platformVersion":"5.0","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platform":"ANDROID","disableAndroidWatchers":false,"platformName":"Android","deviceName":"Android Emulator","browserName":"","appActivity":"com.amazon.kcp.library.StandaloneLibraryActivity","androidDeviceReadyTimeout":30,"deviceReadyTimeout":30,"appPackage":"com.amazon.kindle","version":"5.0.1"},"disableAndroidWatchers":false,"platformName":"Android","deviceName":"192.168.4.101:5555","appActivity":"com.amazon.kcp.library.StandaloneLibraryActivity","androidDeviceReadyTimeout":30,"deviceReadyTimeout":30,"appPackage":"com.amazon.kindle","version":"5.0.1"},"sessionId":"d58686c1-3a74-48d7-953d-3d71b21b7914"}
info: --> GET /wd/hub/session/d58686c1-3a74-48d7-953d-3d71b21b7914/contexts {}
info: [debug] Getting a list of available webviews
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s 192.168.4.101:5555 shell "cat /proc/net/unix"
info: [debug] Available contexts:
info: [debug] []
info: [debug] Available contexts: NATIVE_APP
info: [debug] Responding to client with success:
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Error logs when ran in Mobile Device
Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 21 --automation-name Appium --log-no-color
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {"address":"127.0.0.1","logNoColors":true,"platformName":"Android","platformVersion":"21","automationName":"Appium"}
info: Console LogLevel: debug
info: --> POST /wd/hub/session {"desiredCapabilities":{"platform":"ANDROID","disableAndroidWatchers":false,"platformName":"Android","deviceName":"Android","browserName":"","appActivity":"com.amazon.kcp.library.StandaloneLibraryActivity","androidDeviceReadyTimeout":30,"deviceReadyTimeout":30,"appPackage":"com.amazon.kindle","version":"5.0.1"}}
info: Client User-Agent string: Apache-HttpClient/4.5.2 (Java/1.7.0_79)
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : platform, androidDeviceReadyTimeout, version
info: [debug] Didn't get app but did get Android package, will attempt to launch it on the device
info: [debug] Creating new appium session dc4f83af-991f-4db2-9a55-668d88d87de9
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.7.0_79
info: [debug] Checking whether adb is present
info: [debug] Using adb from E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe
warn: No app capability, can't parse package/activity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Not checking whether app is present since we are assuming it's already on the device
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device F8AZCY09D179
info: [debug] Setting device id to F8AZCY09D179
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 30)
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 wait-for-device
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell "echo 'ready'"
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: Device API level is: 21
info: [debug] Extracting strings for language: default
info: [debug] Apk doesn't exist locally
info: [debug] Could not get strings, but it looks like we had an old strings file anyway, so ignoring
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell "rm -rf /data/local/tmp/strings.json"
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Skipping install since we launched with a package instead of an app path
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 push "C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/
info: [debug] Pushing settings apk to device...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
info: [debug] Pushing unlock helper app to device...
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk"
info: Starting App
info: [debug] Attempting to kill all 'uiautomator' processes
info: [debug] Getting all processes with 'uiautomator'
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell "ps 'uiautomator'"
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.amazon.kindle -e disableAndroidWatchers false
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724
info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready
info: [debug] [BOOTSTRAP] [debug] Loading json...
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
info: [debug] Waking up device if it's not alive
info: [debug] Pushing command to appium work queue: ["wake",{}]
info: [debug] [BOOTSTRAP] [debug] Client connected
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: wake
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell "dumpsys window"
info: [debug] Screen already unlocked, continuing.
info: [debug] Pushing command to appium work queue: ["getDataDir",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [debug] dataDir set to: /data/local/tmp
info: [debug] Pushing command to appium work queue: ["compressedLayoutHierarchy",{"compressLayout":false}]
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: getDataDir
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"\/data\/local\/tmp"}
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"compressedLayoutHierarchy","params":{"compressLayout":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: compressedLayoutHierarchy
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":false}
info: [debug] Getting device API level
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell "getprop ro.build.version.sdk"
info: [debug] Device is at API Level 21
info: [debug] executing cmd: E:\AppiumSetup\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe -s F8AZCY09D179 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.amazon.kindle/com.amazon.kcp.library.StandaloneLibraryActivity"
error: Permission to start activity denied.
info: [debug] Stopping logcat capture
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"shutdown"}
info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":"OK, shutting down"}
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 1.298
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] UiAutomator shut down normally
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Error: Permission to start activity denied.
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1151:19)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:180:9)
at ChildProcess.exithandler (child_process.js:742:7)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1016:16)
at Process.ChildProcess.handle.onexit (childprocess.js:1088:5)
info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Permission to start activity denied.)","origValue":"Permission to start activity denied."},"sessionId":null}
info: <-- POST /wd/hub/session 500 19359.780 ms - 194
error: Failed to start an Appium session, err was: Error: Permission to start activity denied.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------Tried to invoke the app with the package and activity from "CMD" also but faced below error
Starting: Intent { cmp=com.amazon.kindle/com.amazon.kcp.library.StandaloneLibraryActivity }
java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.amazon.kindle/com.amazon.kcp.library.StandaloneLibraryActivity } from null (p
id=12523, uid=2000) not exported from uid 10167
at android.os.Parcel.readException(Parcel.java:1540)
at android.os.Parcel.readException(Parcel.java:1493)
at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:2479)
at com.android.commands.am.Am.runStart(Am.java:740)
at com.android.commands.am.Am.onRun(Am.java:304)
at com.android.internal.os.BaseCommand.run(BaseCommand.java:47)
at com.android.commands.am.Am.main(Am.java:99)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:250)