-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add preexec hook to wait for accessibility #10
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On some machines, accessibility framework (normally used to enable accessibility features for GUIs, but in anabot also used to access Anaconda GUI state programatically) may take long to start. This can result in anabot failing to access the accessibility framework and crashing with gi.repository.GLib.GError like this: Traceback (most recent call last): File "/opt/launcher.py", line 6, in <module> sys.exit(anabot.launcher.main(*sys.argv)) File "/opt/anabot/launcher.py", line 148, in main run_test("/var/run/anabot/final-recipe.xml", appname=app_name, children_required=min_children) File "/opt/anabot/runtime/run_test.py", line 27, in run_test import dogtail.tree # pylint: disable=import-error File "/opt/lib/python3.9/site-packages/dogtail/tree.py", line 1338, in <module> children = root.children File "/opt/lib/python3.9/site-packages/dogtail/tree.py", line 236, in children if self.parent and self.parent.roleName == 'hyper link': gi.repository.GLib.GError: atspi_error: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. (1) This hook is designed to try and connect to the accessibility bus before anabot is started, and keep trying until the connection succeeds or we run out of attempts. See the embedded comment for more details.
58cc7a3
to
3939986
Compare
Now anabot crashes with this:
Edit: the above is probably irrelevant and caused by something else. (I was trying to |
...confirmed, after dumbing down the So indeed: |
On some machines, accessibility framework (normally used to enable accessibility features for GUIs, but in anabot also used to access Anaconda GUI state programatically) may take long to start. This can result in anabot failing to access the accessibility framework and crashing with gi.repository.GLib.GError like this:
This hook is designed to try and connect to the accessibility bus before anabot is started, and keep trying until the connection succeeds or we run out of attempts.
See the embedded comment for more details.