activitywatch icon indicating copy to clipboard operation
activitywatch copied to clipboard

Parsec is not getting tracked by aw-watcher-window

Open SchittBull opened this issue 2 years ago • 4 comments

  • [x] I am on the latest ActivityWatch version.

  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

  • Windows 11 pro

  • ActivityWatch v0.12.2

Describe the bug

Since v0.12.1, parsec.app is not getting tracked anymore. it worked on v0.12.1 tested on 2 machines

To Reproduce

  1. install parsec.app
  2. have parsec active
  3. observe it not being tracked

Expected behavior

parsec being tracked like any other program

Documentation

an excerpt from the log that continues for ever like this:

2023-05-20 09:12:37 [INFO ]: aw-watcher-window started  (aw_watcher_window.main:62)
2023-05-20 09:12:38 [INFO ]: Connection to aw-server established by aw-watcher-window  (aw_client.client:436)
2023-05-20 09:12:38 [ERROR]: Exception thrown while trying to get active window  (aw_watcher_window.main:124)
Traceback (most recent call last):
  File "aw_watcher_window\main.py", line 106, in heartbeat_loop
  File "aw_watcher_window\lib.py", line 65, in get_current_window
  File "aw_watcher_window\lib.py", line 42, in get_current_window_windows
  File "aw_watcher_window\windows.py", line 26, in get_app_name
  File "aw_watcher_window\windows.py", line 15, in get_app_path
pywintypes.error: (5, 'OpenProcess', 'Access is denied.')
2023-05-20 09:12:39 [ERROR]: Exception thrown while trying to get active window  (aw_watcher_window.main:124)
Traceback (most recent call last):
  File "aw_watcher_window\main.py", line 106, in heartbeat_loop
  File "aw_watcher_window\lib.py", line 65, in get_current_window
  File "aw_watcher_window\lib.py", line 42, in get_current_window_windows
  File "aw_watcher_window\windows.py", line 26, in get_app_name
  File "aw_watcher_window\windows.py", line 15, in get_app_path
pywintypes.error: (5, 'OpenProcess', 'Access is denied.')

SchittBull avatar May 20 '23 07:05 SchittBull

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! 🙏

github-actions[bot] avatar May 20 '23 07:05 github-actions[bot]

Thanks for also adding the log :) It seems it's the same problem as in https://github.com/ActivityWatch/activitywatch/issues/873.


From https://github.com/ActivityWatch/activitywatch/issues/873#issuecomment-1555491837:

By reading the change log, the new version switched from WMI to Win32 API (https://github.com/ActivityWatch/aw-watcher-window/pull/83) to obtain a window in focus; I guess it fixed the issue of high CPU usage of WMI Provider Host. That should be the cause of the behaviour change.

It is expected for a program without elevated rights to be unable to access programs with elevated rights. But this might not be a desired behaviour of ActivityWatch.

BelKed avatar May 20 '23 09:05 BelKed

Is this Windows OS related ?

luzpaz avatar Nov 16 '23 22:11 luzpaz