UiAutomator findObject is throwing IllegalStateException: UiAutomation not connected!
See original GitHub issueGetting 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.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:26 (1 by maintainers)
Top Results From Across the Web
Google Fabric: UiAutomation not connected - Stack Overflow
In this case the Google crawler goes in timeout and raises an exception. My advice is: be sure to not block UI with...
Read more >UiAutomator findObject is throwing IllegalStateException
Getting below Exception for every consecutive execution java.lang.IllegalStateException: UiAutomation not connected! at android.app.
Read more >java.lang.IllegalStateException: UiAutomation not connected!
I have Xamarin.Forms app in Google Play, I have brand new issue in pre-lunch report since I updated to the latest xamarin.forms and...
Read more >android.support.test.uiautomator.UiDevice.findObject java ...
private void openActivity() throws UiObjectNotFoundException { device.pressHome(); UiObject allAppsButton= device.findObject(new ...
Read more >Source Code for UiDevice.java - AndroidX Tech
package androidx.test.uiautomator; import android.accessibilityservice. ... throw new IllegalStateException("UiDevice singleton not initialized"); } return ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why is there no way for UiAutomation to automatically reconnect on disconnect?
I am also getting same issue, when running robo tests on Firebase Cloud test infrastructure.