question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Could not detect idle state.

See original GitHub issue

The problem

The issue is not visible in tests or ui, but when viewing logcat we’re inundated with the following stack over and over

W/UiAutomatorBridge( 5793): Could not detect idle state. W/UiAutomatorBridge( 5793): java.util.concurrent.TimeoutException: No idle state with idle timeout: 500 within global timeout: 10000 W/UiAutomatorBridge( 5793): at android.app.UiAutomation.waitForIdle(UiAutomation.java:590) W/UiAutomatorBridge( 5793): at com.android.uiautomator.core.UiAutomatorBridge.waitForIdle(UiAutomatorBridge.java:96) W/UiAutomatorBridge( 5793): at com.android.uiautomator.core.UiAutomatorBridge.waitForIdle(UiAutomatorBridge.java:91) W/UiAutomatorBridge( 5793): at com.android.uiautomator.core.QueryController.findAccessibilityNodeInfo(QueryController.java:143) W/UiAutomatorBridge( 5793): at com.android.uiautomator.core.QueryController.findAccessibilityNodeInfo(QueryController.java:138) W/UiAutomatorBridge( 5793): at com.android.uiautomator.core.UiObject.findAccessibilityNodeInfo(UiObject.java:168) W/UiAutomatorBridge( 5793): at com.android.uiautomator.core.UiObject.waitForExists(UiObject.java:848) W/UiAutomatorBridge( 5793): at com.android.uiautomator.core.UiObject.exists(UiObject.java:899) W/UiAutomatorBridge( 5793): at io.appium.android.bootstrap.utils.TheWatchers.isDialogPresent(TheWatchers.java:51) W/UiAutomatorBridge( 5793): at io.appium.android.bootstrap.utils.TheWatchers.check(TheWatchers.java:42) W/UiAutomatorBridge( 5793): at io.appium.android.bootstrap.SocketServer$1.run(SocketServer.java:140) W/UiAutomatorBridge( 5793): at java.util.Timer$TimerImpl.run(Timer.java:284)

Environment

  • Appium version: 1.6.4
  • Node.js version: 6.10.3
  • Mobile platform/version under test: Android api-22
  • Real device or emulator/simulator: Emulator
  • Appium CLI

Details

I saw this error listed as https://github.com/appium/appium/issues/5764. But the answer was upgrade to appium 1.5.0

Link to Appium logs

https://gist.github.com/bennid/7e512d17878c13cf59bddf6d88324ad9

Code To Reproduce Issue [ Good To Have ]

I have not been able to narrow this down to a general reproduction issue, and my code is large and proprietary unfortunatelly. I will attach more information if I get down to it

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Mcflicommented, Oct 5, 2017

Also having this issue using UiAutomator2 with Android running Appium 1.7.1. Are there any updates on this?

0reactions
lock[bot]commented, Aug 4, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

UI Automator shows error upon capturing one of a screen ...
it comes up with this: C:\Users\waqas.ahmed>adb exec-out uiautomator dump /dev/tty ERROR: could not get idle state.
Read more >
Appium is looking for element for a long time - Issues/Bugs
W/UiAutomatorBridge( 3962 ): Could not detect idle state. W/UiAutomatorBridge( 3962): java.util.concurrent.TimeoutException: No idle state ...
Read more >
src/com/android/uiautomator/core/UiAutomatorBridge.java
This is the maximum time the automation will wait for the UI to go idle. Execution ... Log.w(LOG_TAG, "Could not detect idle state.",...
Read more >
Could not detect idle state. -
The problem. The issue is not visible in tests or ui, but when viewing logcat we're inundated with the following stack over and...
Read more >
Detect when your android application is idle
The reason why I did this is because we'll not want to write code in all our activities where we need to detect...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found