android / android/testing-samples

UiAutomator findObject is throwing IllegalStateException: UiAutomation not connected!

オープン
#89 コメント 26 件 リアクション 9 件 担当者 0 名 GitHub で見る
bug
主要言語
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 警告から始め、一覧にある API レベルで UiAutomator 2.1.2 を使用して失敗を再現します。連続実行で UiAutomation not connected 例外が発生しなくなり、それを引き起こす条件が特定されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
mobile, testing-qa
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。