Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mpd-discord-rpc.service doesn't reconnect if discord is restarted. #138

Open
codeiimon opened this issue Jun 17, 2024 · 2 comments
Open

Comments

@codeiimon
Copy link

codeiimon commented Jun 17, 2024

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.

It also runs this indefinitely, creating a massive journalctl log file full of errors. I'm not sure if that was the intention, but it'd be nice if there was a cleaner implementation.

I'm Currently on NixOS 24.05.

@codeiimon codeiimon changed the title mpd-discord-rpc.service doesn't connect if discord is restarted. mpd-discord-rpc.service doesn't reconnect if discord is restarted. Jun 17, 2024
@42willow
Copy link

42willow commented Nov 2, 2024

I'm also on 24.05 with mpd-discord-rpc v1.7.2

For me it automatically reconnects to discord after the client is launched but uses a huge amount of processing power and creates the errors you described indefinitely when the discord client is not running
image

image

When discord is running it is fine though.
Seems to be related to #137

@JakeStanger
Copy link
Owner

JakeStanger commented Nov 16, 2024

This does not occur for me on v1.7.3 or latest -git. The discord-presence crate responsible for (re-)connecting was updated several times during this period. Can you ensure you are on the latest version and check if this is still an issue please.

EDIT: CPU problems were resolved, looks like it does not reliably re-connect on -git so looking at that now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants