Code Monkey home page Code Monkey logo

Comments (9)

JakeStanger avatar JakeStanger commented on June 9, 2024

Thanks for the detailed report. This is a strange one, I'm not sure what'd cause that from the above.

If you run with RUST_LOG=trace mpd-discord-rpc you should get a whole load of extra log output (your discord username will be in there near the beginning FYI). Could you retry with that and provide the full logs please, and hopefully that'll reveal something?

from mpd-discord-rpc.

ashprice avatar ashprice commented on June 9, 2024

Hmm. Today it is working. My guess is that it is something to do with multiple instances in some sense - my guess is that that error is it trying to connect to something, and finding it already in use? So maybe the process didn't terminate properly or fully for some reason.

This is just a guess, though, I don't really have much to support it...

I also sometimes have an issue where the track doesn't refresh, such that if I am listening to an album or playlist, my discord activity will show an 'activity' row on my profile for each previously played song, rather than only the currently playing song. I wonder if this is related.

I don't think sharing the log of the working instance will help, at least I don't see anything indicative of an error in there.

I will play around to try and reproduce either issue and get back to you.

from mpd-discord-rpc.

ashprice avatar ashprice commented on June 9, 2024

Actually, I do have one update. I don't know if this is the cause of the previous issue, as I cannot reproduce the systemctl output at all. But anyway, this is a silly one - you sensibly enforce a 120 character limit, and if it is longer the activity won't display. However, you are more sensible than some artists, perhaps. From my library for example, I have the Fiona Apple album:

'When the pawn hits the conflicts he thinks like a king What he knows throws the blows when he goes to the fight And he'll win the whole thing 'fore he enters the ring There's no body to batter when your mind is your might So when you go solo, you hold your own hand And remember that depth is the greatest of heights And if you know where you stand, then you know where to land And if you fall it won't matter, cuz you'll know that you're right'

Now, I don't know if it's better not to add support for such rare albums - I assume it is like that for security, but I don't know much about such topics - but I'll note that you have to restart the process to get the rich present output working again. Here is the log:

2024-02-03T18:01:12.370272Z TRACE client connection:run loop:iteration{state=WaitingForCommandReply}: mpd_client::client::connection: reached next command timeout, idling
2024-02-03T18:01:12.370305Z DEBUG client connection:run loop:iteration{state=WaitingForCommandReply}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:12.768222Z TRACE discord_presence::connection::manager: Sending message
2024-02-03T18:01:12.768249Z TRACE discord_presence::connection::base: -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":238811,\"activity\":{\"state\":\"Fiona Apple / When the Pawn Hits the Conflicts He Thinks Like a King What He Knows Throws the Blows When He Goes to the Fight and He’ll Win the Whole Thing ’Fore He Enters the Ring There’s No Body to Batter When Your Mind Is Your Might So When You Go Solo, You Hold Your Own Hand and Remember That Depth Is the Greatest of Heights and If You Know Where You Stand, Then You Know Where to Land and If You Fall It Won’t Matter, Cuz You’ll Know That You’re Right\",\"details\":\"Limp\",\"timestamps\":{\"start\":1706983268},\"assets\":{\"large_image\":\"https://coverartarchive.org/release/e1f7b079-46d7-4ca3-b878-d6ed6a0d34b2/front-250\"}}},\"nonce\":\"c00d9d48-5214-46f9-a067-483ed3826a29\"}" }
2024-02-03T18:01:12.768267Z TRACE discord_presence::connection::manager: Sent message
2024-02-03T18:01:12.768270Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:13.268346Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:13.268366Z TRACE discord_presence::connection::base: Received 258 bytes
2024-02-03T18:01:13.268371Z TRACE discord_presence::connection::base: <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"code\":4000,\"message\":\"child \\\"activity\\\" fails because [child \\\"state\\\" fails because [\\\"state\\\" length must be less than or equal to 128 characters long]]\"},\"evt\":\"ERROR\",\"nonce\":\"c00d9d48-5214-46f9-a067-483ed3826a29\"}" }
2024-02-03T18:01:13.268380Z TRACE discord_presence::connection::manager: Received from connection
2024-02-03T18:01:13.268389Z TRACE discord_presence::connection::manager: Received payload
2024-02-03T18:01:13.268392Z TRACE discord_presence::connection::manager: Got event
2024-02-03T18:01:13.768478Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:14.268569Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:14.768658Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:15.268741Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:15.768838Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:16.268923Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:16.769020Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:17.098290Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:17.098317Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:17.098329Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:17.098336Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:17.098347Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:17.098352Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:17.098387Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:17.269104Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:17.287626Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:17.287650Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:17.287663Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:17.287668Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:17.287677Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:17.287684Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:17.287718Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:17.467960Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:17.467986Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:17.467996Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:17.468001Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:17.468010Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:17.468018Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:17.468050Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:17.769202Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:17.795813Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:17.795839Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:17.795850Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:17.795856Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:17.795869Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:17.795876Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:17.795911Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:18.088136Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:18.088159Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:18.088168Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:18.088173Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:18.088182Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:18.088186Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:18.088219Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:18.269301Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:18.474977Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:18.475002Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:18.475012Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:18.475018Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:18.475031Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:18.475039Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:18.475078Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:18.769393Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:19.217800Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:19.217820Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:19.217829Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:19.217833Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:19.217842Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:19.217849Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:19.217906Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:19.269478Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:19.565139Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:19.565160Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:19.565169Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:19.565174Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:19.565184Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:19.565191Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:19.565226Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:19.565255Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:01:19.565265Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:01:19.565273Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:19.565280Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:19.565289Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:19.565295Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:01:19.565314Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:19.566282Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=18
2024-02-03T18:01:19.566288Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="mixer"
2024-02-03T18:01:19.566294Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:01:19.566298Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:01:19.566304Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:01:19.566310Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Mixer
2024-02-03T18:01:19.566330Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:01:19.769564Z TRACE discord_presence::connection::manager: Receiving from connection
2024-02-03T18:01:20.269652Z TRACE discord_presence::connection::manager: Receiving from connection

Here I played a song from this album, and then tried skipping to a track by a different artist and in an album with a saner title length. Here I tried it again with a fresh process (this is the output from hitting 'skip' onwards, so misses the aforegoing error):

2024-02-03T18:07:48.309724Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:07:48.309745Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:07:48.309752Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:07:48.309757Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:07:48.309764Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:07:48.309768Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:07:48.309810Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:07:48.309829Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=19
2024-02-03T18:07:48.309833Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="player"
2024-02-03T18:07:48.309838Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:07:48.309841Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:07:48.309845Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:07:48.309849Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Player
2024-02-03T18:07:48.309861Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5
2024-02-03T18:07:48.310979Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: read=18
2024-02-03T18:07:48.310984Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: parsed field key="changed" value="mixer"
2024-02-03T18:07:48.310989Z TRACE client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::response: finished response
2024-02-03T18:07:48.310993Z DEBUG client connection:run loop:iteration{state=Idling}:receive: mpd_protocol::connection: received complete response frames=1 fields=1 error=false
2024-02-03T18:07:48.310998Z TRACE client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: handling idle response
2024-02-03T18:07:48.311002Z DEBUG client connection:run loop:iteration{state=Idling}: mpd_client::client::connection: state change subsystem=Mixer
2024-02-03T18:07:48.311015Z DEBUG client connection:run loop:iteration{state=Idling}:send{command=Command(b"idle")}: mpd_protocol::connection: sent command length=5

I don't know if this should be intended handling - I'd think one would expect the process to terminate and throw up an error or to go back to regular functionality (and maybe giving a warning).

from mpd-discord-rpc.

ashprice avatar ashprice commented on June 9, 2024

Not a very helpful update, but I had the multiple track issue today, using the systemd daemon. Stopping, running from the terminal, and/or restarting with systemctl caused the issue to go away. The journalctl output is pretty uninformative:

Feb 04 09:41:51 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:51.196176Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:51 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:51.697266Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:52 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:52.270159Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:52 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:52.771358Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:53 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:53.272907Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:53 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:53.774150Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:54 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:54.282079Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:54 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:54.793029Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:55 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:55.695276Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:56 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:56.196953Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:56 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:56.698062Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:57 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:57.270869Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:57 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:57.772033Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:58 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:58.273654Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:58 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:58.774862Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:59 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:59.282773Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:41:59 hearth mpd-discord-rpc[58387]: 2024-02-04T09:41:59.793663Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:42:00 hearth mpd-discord-rpc[58387]: 2024-02-04T09:42:00.695939Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:45:49 hearth mpd-discord-rpc[58387]: 2024-02-04T09:45:49.900622Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:50:57 hearth mpd-discord-rpc[58387]: 2024-02-04T09:50:57.518553Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:53:15 hearth mpd-discord-rpc[58387]: 2024-02-04T09:53:15.896644Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:53:16 hearth mpd-discord-rpc[58387]: 2024-02-04T09:53:16.459206Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:53:20 hearth mpd-discord-rpc[58387]: 2024-02-04T09:53:20.092872Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:53:20 hearth mpd-discord-rpc[58387]: 2024-02-04T09:53:20.960015Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:53:40 hearth mpd-discord-rpc[58387]: 2024-02-04T09:53:40.092874Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:53:40 hearth mpd-discord-rpc[58387]: 2024-02-04T09:53:40.962732Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:15 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:15.027300Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:15 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:15.967731Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:34 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:34.066240Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:34 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:34.970406Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:39 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:39.315534Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:45 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:45.093819Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:45 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:45.972029Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:58 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:58.093841Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:54:58 hearth mpd-discord-rpc[58387]: 2024-02-04T09:54:58.973846Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:55:02 hearth mpd-discord-rpc[58387]: 2024-02-04T09:55:02.326180Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:55:02 hearth mpd-discord-rpc[58387]: 2024-02-04T09:55:02.974408Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 09:57:57 hearth mpd-discord-rpc[58387]: 2024-02-04T09:57:57.707227Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:00:24 hearth mpd-discord-rpc[58387]: 2024-02-04T10:00:24.457043Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:03:55 hearth mpd-discord-rpc[58387]: 2024-02-04T10:03:55.055623Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:03:55 hearth mpd-discord-rpc[58387]: 2024-02-04T10:03:55.557167Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:05:03 hearth mpd-discord-rpc[58387]: 2024-02-04T10:05:03.839462Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:08:04 hearth mpd-discord-rpc[58387]: 2024-02-04T10:08:04.566130Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:12:55 hearth mpd-discord-rpc[58387]: 2024-02-04T10:12:55.885809Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:12:56 hearth mpd-discord-rpc[58387]: 2024-02-04T10:12:56.642315Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:13:01 hearth mpd-discord-rpc[58387]: 2024-02-04T10:13:01.094071Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:13:01 hearth mpd-discord-rpc[58387]: 2024-02-04T10:13:01.643046Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:20:09 hearth mpd-discord-rpc[58387]: 2024-02-04T10:20:09.039245Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:20:52 hearth mpd-discord-rpc[58387]: 2024-02-04T10:20:52.271426Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:22:20 hearth mpd-discord-rpc[58387]: 2024-02-04T10:22:20.059494Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:23:19 hearth mpd-discord-rpc[58387]: 2024-02-04T10:23:19.446199Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:26:33 hearth mpd-discord-rpc[58387]: 2024-02-04T10:26:33.750833Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:31:38 hearth mpd-discord-rpc[58387]: 2024-02-04T10:31:38.768148Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:34:19 hearth mpd-discord-rpc[58387]: 2024-02-04T10:34:19.635998Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:39:05 hearth mpd-discord-rpc[58387]: 2024-02-04T10:39:05.812249Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:39:06 hearth mpd-discord-rpc[58387]: 2024-02-04T10:39:06.458609Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 10:41:13 hearth mpd-discord-rpc[58387]: 2024-02-04T10:41:13.996395Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:05:35 hearth systemd[1491]: mpd-discord-rpc.service: Consumed 2.547s CPU time, 13.4M memory peak, 0B memory swap peak.
Feb 04 11:06:24 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:24.707511Z  INFO connect: mpd_protocol::connection: connected successfully version="0.23.5"
Feb 04 11:06:24 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:24.707540Z  INFO mpd_utils::persistent_client: Connected to 'localhost:6600'
Feb 04 11:06:25 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:25.214861Z  INFO mpd_discord_rpc: Connected to Discord
Feb 04 11:06:26 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:26.215241Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:06:28 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:28.283812Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:06:29 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:29.256923Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:06:36 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:36.011768Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:06:36 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:36.717260Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:06:41 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:41.449431Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:06:51 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:51.455488Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:06:53 hearth mpd-discord-rpc[354157]: 2024-02-04T11:06:53.168440Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:09:45 hearth mpd-discord-rpc[354157]: 2024-02-04T11:09:45.564697Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:09:48 hearth mpd-discord-rpc[354157]: 2024-02-04T11:09:48.870973Z  INFO mpd_discord_rpc: Detected change, updating status
Feb 04 11:11:40 hearth mpd-discord-rpc[355437]: 2024-02-04T11:11:40.207164Z  INFO connect: mpd_protocol::connection: connected successfully version="0.23.5"
Feb 04 11:11:40 hearth mpd-discord-rpc[355437]: 2024-02-04T11:11:40.207190Z  INFO mpd_utils::persistent_client: Connected to 'localhost:6600'
Feb 04 11:11:40 hearth mpd-discord-rpc[355437]: 2024-02-04T11:11:40.712027Z  INFO mpd_discord_rpc: Connected to Discord

I have edited the systemctl daemon to run with the rust debug output, so hopefully I'll catch something about either issue soon.

Edit: Nevermind, it doesn't like that. I'll try running from the terminal henceforth and catching it that way...

from mpd-discord-rpc.

JakeStanger avatar JakeStanger commented on June 9, 2024

My guess is that it is something to do with multiple instances in some sense

Sometimes Discord can be a bit funny about multiple RPC clients connected at once, but it should work. There's nothing that explicitly shouldn't, at least.

I also sometimes have an issue where the track doesn't refresh, such that if I am listening to an album or playlist, my discord activity will show an 'activity' row on my profile for each previously played song, rather than only the currently playing song. I wonder if this is related.

I would expect errors to appear if this was from the client. Probably more likely this is Discord playing up (this more than likely could be related to multiple clients running, especially if one goes wonky).

you sensibly enforce a 120 character limit

Not me :p This looks like a hard limit on Discord's side, and it "crashes" as a result of the error response from the RPC server. I should be able to clamp input to just show ... after a max length to resolve that at least though.


Apart from the length error, the logs don't show a lot that'd suggest anything out of the ordinary unfortunately. It's possible if you were hitting that, and then the client continued running for long enough, you'd fill the channel and hit the error in the initial post. I'll patch that and get a release out, and we can see how it goes from there I guess.

from mpd-discord-rpc.

JakeStanger avatar JakeStanger commented on June 9, 2024

If you're able to try that PR, let me know how that works for you

from mpd-discord-rpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.