Closed stephane-klein closed 8 months ago
Hello!
DB worker quitting, error: RecvError
This is kind of normal (needs fixing but no effect on the functionality), it's always thrown after the program exists. What's really happening, I assume, it is that the program can't find protocol to work with. Could you please turn on more verbose logging with -vvv
option and give the logs?
Also, for Gnome, do you have the prerequisites from the readme installed? Although, if it is able to work in different conditions, I guess it's installed.
@2e3s thanks 🤗.
Could you please turn on more verbose logging with -vvv option and give the logs?
Yes, here is log with -vvv
option:
janv. 21 08:35:56 t14s awatcher[15641]: [2024-01-21 07:35:56.801234 ERROR watchers::watchers] Error on active window iteration: DBus interface org.gnome.shell.extensions.FocusedWindow returned wrong JSON
janv. 21 08:35:57 t14s awatcher[15641]: [2024-01-21 07:35:57.805963 ERROR watchers::watchers] Error on active window iteration: DBus interface org.gnome.shell.extensions.FocusedWindow returned wrong JSON
janv. 21 08:35:58 t14s awatcher[15641]: [2024-01-21 07:35:58.813876 ERROR watchers::watchers] Error on active window iteration: DBus interface org.gnome.shell.extensions.FocusedWindow returned wrong JSON
janv. 21 08:35:59 t14s awatcher[15641]: [2024-01-21 07:35:59.817045 ERROR watchers::watchers] Error on active window iteration: DBus interface org.gnome.shell.extensions.FocusedWindow returned wrong JSON
janv. 21 08:36:01 t14s awatcher[15641]: [2024-01-21 07:36:01.362594 ERROR watchers::watchers] Error on active window iteration: org.freedesktop.DBus.Error.NoReply: Remote peer disconnected
janv. 21 08:36:01 t14s awatcher[15641]: thread '<unnamed>' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ksni-0.2.1/src/service.rs:85:37:
janv. 21 08:36:01 t14s awatcher[15641]: called `Result::unwrap()` on an `Err` value: D-Bus error: Failed to read/write data, disconnected from D-Bus? (org.freedesktop.DBus.Error.Failed)
janv. 21 08:36:01 t14s awatcher[15641]: note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
janv. 21 08:36:01 t14s awatcher[15641]: [2024-01-21 07:36:01.399131 ERROR aw_datastore::worker] DB worker quitting, error: RecvError
janv. 21 08:36:01 t14s systemd[3719]: awatcher.service: Consumed 15.355s CPU time.
Also, for Gnome, do you have the prerequisites from the readme installed?
Yes, I assume it's about: https://extensions.gnome.org/extension/5592/focused-window-d-bus/ ?
Yes, I assume it's about: extensions.gnome.org/extension/5592/focused-window-d-bus ?
Yes.
I have no error.
I assume, the tray icon and the web UI work ok and applications are tracked in this case?
org.gnome.shell.extensions.FocusedWindow returned wrong JSON
Not enough logging here https://github.com/2e3s/awatcher/blob/main/watchers/src/watchers/gnome_window.rs#L41 I will enhance the logging, but what I suspect from your initial description, it is that Gnome extension doesn't have time to load before awatcher starts.
I think it's related to https://github.com/2e3s/awatcher/issues/8 . I'm trying to recreate your setup locally thanks for your thorough description.
I've added this to the service file and it seems to work:
ExecStartPre=/bin/sleep 5
It posted 1 time Error on active window iteration: DBus interface org.gnome.shell.extensions.FocusedWindow returned wrong JSON
, I'll look to know why, but then went on tracking normally (My setup is a freshly installed Ubuntu 23.10 on VM).
I think it's related to https://github.com/2e3s/awatcher/issues/8 .
Yes :+1:
I've attempted to improve the convenience with this change: https://github.com/2e3s/awatcher/releases/tag/v0.2.4-alpha2 However, it's appropriate only for Gnome Tweaks which seems to work for me. I've added a description to autostart https://github.com/2e3s/awatcher/commit/94de477f3fafba68c731bda964b09279a282fde0 Please close the issue if autostart works for you.
Systemd may require to sleep for a few seconds (
ExecStartPre=/bin/sleep 5
) in order to wait for the environment.
This method is working on my laptop.
Then, I close the issue.
Hello,
I have installed awatcher with this script.
I have setup this systemctl service
~/.config/systemd/user/awatcher.service
:I have enabled this service :
When my Fedora 39, Gnome 45.3 (Wayland) session start, I have this error:
I don't understand why I have "DB worker quitting, error: RecvError" error 🤔.
If I execute:
I have no error.
At the moment, I don't know what direction to look in to correct this problem.
If you have an idea, I'd love to hear from you.
Best regards, Stéphane