Error obtaining UI hierarchy error – UI Automator Viewer

While taking the Device Screenshot (uiautomator dump) on UI Automator Viewer if you receive the below error

Error obtaining UI hierarchy
Reason:
Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncException:
Remote object dosen’t exist!
screenshoterror
  • The first option is to shutdown your appium server by pressing CTRL + C and then press y to Terminate batch job.
  • The other solution is to kill the adb server and start again. Run the below commands in cmd to restart the adb server
adb kill-server
adb start-server

 

adbrestart

Join Discussion

This site uses Akismet to reduce spam. Learn how your comment data is processed.