Getting status 33 error in appium and in eclipse getting "org.openqa.selenium.SessionNotCreatedException"

Checking if an update is available

Update available to new version 1.4.16.1
Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --app C:\amit\com.greedygame.deathsprint.apk --platform-name Android --platform-version 21 --automation-name Appium --log-no-color
warn: Appium support for versions of node < 0.12 has been deprecated and will be removed in a future version. Please upgrade!
info: Welcome to Appium v1.4.13 (REV c75d8adcb66a75818a542fe1891a34260c21f76a)
info: Appium REST http interface listener started on 127.0.0.1:4723
info: [debug] Non-default server args: {“app”:“C:\amit\com.greedygame.deathsprint.apk”,“address”:“127.0.0.1”,“logNoColors”:true,“platformName”:“Android”,“platformVersion”:“21”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“PlatformName”:“Android”,“platform value”:“5.0”,“androidPackage”:“com.greedygame.deathsprint”,“appWaitActivity”:“com.unity3d.player.UnityPlayerProxyActivity”,“browserName”:“”,“platformName”:“Android”,“deviceName”:“Lenovo K50a40”}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_60)
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. : PlatformName, platform value, androidPackage
info: [debug] No appActivity desired capability or server param. Parsing from apk.
info: [debug] Using local app from command line: C:\amit\com.greedygame.deathsprint.apk
info: [debug] Creating new appium session 52a78848-9d9e-421e-9b4e-f77313859270
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_60
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Android SDK\platform-tools\adb.exe
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Android SDK\build-tools\build-tools-23.0.1\aapt.exe
info: [debug] Extracting package and launch activity from manifest.
info: [debug] executing cmd: “C:\Android SDK\build-tools\build-tools-23.0.1\aapt.exe” dump badging C:\amit\com.greedygame.deathsprint.apk
info: [debug] badging package: com.greedygame.deathsprint
info: [debug] badging act: com.unity3d.player.UnityPlayerProxyActivity
info: [debug] Parsed package and activity are: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerProxyActivity
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device F6KFIZHUINJRVKAA
info: [debug] Setting device id to F6KFIZHUINJRVKAA
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA wait-for-device
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “getprop persist.sys.language”
info: [debug] Current device persist.sys.language: en
info: [debug] java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\amit\com.greedygame.deathsprint.apk” “C:\Users\AMITRA~1\AppData\Local\Temp\com.greedygame.deathsprint” en
info: [debug] No strings.xml for language ‘en’, getting default strings.xml
info: [debug] java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\amit\com.greedygame.deathsprint.apk” “C:\Users\AMITRA~1\AppData\Local\Temp\com.greedygame.deathsprint”
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA push “C:\Users\AMITRA~1\AppData\Local\Temp\com.greedygame.deathsprint\strings.json” /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Android SDK\build-tools\build-tools-23.0.1\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: “C:\Android SDK\build-tools\build-tools-23.0.1\aapt.exe” dump xmltree C:\amit\com.greedygame.deathsprint.apk AndroidManifest.xml
info: [debug] Set app process to: com.greedygame.deathsprint
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\amit\com.greedygame.deathsprint.apk.
info: [debug] executing cmd: java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” C:\amit\com.greedygame.deathsprint.apk
info: [debug] App already signed.
info: [debug] Zip-aligning C:\amit\com.greedygame.deathsprint.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\Android SDK\build-tools\build-tools-23.0.1\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: “C:\Android SDK\build-tools\build-tools-23.0.1\zipalign.exe” -f 4 C:\amit\com.greedygame.deathsprint.apk C:\Users\AMITRA~1\AppData\Local\Temp\116622-6136-1jfxzt4\appium.tmp
info: [debug] MD5 for app is 83033714917390140dd8da56d028e0e9
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “ls /data/local/tmp/83033714917390140dd8da56d028e0e9.apk”
info: [debug] Getting install status for com.greedygame.deathsprint
info: [debug] Getting device API level
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 21
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “pm list packages -3 com.greedygame.deathsprint”
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “am force-stop com.greedygame.deathsprint”
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “pm clear com.greedygame.deathsprint”
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: C:\Android SDK\platform-tools\adb.exe -s F6KFIZHUINJRVKAA shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.greedygame.deathsprint -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] json loading complete.
info: [debug] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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] [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] dataDir set to: /data/local/tmp
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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 21
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.greedygame.deathsprint/com.unity3d.player.UnityPlayerProxyActivity”
info: [debug] Waiting for pkg “com.greedygame.deathsprint” and activity “com.unity3d.player.UnityPlayerProxyActivity” to be focused
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Getting focused package and activity
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “dumpsys window windows”
info: [debug] Stopping logcat capture
error: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerProxyActivity never started. Current: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerNativeActivity
info: [debug] Logcat terminated with code null, signal SIGTERM
info: [debug] [BOOTSTRAP] [debug] Got data from client: {“cmd”:“shutdown”}
info: [debug] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
info: [debug] [UIAUTOMATOR STDOUT] [CDS]close[4724]
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] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [debug] [UIAUTOMATOR STDOUT] Time: 22.381
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: [debug] UiAutomator shut down normally
error: Failed to start an Appium session, err was: Error: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerProxyActivity never started. Current: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerNativeActivity
info: [debug] Cleaning up android objects
info: [debug] Cleaning up appium session
info: [debug] Error: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerProxyActivity never started. Current: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerNativeActivity
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1314:12)
at [object Object]. (C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1258:7)
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:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerProxyActivity never started. Current: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerNativeActivity)”,“origValue”:“com.greedygame.deathsprint/com.unity3d.player.UnityPlayerProxyActivity never started. Current: com.greedygame.deathsprint/com.unity3d.player.UnityPlayerNativeActivity”},“sessionId”:null}
info: ← POST /wd/hub/session 500 40012.045 ms - 454

I don’t remember if Appium 1.4.13 accepted a list of activities to wait for, but you might want to try adding in the UnityPlayerNativeActivity to your list of activities to wait for.

I made wait activity as comment line but still getting the same error. Any suggestions??

Try using only one Activity in the list. Double check that the full name of the Activity is accurate.

@afwang I tried with with one activity and i have also changed the activity name through appium. But now i am getting error: “permission to start activity is denied”. i am attaching the appium logs and also sending you my sample code.

Appium logs:

info: → POST /wd/hub/session {“desiredCapabilities”:{“PlatformName”:“Android”,“appActivity”:“com.unity3d.player.UnityPlayerActivity”,“platform value”:“5.0”,“androidPackage”:“com.greedygame.deathsprint”,“browserName”:“”,“platformName”:“Android”,“deviceName”:“Lenovo K50a40”}}
info: Client User-Agent string: Apache-HttpClient/4.5.1 (Java/1.8.0_60)
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. : PlatformName, platform value, androidPackage
info: [debug] Using local app from command line: C:\amit\com.greedygame.deathsprint.apk
info: [debug] Creating new appium session d9b3d2cf-4478-43c5-88f0-38245c2d5874
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.8.0_60
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\Android SDK\platform-tools\adb.exe
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” devices
info: [debug] 1 device(s) connected
info: Found device F6KFIZHUINJRVKAA
info: [debug] Setting device id to F6KFIZHUINJRVKAA
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA wait-for-device
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Getting device API level
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “getprop persist.sys.language”
info: [debug] Current device persist.sys.language: en
info: [debug] java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\amit\com.greedygame.deathsprint.apk” “C:\Users\AMITRA~1\AppData\Local\Temp\com.greedygame.deathsprint” en
info: [debug] No strings.xml for language ‘en’, getting default strings.xml
info: [debug] java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\amit\com.greedygame.deathsprint.apk” “C:\Users\AMITRA~1\AppData\Local\Temp\com.greedygame.deathsprint”
info: [debug] Reading strings from converted strings.json
info: [debug] Setting language to default
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA push “C:\Users\AMITRA~1\AppData\Local\Temp\com.greedygame.deathsprint\strings.json” /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\Android SDK\build-tools\build-tools-23.0.1\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: “C:\Android SDK\build-tools\build-tools-23.0.1\aapt.exe” dump xmltree C:\amit\com.greedygame.deathsprint.apk AndroidManifest.xml
info: [debug] Set app process to: com.greedygame.deathsprint
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\amit\com.greedygame.deathsprint.apk.
info: [debug] executing cmd: java -jar “C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar” C:\amit\com.greedygame.deathsprint.apk
info: [debug] App already signed.
info: [debug] Zip-aligning C:\amit\com.greedygame.deathsprint.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\Android SDK\build-tools\build-tools-23.0.1\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: “C:\Android SDK\build-tools\build-tools-23.0.1\zipalign.exe” -f 4 C:\amit\com.greedygame.deathsprint.apk C:\Users\AMITRA~1\AppData\Local\Temp\116626-8704-17i2rdx\appium.tmp
info: [debug] MD5 for app is 83033714917390140dd8da56d028e0e9
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “ls /data/local/tmp/83033714917390140dd8da56d028e0e9.apk”
info: [debug] Getting install status for com.greedygame.deathsprint
info: [debug] Getting device API level
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 21
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “pm list packages -3 com.greedygame.deathsprint”
info: [debug] App is installed
info: App is already installed, resetting app
info: [debug] Running fast reset (stop and clear)
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “am force-stop com.greedygame.deathsprint”
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “pm clear com.greedygame.deathsprint”
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: C:\Android SDK\platform-tools\adb.exe -s F6KFIZHUINJRVKAA shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.greedygame.deathsprint -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] Waking up device if it’s not alive
info: [debug] Pushing command to appium work queue: [“wake”,{}]
info: [debug] [BOOTSTRAP] [debug] json loading complete.
info: [debug] [BOOTSTRAP] [debug] Registered crash watchers.
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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA 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] [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] dataDir set to: /data/local/tmp
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: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 21
info: [debug] executing cmd: “C:\Android SDK\platform-tools\adb.exe” -s F6KFIZHUINJRVKAA shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.greedygame.deathsprint/com.unity3d.player.UnityPlayerActivity”
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] [BOOTSTRAP] [debug] Got command of type SHUTDOWN
info: [debug] [BOOTSTRAP] [debug] Returning result: {“status”:0,“value”:“OK, shutting down”}
info: [debug] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] [UIAUTOMATOR STDOUT] [CDS]close[4724]
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.274
info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
error: Failed to start an Appium session, err was: Error: Permission to start activity denied.
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:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810: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 17248.089 ms - 194

My sample code:

package greedy;

import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.android.AndroidDriver;

public class Sample {
private static AndroidDriver driver;
public static void main(String args) throws MalformedURLException, InterruptedException {
// TODO Auto-generated method stub

	DesiredCapabilities capabilities = new DesiredCapabilities();
	
	capabilities.setBrowserName("");
	capabilities.setCapability("deviceName", "Lenovo K50a40");
	capabilities.setCapability("platform value", "5.0");
	capabilities.setCapability("PlatformName", "Android");
	capabilities.setCapability("androidPackage", "com.greedygame.deathsprint");
	capabilities.setCapability("appActivity", "com.unity3d.player.UnityPlayerActivity");
//	capabilities.setCapability("appWaitActivity", "com.unity3d.player.UnityPlayerProxyActivity");
	driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
	Thread.sleep(15000);
	driver.tap(1,1600, 600, 1000);
	
}

}

please look it once…

Remove this line if you’re getting permission errors to start activities. Your first post’s logs suggest that your code didn’t specify the activity to start, so you can just let Appium use aapt to handle parsing out what is the launch activity of your app.

Uncomment this line. Try setting this to “com.unity3d.player.UnityPlayerNativeActivity” or “com.unity3d.player.UnityPlayerProxyActivity,com.unity3d.player.UnityPlayerNativeActivity”

@afwang Thanxx…Now it is working