ActivityWatch / activitywatch

The best free and open-source automated time tracker. Cross-platform, extensible, privacy-focused.
https://activitywatch.net/
Mozilla Public License 2.0
11.32k stars 512 forks source link

After 0.12.1 -> 0.13.1 update "Activity" page doesn't show AFK/Window/Browser events #1076

Open AlexanderMakarov opened 2 weeks ago

AlexanderMakarov commented 2 weeks ago

Describe the bug

After updating from v0.12.1 to v0.13.1 on http://localhost:5600/#/activity/host_name/view/ nothing is displayed in "Summary", "Window", "Browser" tabs. Only "Editor" tab shows data.

While on http://localhost:5600/#/timeline I see all events, there are window and AFK events in http://localhost:5600/#/buckets. Other pages also work. From errors in log I see only Gtk-Message: 09:31:31.782: Failed to load module "xapp-gtk3-module" which doesn't look relevant.

Default configuration in "/home/user/.config/activitywatch" (everything is commented out). Default Views configuration on http://localhost:5600/#/activity/host_name/view/

To Reproduce

  1. Use 0.12.1 version some time. Installed from sources.
  2. Download https://github.com/ActivityWatch/activitywatch/releases/download/v0.13.1/activitywatch-v0.13.1-linux-x86_64.zip
  3. Remove "/home/user/activitywatch/" and unpack ZIP into it.
  4. Run /home/user/activitywatch/./aw-qt and go to http://localhost:5600/#/activity/host_name/view/

Expected behavior

image (from old v0.12.1 which I have to revert back)

Actual behavior

image

Documentation

Additional context

github-actions[bot] commented 2 weeks ago

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

qcol commented 2 weeks ago

It's the same with me. At first it didn't show any data, I changed to server-rust (I used that before), after restart it shows the old data but doesn't register new data. Ubuntu 22.04 (xubuntu).

qcol commented 2 weeks ago

In my case the xapp is installed, so this is probably not the cause (I don't see such an error in the logs).

qcol commented 2 weeks ago

It's the same with me. At first it didn't show any data, I changed to server-rust (I used that before), after restart it shows the old data but doesn't register new data. Ubuntu 22.04 (xubuntu).

edit: sorry, events are recorded! (I see it in Timeline, However, I do not see them in the main chart view. Exactly the same as Alexander) . edit 2: in Timeline it is web-chrome watcher, not window

Interestingly, in the log I have that the process has been killed. This makes it all the more strange, as events do register though.

2024-06-21 09:04:11 [INFO ]: aw-watcher-window started  (aw_watcher_window.main:62)
2024-06-21 09:04:12 [INFO ]: window-watcher stopped because parent process died  (aw_watcher_window.main:101)
2024-06-21 09:04:12 [INFO ]: Connection to aw-server established by aw-watcher-window  (aw_client.client:447)

If I go back to 0.12.16beta which worked fine, now the charts don't display to me either (blank).

Isn't this related to the fact that settings are now saved differently?

image

It is possible that the problem is related to the XFCE Environment (as well as the icon in the tray, which I also cannot get for several versions)

qcol commented 1 week ago

I have found the solution! I had forgotten that I was using the scripts for Gnome in the previous version: https://docs.activitywatch.net/en/latest/running-on-gnome.html#running-on-gnome

These scripts also apply to XFCE-based environments (e.g. Xubuntu)

The problem is probably related to the tray icon which I could never get in the last versions either. Therefore activitywatch also works run with the --no-gui option, as described here: https://github.com/ActivityWatch/activitywatch/issues/960#issuecomment-1867638079

AlexanderMakarov commented 1 week ago

Therefore activitywatch also works run with the --no-gui option, as described here: #960 (comment)

Unfortunately it is not related issue. At least I've tried and it didn't work.

Because I don't see logs

window-watcher stopped
afkwatcher stopped

They are actually working - I may see events in "Timeline". But I can't see events on "Activity" page (except "Editor" ones). Issue is just in this page, not in the events gathering/filtering system.

Humam-Hamdan commented 1 week ago

had the same issue, tried it without waylad... it worked. (ubuntu 24.04 LTS)

Pineapplenuts commented 1 week ago

I have similar issue where it doesn't detect browser usage and considers in browser streaming content as away from keyboard resulting in everything being inaccurate. Also how did you downgrade? I use the Aur package on manjaro