Unfortunately app has stopped - problem between two Activities

Unfortunately app has stopped - problem between two Activities

I have a problem: apk, which I’m testing have some activities. First is a LoginActivity, and after authorization - MainActivity. When I pass correct credentials (by sendkeys) and click button to login, user is logged on, application starts MainActivity and… stopped with communicate “Unfortunately, Application has stopped”. Remained part of test fails, because Appium can’t find elements (application is down).
I set my capabilities (in @Before):
capabilities.setCapability(“appPackage”,“our.package”);
capabilities.setCapability(“appActivity”, “.login.LoginActivity”);
capabilities.setCapability(“appWaitActivity”, “.login.LoginActivity, .MainActivity”);
I also tried combination with full path: our.package.login.LoginActivity and our.package.MainActivity.

Moreover I tried every combination of these settings in Appium:
Launch Activity:
checked our.package.login.LoginActivity OR our.package.MainActivity OR nothing checked
Wait for Activity:
checked our.package.login.LoginActivity OR our.package.MainActivity OR nothing checked
but problem still exists.

When I test application manually everything works properly.

What is the problem? I also think that 3 days ago everything worked and I was able to click buttons in MainActivity, but something changes and now it is not working… Please help, I spend some days on this problem and nothing helps.

Platform: Android
Appium version: 1.3.4.1
Emulator: NexusS, API 19, Android 4.4.2
Using Java, based on official tutorial.
OS: Windows 7

My logs from Appium, when configuration of capabilities was:
In Appium:
[unchecked] Launch Activity: our.package.login.LoginActivity
[unchecked] Wait for Activity: our.package.login.LoginActivity
In code:
capabilities.setCapability(“appPackage”,“our.package”);
capabilities.setCapability(“appActivity”, “.login.LoginActivity”);
capabilities.setCapability(“appWaitActivity”, “.login.LoginActivity, .MainActivity”);

> 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: {"app":"C:\\Gity\\tutorial\\projects\\java_android\\demo-release-unsigned.apk","address":"127.0.0.1","logNoColors":true,"avd":"NexusS_API19","deviceName":"emulator19","platformName":"Android","platformVersion":"17","automationName":"Appium"}
> info: Console LogLevel: debug
> info: --> POST /wd/hub/session {"desiredCapabilities":{"newCommandTimeout":60,"platformVersion":"4.2.2","app":"C:\\Gity\\tutorial\\projects\\java_android\\demo-release-unsigned.apk","deviceName":"Android","platformName":"Android","appActivity":".login.LoginActivity","appWaitActivity":".login.LoginActivity, .MainActivity","appPackage":"our.package"}}
> info: Client User-Agent string: Apache-HttpClient/4.3.3 (java 1.5)
> info: [debug] Using local app from desired caps: C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk
> info: [debug] Creating new appium session ac73786a-0a57-4d0f-b119-8d59d5dc4042
> info: Starting android appium
> info: [debug] Getting Java version
> info: Java version is: 1.8.0_31
> 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:\AndroidSDK\platform-tools\adb.exe
> info: [debug] Trying to find NexusS_API19 emulator
> info: [debug] Getting connected emulators
> info: [debug] Getting connected devices...
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe devices
> info: [debug] 1 device(s) connected
> info: [debug] 1 emulator(s) connected
> info: [debug] Sending telnet command to device: avd name
> info: [debug] Getting running emulator port
> info: [debug] Socket connection to device created
> info: [debug] Socket connection to device ready
> info: [debug] Telnet command got response: NexusS_API19
> info: [debug] Found emulator NexusS_API19 in port 5554
> info: [debug] Setting device id to emulator-5554
> info: [debug] Did not launch AVD because it was already running.
> info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5)
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 wait-for-device
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "echo 'ready'"
> info: [debug] Starting logcat capture
> info: [debug] Getting device API level
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk"
> info: [debug] Device is at API Level 19
> info: Device API level is: 19
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "getprop persist.sys.language"
> info: [debug] Current device persist.sys.language: en
> info: [debug] java -jar "C:\Programy\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk" "C:\Users\kusid\AppData\Local\Temp\our.package" en
> info: [debug] No strings.xml for language 'en', getting default strings.xml
> info: [debug] java -jar "C:\Programy\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk" "C:\Users\kusid\AppData\Local\Temp\our.package"
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 push "C:\\Users\\kusid\\AppData\\Local\\Temp\\our.package\\strings.json" /data/local/tmp
> info: [debug] Checking whether aapt is present
> info: [debug] Using aapt from C:\AndroidSDK\build-tools\21.1.2\aapt.exe
> info: [debug] Retrieving process from manifest.
> info: [debug] executing cmd: C:\AndroidSDK\build-tools\21.1.2\aapt.exe dump xmltree C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk AndroidManifest.xml
> info: [debug] Set app process to: our.package
> info: [debug] Not uninstalling app since server not started with --full-reset
> info: [debug] Checking app cert for C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk.
> info: [debug] executing cmd: java -jar C:\Programy\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk
> info: [debug] App already signed.
> info: [debug] Zip-aligning C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk
> info: [debug] Checking whether zipalign is present
> info: [debug] Using zipalign from C:\AndroidSDK\build-tools\21.1.2\zipalign.exe
> info: [debug] Zip-aligning apk.
> info: [debug] executing cmd: C:\AndroidSDK\build-tools\21.1.2\zipalign.exe -f 4 C:\Gity\tutorial\projects\java_android\demo-release-unsigned.apk C:\Users\kusid\AppData\Local\Temp\appium11526-2312-9w6wsl.tmp
> info: [debug] MD5 for app is f04360d68c2fc68af99b4824e5d9ffb8
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "ls /data/local/tmp/f04360d68c2fc68af99b4824e5d9ffb8.apk"
> info: [debug] Getting install status for our.package
> info: [debug] Getting device API level
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk"
> info: [debug] Device is at API Level 19
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "pm list packages -3 our.package"
> info: [debug] App is not installed
> info: Installing App
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "mkdir -p /data/local/tmp/"
> info: [debug] Removing any old apks
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "ls /data/local/tmp/*.apk"
> info: [debug] Found an apk we want to keep at /data/local/tmp/f04360d68c2fc68af99b4824e5d9ffb8.apk
> info: [debug] Couldn't find any apks to remove
> info: [debug] Uninstalling our.package
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "am force-stop our.package"
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 uninstall our.package
> info: [debug] App was not uninstalled, maybe it wasn't on device?
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "pm install -r /data/local/tmp/f04360d68c2fc68af99b4824e5d9ffb8.apk"
> info: [debug] Forwarding system:4724 to device:4724
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 forward tcp:4724 tcp:4724
> info: [debug] Pushing appium bootstrap to device...
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 push "C:\\Programy\\Appium\\node_modules\\appium\\build\\android_bootstrap\\AppiumBootstrap.jar" /data/local/tmp/
> info: [debug] Pushing settings apk to device...
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 install "C:\Programy\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk"
> info: [debug] Pushing unlock helper app to device...
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 install "C:\Programy\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:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "ps 'uiautomator'"
> info: [debug] No matching processes found
> info: [debug] Running bootstrap
> info: [debug] spawning: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
> info: [debug] [UIAUTOMATOR STDOUT] WARNING: linker:
> info: [debug] [UIAUTOMATOR STDOUT] libdvm.so has text relocations. This is wasting memory and is a security risk. 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] 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:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 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","status":0}
> 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] Getting device API level
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "getprop ro.build.version.sdk"
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":false,"status":0}
> info: [debug] Device is at API Level 19
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n our.package/.login.LoginActivity"
> info: [debug] Waiting for pkg "our.package" and activity ".login.LoginActivity, .MainActivity" to be focused
> info: [debug] Getting focused package and activity
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window windows"
> info: [debug] Device launched! Ready for commands
> info: [debug] Setting command timeout to 60 secs
> info: [debug] Appium session started with sessionId ac73786a-0a57-4d0f-b119-8d59d5dc4042
> info: <-- POST /wd/hub/session 303 7835.260 ms - 9 
> info: --> GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042 {}
> info: [debug] Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"4.2.2","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"newCommandTimeout":60,"platformVersion":"4.2.2","app":"C:\\Gity\\tutorial\\projects\\java_android\\demo-release-unsigned.apk","deviceName":"Android","platformName":"Android","appActivity":".login.LoginActivity","appWaitActivity":".login.LoginActivity, .MainActivity","appPackage":"our.package"},"newCommandTimeout":60,"app":"C:\\Gity\\tutorial\\projects\\java_android\\demo-release-unsigned.apk","deviceName":"Android","platformName":"Android","appActivity":".login.LoginActivity","appWaitActivity":".login.LoginActivity, .MainActivity","appPackage":"our.package"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042 200 1.797 ms - 917 {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"4.2.2","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"newCommandTimeout":60,"platformVersion":"4.2.2","app":"C:\\Gity\\tutorial\\projects\\java_android\\demo-release-unsigned.apk","deviceName":"Android","platformName":"Android","appActivity":".login.LoginActivity","appWaitActivity":".login.LoginActivity, .MainActivity","appPackage":"our.package"},"newCommandTimeout":60,"app":"C:\\Gity\\tutorial\\projects\\java_android\\demo-release-unsigned.apk","deviceName":"Android","platformName":"Android","appActivity":".login.LoginActivity","appWaitActivity":".login.LoginActivity, .MainActivity","appPackage":"our.package"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/timeouts/implicit_wait {"ms":30000}
> info: [debug] Set Android implicit wait to 30000ms
> info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/timeouts/implicit_wait 200 1.706 ms - 76 {"status":0,"value":null,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/appium/device/current_activity {}
> info: [debug] Getting focused package and activity
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "dumpsys window windows"
> info: [debug] Responding to client with success: {"status":0,"value":".login.LoginActivity","sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/appium/device/current_activity 200 538.027 ms - 94 {"status":0,"value":".login.LoginActivity","sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element {"using":"id","value":"our.package:id/username"}
> info: [debug] Waiting up to 30000ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"our.package:id/username","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"our.package:id/username","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding our.package:id/username using ID with the contextId:  multiple: false
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=our.package:id/username]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"1"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"1"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element 200 893.012 ms - 87 {"status":0,"value":{"ELEMENT":"1"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/1/displayed {}
> info: [debug] Pushing command to appium work queue: ["element:getAttribute",{"elementId":"1","attribute":"displayed"}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:getAttribute","params":{"elementId":"1","attribute":"displayed"}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: getAttribute
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"true","status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/1/displayed 200 33.256 ms - 76 {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/1/value {"id":"1","value":["kusid"]}
> info: [debug] Pushing command to appium work queue: ["element:setText",{"elementId":"1","text":"kusid","replace":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"1","text":"kusid","replace":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: setText
> info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
> info: [debug] [BOOTSTRAP] [debug] Updating class "class com.android.uiautomator.core.UiDevice" to enable field "mUiAutomationBridge"
> info: [debug] [BOOTSTRAP] [debug] Updating class "class com.android.uiautomator.core.UiAutomatorBridge" to enable field "mInteractionController"
> info: [debug] [BOOTSTRAP] [debug] Finding methods on class: class com.android.uiautomator.core.InteractionController
> info: [debug] [BOOTSTRAP] [debug] Text remains after clearing, but it appears to be hint text.
> info: [debug] [BOOTSTRAP] [debug] Text not cleared. Assuming remainder is hint text.
> info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: kusid
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/1/value 200 4923.913 ms - 76 {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element {"using":"id","value":"our.package:id/password"}
> info: [debug] Waiting up to 30000ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"our.package:id/password","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"our.package:id/password","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding our.package:id/password using ID with the contextId:  multiple: false
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=our.package:id/password]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"2"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"2"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element 200 578.786 ms - 87 {"status":0,"value":{"ELEMENT":"2"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/2/displayed {}
> info: [debug] Pushing command to appium work queue: ["element:getAttribute",{"elementId":"2","attribute":"displayed"}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:getAttribute","params":{"elementId":"2","attribute":"displayed"}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: getAttribute
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"true","status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/2/displayed 200 31.026 ms - 76 {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/2/value {"id":"2","value":["rules"]}
> info: [debug] Pushing command to appium work queue: ["element:setText",{"elementId":"2","text":"rules","replace":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:setText","params":{"elementId":"2","text":"rules","replace":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: setText
> info: [debug] [BOOTSTRAP] [debug] Attempting to clear using UiObject.clearText().
> info: [debug] [BOOTSTRAP] [debug] Sending plain text to element: rules
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/2/value 200 5015.301 ms - 76 {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element {"using":"id","value":"our.package:id/sign_in_button"}
> info: [debug] Waiting up to 30000ms for condition
> info: [debug] Pushing command to appium work queue: ["find",{"strategy":"id","selector":"our.package:id/sign_in_button","context":"","multiple":false}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"id","selector":"our.package:id/sign_in_button","context":"","multiple":false}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: find
> info: [debug] [BOOTSTRAP] [debug] Finding our.package:id/sign_in_button using ID with the contextId:  multiple: false
> info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[INSTANCE=0, RESOURCE_ID=our.package:id/sign_in_button]
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":{"ELEMENT":"3"},"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"3"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element 200 433.321 ms - 87 {"status":0,"value":{"ELEMENT":"3"},"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/3/displayed {}
> info: [debug] Pushing command to appium work queue: ["element:getAttribute",{"elementId":"3","attribute":"displayed"}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:getAttribute","params":{"elementId":"3","attribute":"displayed"}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: getAttribute
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":"true","status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- GET /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/3/displayed 200 19.133 ms - 76 {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/3/click {"id":"3"}
> info: [debug] Pushing command to appium work queue: ["element:click",{"elementId":"3"}]
> info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"3"}}
> info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
> info: [debug] [BOOTSTRAP] [debug] Got command action: click
> info: [debug] [BOOTSTRAP] [debug] Returning result: {"value":true,"status":0}
> info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- POST /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042/element/3/click 200 236.541 ms - 76 {"status":0,"value":true,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: --> DELETE /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042 {}
> info: Shutting down appium session
> info: [debug] Pressing the HOME button
> info: [debug] executing cmd: C:\AndroidSDK\platform-tools\adb.exe -s emulator-5554 shell "input keyevent 3"
> 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: {"value":"OK, shutting down","status":0}
> 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: 20.081
> info: [debug] [UIAUTOMATOR STDOUT] OK (1 test)
> info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
> info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
> info: [debug] UiAutomator shut down normally
> info: [debug] Cleaning up android objects
> info: [debug] Cleaning up appium session
> info: [debug] Responding to client with success: {"status":0,"value":null,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> info: <-- DELETE /wd/hub/session/ac73786a-0a57-4d0f-b119-8d59d5dc4042 200 5806.984 ms - 76 {"status":0,"value":null,"sessionId":"ac73786a-0a57-4d0f-b119-8d59d5dc4042"}
> Killed Node Server.
> Node Server Process Ended

It seems like your are shutting down your Appium session.

Can you post your code invoking Appium’s java-client ?

1 Like

Sorry, it was really bug in my apk. I didn’t see this when testing manually, because some data was stored in android cache. Appium cleared this cache and there was exception in apk.
Thank you for your reply, this helped me.