android / android/testing-samples
UiAutomator findObject is throwing IllegalStateException: UiAutomation not connected!
- 主要语言
- Java
- 星标
- 9.3k
- 派生
- 3.6k
- PR 合并指标
- 30 天内没有已合并 PR
描述
Getting below Exception for every consecutive execution
```
java.lang.IllegalStateException: UiAutomation not connected!
at android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.java:971)
at android.app.UiAutomation.waitForIdle(UiAutomation.java:577)
at android.support.test.uiautomator.UiAutomatorBridge.waitForIdle(UiAutomatorBridge.java:112)
at android.support.test.uiautomator.UiDevice.waitForIdle(UiDevice.java:639)
at android.support.test.uiautomator.UiDevice.waitForIdle(UiDevice.java:629)
at android.support.test.uiautomator.UiDevice.getWindowRoots(UiDevice.java:1074)
at android.support.test.uiautomator.UiDevice.findObject(UiDevice.java:164)
```
observed throwing above exception immediately after executing below statement in logcat
`W WindowManager: Attempted to remove non-existing token: android.os.Binder@2728fc2`
**Tested on API Level:** 19, 21, 23 emulators, issue also replicating in real device
**Uiautomator Version:** com.android.support.test.uiautomator:uiautomator-v18:2.1.2
Please let me know if you need any other information.
贡献指南
调研方向
先从 UiDevice.findObject 堆栈跟踪和之前的 WindowManager logcat 警告入手,然后使用 UiAutomator 2.1.2 在列出的 API 级别上重现该故障。当连续执行不再产生 UiAutomation not connected 异常,并且已确定触发条件时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- mobile, testing-qa
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100