title: Getting java.lang.reflect.InvocationTargetException while taking screenshot from UI Automation Viewer
body: <p>While taking a screenshot from UI Automation Viewer, getting the error--</p>
  
  <blockquote>
    <p>Error obtaining UI hierarchy  Reason: Unexpected error while obtaining
    UI hierarchy Details: java.lang.reflect.InvocationTargetException</p>
  </blockquote>
  
  <p>Please note that Appium server is stopped (Application closed)</p>