m4tx / tundra

MyAnimeList scrobbler for Linux
https://tundra.moe
GNU General Public License v3.0
52 stars 2 forks source link

D-Bus error in daemon mode when there is no notification daemon running in the OS #66

Closed ghost closed 1 year ago

ghost commented 1 year ago

I use arch linux with icewmi using tundra-git aur package, this is the mkv file Yamada-kun to Lv999 no Koi wo Suru - 01.mkv, I was running tundra daemon only Error: Error { kind: Dbus(D-Bus 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. (org.freedesktop.DBus.Error.NoReply)) }

m4tx commented 1 year ago

This sounds like your mpv-mpris installation issue (or DBus issue on your system, which is rather unlikely). I double-checked this on my Arch Linux installation (using GNOME, but this shouldn't make much of a difference) and the daemon mode seems to be working fine with mpv.

Can you please check if other software using mpris works appropriately? For example, try checking with playerctl if it returns any data for you, like so: playerctl -a metadata.

ghost commented 1 year ago

@m4tx I installed mpv-mpris package with yay it should not be problem here is the output you wanted, guess its dbus problem

mpv   xesam:url                 file:///home/tbb/Anime/%5BOne%20Pace%5D%5B525-548%5D%20Impel%20Down%20%5B720p%5D/%5BOne%20Pace%5D%5B525-526%5D%20Impel%20Down%2001%20%5B720p%5D%5B479D510C%5D.mkv
mpv   mpris:trackid             '/0'
mpv   xesam:title               [One Pace][525-526] Impel Down 01 [720p][479D510C].mkv
mpv   mpris:length              1654403000
ghost commented 1 year ago

I forgot to enable dunst I solved problem but what does it mean?

CRITICAL: Source ID 16 was not found when attempting to remove it
2023-05-08 15:16:06 [INFO] [tundra::app] Checking active players
2023-05-08 15:16:06 [INFO] [tundra::app] Found an active player: mpv, playing Yamada-kun to Lv999 no Koi wo Suru season 1 episode 2
2023-05-08 15:16:26 [INFO] [tundra::app] Checking active players
2023-05-08 15:16:26 [INFO] [tundra::app] Found an active player: mpv, playing Yamada-kun to Lv999 no Koi wo Suru season 1 episode 2
2023-05-08 15:16:26 [INFO] [tundra::app] Scrobbling Yamada-kun to Lv999 no Koi wo Suru episode 2 / 13
CRITICAL: Source ID 19 was not found when attempting to remove it
m4tx commented 1 year ago

I see, so the problem was missing notification daemon. Tundra definitely shouldn't fail when there is no notification daemon running though (or at least it should produce better error messages), so it makes sense to have this ticket open for now.

Does this "Source ID xxx was not found when attempting to remove it" error affect you in any way? It's produced by Glib/GTK (which is perhaps worth investigating too, as the daemon mode shouldn't run much of the GTK code), but I think it shouldn't cause any problems normally.

ghost commented 1 year ago

@m4tx no, It was working great, should I close the issue?

m4tx commented 1 year ago

I've modified the error handling code so that a proper message is displayed when there is no notification daemon running and the Tundra daemon does not exit when such an error occurs. I think the issue can be closed now.