I am recent noob in using Appium. I am writing tests in C#. I was able to run tests successfully a while before. then today i updated new version.All of a sudden I started getting exception for unknown reason. I am not able to figure what is happening

Starting Node Server
info: Welcome to Appium v1.3.4 (REV c8c79a85fbd6870cd6fc3d66d038a115ebe22efe)
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”:“18”,“automationName”:“Appium”}
info: Console LogLevel: debug
info: → POST /wd/hub/session {“desiredCapabilities”:{“platformVersion”:“4.2.2”,“platformName”:“Android”,“deviceName”:“IBall-Slide”,“appActivity”:“.LoginActivity”,“app”:“C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk”}}
info: Client User-Agent string: undefined
info: [debug] No appPackage desired capability or server param. Parsing from apk.
info: [debug] Using local app from desired caps: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk
info: [debug] Creating new appium session fdc39dba-6060-4c00-96bd-8afe61e66df9
info: Starting android appium
info: [debug] Getting Java version
info: Java version is: 1.7.0_65
info: [debug] Using fast reset? true
info: [debug] Preparing device for session
info: [debug] Checking whether app is actually present
info: [debug] Checking whether adb is present
info: [debug] Using adb from C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe
info: Retrieving device
info: [debug] Trying to find a connected android device
info: [debug] Getting connected devices…
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe devices
info: [debug] 1 device(s) connected
info: Found device 0123456789ABCDEF
info: [debug] Setting device id to 0123456789ABCDEF
info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF wait-for-device
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “echo ‘ready’”
info: [debug] Starting logcat capture
info: [debug] Parsing package and activity from app manifest
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\aapt.exe
info: [debug] Extracting package and launch activity from manifest.
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\aapt.exe dump badging C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk
info: [debug] badging package: com.significantdigits.mediwatchreceptionist
info: [debug] badging act: com.significantdigits.mediwatchreceptionist.SplashActivity
info: [debug] Parsed package and activity are: com.significantdigits.mediwatchreceptionist/com.significantdigits.mediwatchreceptionist.SplashActivity
info: [debug] Getting device API level
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 17
info: Device API level is: 17
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “getprop persist.sys.language”
info: [debug] Current device persist.sys.language: en
info: [debug] java -jar “C:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk” “C:\Users\Aakash\AppData\Local\Temp\com.significantdigits.mediwatchreceptionist” en
info: [debug] No strings.xml for language ‘en’, getting default strings.xml
info: [debug] java -jar “C:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar” “stringsFromApk” “C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk” “C:\Users\Aakash\AppData\Local\Temp\com.significantdigits.mediwatchreceptionist”
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF push “C:\Users\Aakash\AppData\Local\Temp\com.significantdigits.mediwatchreceptionist\strings.json” /data/local/tmp
info: [debug] Checking whether aapt is present
info: [debug] Using aapt from C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\aapt.exe
info: [debug] Retrieving process from manifest.
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\aapt.exe dump xmltree C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk AndroidManifest.xml
info: [debug] Set app process to: com.significantdigits.mediwatchreceptionist
info: [debug] Not uninstalling app since server not started with --full-reset
info: [debug] Checking app cert for C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk.
info: [debug] executing cmd: java -jar C:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk
info: [debug] App already signed.
info: [debug] Zip-aligning C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk
info: [debug] Checking whether zipalign is present
info: [debug] Using zipalign from C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\tools\zipalign.exe
info: [debug] Zip-aligning apk.
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\tools\zipalign.exe -f 4 C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\build-tools\android-4.2.2\MediWatchReceptionist.apk C:\Users\Aakash\AppData\Local\Temp\appium1141119-6104-e8c290.tmp
info: [debug] MD5 for app is 2485045cedc9d58416d835e9d0f4bfbf
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “ls /data/local/tmp/2485045cedc9d58416d835e9d0f4bfbf.apk”
info: [debug] Getting install status for com.significantdigits.mediwatchreceptionist
info: [debug] Getting device API level
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “getprop ro.build.version.sdk”
info: [debug] Device is at API Level 17
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “pm list packages -3 com.significantdigits.mediwatchreceptionist”
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:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “am force-stop com.significantdigits.mediwatchreceptionist”
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “pm clear com.significantdigits.mediwatchreceptionist”
info: [debug] Forwarding system:4724 to device:4724
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF forward tcp:4724 tcp:4724
info: [debug] Pushing appium bootstrap to device…
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF push “C:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar” /data/local/tmp/
info: [debug] Pushing settings apk to device…
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF install “C:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk”
info: [debug] Pushing unlock helper app to device…
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF install “C:\AppiumForWindows-1.2.0.1\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:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “ps ‘uiautomator’”
info: [debug] No matching processes found
info: [debug] Running bootstrap
info: [debug] spawning: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
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: {“value”:true,“status”:0}
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF 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: {“value”:“/data/local/tmp”,“status”:0}
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] Getting device API level
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “getprop ro.build.version.sdk”
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:false,“status”:0}
info: [debug] Device is at API Level 17
info: [debug] executing cmd: C:\adt-bundle-windows-x86_64-20130522\adt-bundle-windows-x86_64-20130522\sdk\platform-tools\adb.exe -s 0123456789ABCDEF shell “am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.significantdigits.mediwatchreceptionist/.LoginActivity”
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] Sent shutdown command, waiting for UiAutomator to stop…
info: [debug] [BOOTSTRAP] [debug] Returning result: {“value”:“OK, shutting down”,“status”:0}
info: [debug] [UIAUTOMATOR STDOUT] [CDS]close[4724]
info: [debug] [UIAUTOMATOR STDOUT] close [socket][/0.0.0.0:4724]
info: [debug] [BOOTSTRAP] [debug] Closed client connection
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
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: 0.919
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: 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 null. (C:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:1135:19)
at null. (C:\AppiumForWindows-1.2.0.1\Appium\node_modules\appium\node_modules\appium-adb\lib\adb.js:172: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 8830.296 ms - 194

Please help me get rid of this exception. I am stuck. Any help will be greatly appreciated.

From this line I guess you need “sudo” …

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}

Thank you for reply.

i don’t know ‘sudo’?

You should be an admin to start the appium…

I m using windows 7.

Maybe this helps: