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.

d.dump() missing views then stuck in bad state

See original GitHub issue

I keep hitting a bug where resource IDs suddenly disappear, even though the device state hasn’t changed and can verify in uiautomatorviewer. I’m able to reproduce the bug in as few lines as:

# At home screen of device tested
>>> from uiautomator import device as d
>>> d.server.stop()  # Make sure we are in a good state
>>> d(resourceId='android:id/navigationBarBackground).exists
True
>>> d.dump()  # Does not show the full view hierarchy, navigationBarBackground missing
>>> d(resourceId='android:id/navigationBarBackground').exists
False

At this point it will continue to return False until I restart the uiautomator server or kill the adb service.

To find a specific example, take a uiautomator dump with uiautomatorviewer first, then take one using the Python wrapper. Nodes that appear near the bottom of uiautomatorviewer do not always show up in d.dump().

Environment info

uiautomator: 0.2.6 device: Amazon Fire HD 6 OS: Ubuntu 14.04 LTS

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
kevin-brotckecommented, Apr 1, 2016

Note this isn’t reproducible by using d.dump(compressed=False). I think what’s happening is that AutomatorServiceImpl.dumpWindowHierarchy is setting device.setCompressedLayoutHeirarchy(compressed), but never changes it back to uncompressed. Once d.dump(compressed=True) is called, all calls after reuse device and return a compressed view hierarchy resulting in missing resource IDs.

0reactions
siva-kranthicommented, Sep 28, 2017

I am also facing same issue 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Namespace "stuck" as Terminating, How I removed it
Run the following command to view the namespaces that are stuck in the Terminating state: kubectl get namespaces · Select a terminating namespace ......
Read more >
Slow rendering - Android Developers
If your app suffers from slow UI rendering, then the system is forced to skip frames and the user will perceive stuttering in...
Read more >
Troubleshooting OSDs - Ceph Documentation
Troubleshooting OSDs . Before troubleshooting your OSDs, first check your monitors and network. If you execute ceph health or ceph -s on...
Read more >
Troubleshooting Control Center | Confluent Documentation
If you encounter issues during installation and setup, you can try these solutions. Bad security configuration¶. Check the security configuration for all ...
Read more >
Troubleshooting - NGINX Ingress Controller - Kubernetes
Gdb can be used to with nginx to perform a configuration dump. ... making it difficult to troubleshoot what is happening inside the...
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