Skip to content
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

aw-watcher-windows: Broken pipe #756

Closed
2 tasks done
ivanpondal opened this issue Jul 6, 2022 · 6 comments · Fixed by ActivityWatch/aw-watcher-window#73
Closed
2 tasks done

aw-watcher-windows: Broken pipe #756

ivanpondal opened this issue Jul 6, 2022 · 6 comments · Fixed by ActivityWatch/aw-watcher-window#73

Comments

@ivanpondal
Copy link

  • I am on the latest ActivityWatch version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • OS name and version: Fedora 36
  • ActivityWatch version: 0.11.0

Describe the bug

aw-watcher-windows crashed and stopped reporting metrics.

To Reproduce

Have not tried reproducing it yet.

Expected behavior

Ideally, aw-watcher-windows should restart. Maybe have a systemd unit config or similar.

Documentation

aw-watcher-window logs:

2022-07-06 15:34:20 [INFO ]: aw-watcher-window started  (aw_watcher_window.main:51)
2022-07-06 15:34:21 [INFO ]: Connection to aw-server established by aw-watcher-window  (aw_client.client:417)
2022-07-06 15:45:34 [ERROR]: Exception thrown while trying to get active window: Display connection closed by server: [Errno 32] Broken pipe  (aw_watcher_window.main:74)
2022-07-06 15:45:34 [ERROR]: Unhandled exception  (root:43)
Traceback (most recent call last):
  File "Xlib/protocol/display.py", line 583, in send_and_recv
BrokenPipeError: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aw_watcher_window/main.py", line 71, in heartbeat_loop
  File "aw_watcher_window/lib.py", line 53, in get_current_window
  File "aw_watcher_window/lib.py", line 8, in get_current_window_linux
  File "aw_watcher_window/xlib.py", line 37, in get_current_window
  File "aw_watcher_window/xlib.py", line 20, in _get_current_window_id
  File "Xlib/xobject/drawable.py", line 472, in get_full_property
  File "Xlib/xobject/drawable.py", line 455, in get_property
  File "Xlib/protocol/rq.py", line 1369, in __init__
  File "Xlib/protocol/rq.py", line 1381, in reply
  File "Xlib/protocol/display.py", line 586, in send_and_recv
Xlib.error.ConnectionClosedError: Display connection closed by server: [Errno 32] Broken pipe

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "aw_watcher_window/__main__.py", line 3, in <module>
  File "aw_watcher_window/main.py", line 55, in main
  File "aw_watcher_window/main.py", line 77, in heartbeat_loop
  File "traceback.py", line 163, in print_exc
  File "traceback.py", line 105, in print_exception
OSError: [Errno 5] Input/output error
2022-07-06 15:45:34 [ERROR]: Unhandled exception  (root:43)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
OSError: [Errno 5] Input/output error
@github-actions
Copy link

github-actions bot commented Jul 6, 2022

Hi there!
As you're new to this repo, please make sure you've used an appropriate issue template and searched for duplicates (it helps us focus on actual development!). We'd also like to suggest that you read our contribution guidelines and our code of conduct.
Thanks a bunch for opening your first issue! 🙏

@ivanpondal ivanpondal changed the title aw-watcher-window: Broken pipe aw-watcher-windows: Broken pipe Jul 6, 2022
@ivanpondal
Copy link
Author

Will add information if I'm able to reproduce it.

@ErikBjare
Copy link
Member

ErikBjare commented Jul 7, 2022

This is probably (indirectly) caused by ActivityWatch/aw-qt#49

@asukaminato0721
Copy link

I met the same problem. But this is crazy.

image

➜ wc --lines aw-watcher-window_2022-09-30T15-17-22.log
1122329536 aw-watcher-window_2022-09-30T15-17-22.log

@ErikBjare
Copy link
Member

@wuyudi Holy moly. Sorry about that.

PRs welcome! (I'm afraid I'll keep procrastinating on this otherwise)

@ErikBjare
Copy link
Member

The following PRs should make sure this never happens again:

Thanks for reporting @ivanpondal & @wuyudi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants