2

I am getting problem of UiAutomation Not Connected, while running the UiAutomation test cases in loop.

AndroidRuntime: FATAL EXCEPTION: Timer-0 AndroidRuntime: Process: com.android.imstressautomation, PID: 13697 AndroidRuntime: java.lang.IllegalStateException: UiAutomation not connected! AndroidRuntime: android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.java:971) AndroidRuntime: android.app.UiAutomation.waitForIdle(UiAutomation.java:577) AndroidRuntime:android.support.test.uiautomator.UiAutomatorBridge.waitForIdle(UiAutomatorBridge.java:112) AndroidRuntime:android.support.test.uiautomator.UiAutomatorBridge.waitForIdle(UiAutomatorBridge.java:107)

AndroidRuntime: at android.support.test.uiautomator.QueryController.findAccessibilityNodeInfo(QueryController.java:143) AndroidRuntime: at android.support.test.uiautomator.QueryController.findAccessibilityNodeInfo(QueryController.java:138) AndroidRuntime: at android.support.test.uiautomator.UiObject.findAccessibilityNodeInfo(UiObject.java:188) AndroidRuntime: at android.support.test.uiautomator.UiObject.getChildCount(UiObject.java:1

Abhishek Aryan
  • 19,936
  • 8
  • 46
  • 65
  • Is this coming every time ? Is `adb shell` coming out of the shell when the problem occurs? As a work around, you can do `adb kill-server;adb start-server`. – Rilwan Feb 28 '17 at 13:36
  • It is coming randomly when i am running the UiAutomator in a loop then some times after 2 hours of test execution it coming and sometimes after 3-4 hours. It is because of the following code while connect synchronized (mLock) { throwIfConnectedLocked(); if (mIsConnecting) { return; } mIsConnecting = true; } – user1573601 Mar 01 '17 at 06:08

0 Answers0