Appium 1.5.3 / 1.6: Elements of some screens are not accessible - ERROR: error:java.lang.RuntimeException: Failed to Dump Window Hierarchy

Hey Guys,

I am facing this error on Appium server:
error:java.lang.RuntimeException: Failed to Dump Window Hierarchy
when I try to check the visibility of elements for some screens of my App.

Do you have an idea of what’s is wrong?
I also see this same error when I launch the appium inspector and try to inspect the screen in failure:

Appium UI logs:

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Command returned error:java.lang.RuntimeException: Failed to Dump Window Hierarchy

[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {“status”:13,“value”:“Failed to Dump Window Hierarchy”}
_[debug] [AndroidBootstrap] Received command result from bootstrap

Environment;

  • Mac OS X 10.11.6
  • Testing a Native Android App on real device ( S5 -5.0 and S4 - 4.4.4)
  • Appium 1.6 and 1.5.3 for the inspector
  • Java 1.8/Maven/testNg