nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
7.11k stars 1.83k forks source link

bug: mpd-discord-rpc.service doesn't reconnect if discord is restarted. #5538

Open codeiimon opened 5 months ago

codeiimon commented 5 months ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

When the mpd-discord-rpc is enabled, the doesn't automatically connect to discord if it is run after or if the client is restarted. Rather systemctl --user status restart mpd-discord-rpc.service outputs this error:

Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715461Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715486Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715507Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715527Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715548Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715570Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715592Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715614Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715635Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jun 14 12:54:50 nixos mpd-discord-rpc[243427]: 2024-06-14T18:54:50.715656Z ERROR discord_presence::connection::manager: Failed to connect: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })

The current way i fix this is by restarting the service with discord using the command vesktop %U '&&' systemctl --user restart mpd-discord-rpc.service. Its a bit hacky tho, and I would rather not have to do this.

Maintainer CC

@Kranzes

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.6.32, NixOS, 24.05 (Uakari), 24.05.20240609.2819fff`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - nixpkgs: `/nix/store/giq1qbcwfx5gq0g9jf6id0b3m55a860j-source`
stale[bot] commented 2 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.