[GH-ISSUE #12] Nothing happens in Discord when running the program #1338

Closed
opened 2026-05-23 02:57:57 +01:00 by JakeStanger · 7 comments
Owner

Originally created by @Tankernn on GitHub (Oct 19, 2020).
Original GitHub issue: https://github.com/JakeStanger/mpd-discord-rpc/issues/12

I'm probably the one at fault here, but I cannot get this or any other RPC integration to work. I have tried it with both discord and discord-canary from the AUR. I am using the default configuration.

Output:

Entering idle mode
Exiting idle mode
Entering idle mode
Exiting idle mode

The mode switches when I play/pause mpd, as expected.

Am I missing some setup in Discord? I couldn't find any installation instructions in the readme other than to run the program.

Originally created by @Tankernn on GitHub (Oct 19, 2020). Original GitHub issue: https://github.com/JakeStanger/mpd-discord-rpc/issues/12 I'm probably the one at fault here, but I cannot get this or any other RPC integration to work. I have tried it with both `discord` and `discord-canary` from the AUR. I am using the default configuration. Output: ``` Entering idle mode Exiting idle mode Entering idle mode Exiting idle mode ``` The mode switches when I play/pause mpd, as expected. Am I missing some setup in Discord? I couldn't find any installation instructions in the readme other than to run the program.
Author
Owner

@JakeStanger commented on GitHub (Oct 19, 2020):

That's odd. The output would suggest it's connected to Discord fine, and the program would actually crash if it didn't successfully connect to Discord's RPC server.

No further configuration should be required. You should just need the Discord client running, then start mpd-discord-rpc, and it should update your status to show you "in game".
image

Is it possible you've got a custom status set and that's overriding it?

<!-- gh-comment-id:712138745 --> @JakeStanger commented on GitHub (Oct 19, 2020): That's odd. The output would suggest it's connected to Discord fine, and the program would actually crash if it didn't successfully connect to Discord's RPC server. No further configuration should be required. You should just need the Discord client running, then start `mpd-discord-rpc`, and it should update your status to show you "in game". ![image](https://user-images.githubusercontent.com/5057870/96454044-36eb4900-1213-11eb-9fa5-2616b814db59.png) Is it possible you've got a custom status set and that's overriding it?
Author
Owner

@Tankernn commented on GitHub (Oct 19, 2020):

I don't have any status set. :) How does mpd-discord-rpc identify/find the running Discord instance? Does it depend on some external program (dbus or similar)?

<!-- gh-comment-id:712157342 --> @Tankernn commented on GitHub (Oct 19, 2020): I don't have any status set. :) How does `mpd-discord-rpc` identify/find the running Discord instance? Does it depend on some external program (dbus or similar)?
Author
Owner

@JakeStanger commented on GitHub (Oct 19, 2020):

Not to my knowledge. The library it uses looks like it just connects using a Unix socket

<!-- gh-comment-id:712159398 --> @JakeStanger commented on GitHub (Oct 19, 2020): Not to my knowledge. The [library it uses](https://github.com/JakeStanger/discord-rpc-client.rs) looks like it just connects using a Unix socket
Author
Owner

@Tankernn commented on GitHub (Oct 21, 2020):

The output is actually the same regardless of whether Discord is running or not, so I suspect the instance is not detected.

<!-- gh-comment-id:713568173 --> @Tankernn commented on GitHub (Oct 21, 2020): The output is actually the same regardless of whether Discord is running or not, so I suspect the instance is not detected.
Author
Owner

@Tankernn commented on GitHub (Oct 21, 2020):

Actually, scratch that. Here is some output with debugging enabled:

Entering idle mode
Exiting idle mode
Starting sender loop
Connecting
Performing handshake
-> Message { opcode: Handshake, payload: "{\"client_id\":\"677226551607033903\",\"nonce\":\"5a60cba3-d8da-4fda-b5f0-d520232117ad\",\"v\":1}" }
Received 340 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"DISPATCH\",\"data\":{\"v\":1,\"config\":{\"cdn_host\":\"cdn.discordapp.com\",\"api_endpoint\":\"//discordapp.com/api\",\"environment\":\"production\"},\"user\":{\"id\":\"167514408422080512\",\"username\":\"Tankernn\",\"discriminator\":\"8555\",\"avatar\":\"3d22de3eaa4085e010688bc80790a4f3\",\"bot\":false,\"flags\":48,\"premium_type\":0}},\"evt\":\"READY\",\"nonce\":null}" }
Handshake completed
Connected
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"9e200f46-c86f-416a-bb3a-8a98b048f076\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"9e200f46-c86f-416a-bb3a-8a98b048f076\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"367977a2-bd98-46f8-9035-43f21a753cab\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"367977a2-bd98-46f8-9035-43f21a753cab\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"227b631b-f349-4c55-a337-13df78895686\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"227b631b-f349-4c55-a337-13df78895686\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"bca3d105-eab4-4a77-8442-3f4da3aacb41\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"bca3d105-eab4-4a77-8442-3f4da3aacb41\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"93fd60f0-0fc9-497d-922f-d16eac0673d2\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"93fd60f0-0fc9-497d-922f-d16eac0673d2\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"79b7d9f1-7f06-4645-8fb2-c97a48b8dd80\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"79b7d9f1-7f06-4645-8fb2-c97a48b8dd80\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"eb19abde-3b60-4582-9681-b97cb90a6cb0\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"eb19abde-3b60-4582-9681-b97cb90a6cb0\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"1e36f7f0-50f7-40bc-ad73-65a0ccffae88\"}" }
Received 302 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"1e36f7f0-50f7-40bc-ad73-65a0ccffae88\"}" }
-> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267},\"nonce\":\"930149aa-5933-48a0-99a0-611923d90807\"}" }
Received 100 bytes
<- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":null,\"evt\":null,\"nonce\":\"930149aa-5933-48a0-99a0-611923d90807\"}" }
Entering idle mode

At least messages seem to be passed to and from Discord, maybe you can get more out of this than I?

<!-- gh-comment-id:713596982 --> @Tankernn commented on GitHub (Oct 21, 2020): Actually, scratch that. Here is some output with debugging enabled: ``` Entering idle mode Exiting idle mode Starting sender loop Connecting Performing handshake -> Message { opcode: Handshake, payload: "{\"client_id\":\"677226551607033903\",\"nonce\":\"5a60cba3-d8da-4fda-b5f0-d520232117ad\",\"v\":1}" } Received 340 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"DISPATCH\",\"data\":{\"v\":1,\"config\":{\"cdn_host\":\"cdn.discordapp.com\",\"api_endpoint\":\"//discordapp.com/api\",\"environment\":\"production\"},\"user\":{\"id\":\"167514408422080512\",\"username\":\"Tankernn\",\"discriminator\":\"8555\",\"avatar\":\"3d22de3eaa4085e010688bc80790a4f3\",\"bot\":false,\"flags\":48,\"premium_type\":0}},\"evt\":\"READY\",\"nonce\":null}" } Handshake completed Connected -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"9e200f46-c86f-416a-bb3a-8a98b048f076\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"9e200f46-c86f-416a-bb3a-8a98b048f076\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"367977a2-bd98-46f8-9035-43f21a753cab\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"367977a2-bd98-46f8-9035-43f21a753cab\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"227b631b-f349-4c55-a337-13df78895686\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"227b631b-f349-4c55-a337-13df78895686\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"bca3d105-eab4-4a77-8442-3f4da3aacb41\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"bca3d105-eab4-4a77-8442-3f4da3aacb41\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"93fd60f0-0fc9-497d-922f-d16eac0673d2\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"93fd60f0-0fc9-497d-922f-d16eac0673d2\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"79b7d9f1-7f06-4645-8fb2-c97a48b8dd80\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"79b7d9f1-7f06-4645-8fb2-c97a48b8dd80\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"eb19abde-3b60-4582-9681-b97cb90a6cb0\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"eb19abde-3b60-4582-9681-b97cb90a6cb0\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267,\"activity\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291},\"assets\":{\"small_image\":\"notes\"}}},\"nonce\":\"1e36f7f0-50f7-40bc-ad73-65a0ccffae88\"}" } Received 302 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":{\"state\":\"Dragonforce / Inhuman Rampage\",\"details\":\"Cry For Eternity\",\"timestamps\":{\"start\":1603288291000},\"assets\":{\"small_image\":\"677249606572310582\"},\"name\":\"music\",\"application_id\":\"677226551607033903\"},\"evt\":null,\"nonce\":\"1e36f7f0-50f7-40bc-ad73-65a0ccffae88\"}" } -> Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"args\":{\"pid\":10267},\"nonce\":\"930149aa-5933-48a0-99a0-611923d90807\"}" } Received 100 bytes <- Message { opcode: Frame, payload: "{\"cmd\":\"SET_ACTIVITY\",\"data\":null,\"evt\":null,\"nonce\":\"930149aa-5933-48a0-99a0-611923d90807\"}" } Entering idle mode ``` At least messages seem to be passed to and from Discord, maybe you can get more out of this than I?
Author
Owner

@JakeStanger commented on GitHub (Oct 21, 2020):

Hm, well that confirms the program is talking to Discord and it's sending/receiving all the right things. To me, this definitely looks like a Discord problem.

A couple of things I'd try:

  • Make sure your client is definitely up to date (should be 0.0.12-1)
  • Try running discord on another machine, or even a VM, and see if it works there.
<!-- gh-comment-id:713719311 --> @JakeStanger commented on GitHub (Oct 21, 2020): Hm, well that confirms the program is talking to Discord and it's sending/receiving all the right things. To me, this definitely looks like a Discord problem. A couple of things I'd try: - Make sure your client is definitely up to date (should be `0.0.12-1`) - Try running discord on another machine, or even a VM, and see if it works there.
Author
Owner

@Tankernn commented on GitHub (Nov 6, 2020):

I noticed this option exists...
image
Thank you for your help, closing.

<!-- gh-comment-id:723264058 --> @Tankernn commented on GitHub (Nov 6, 2020): I noticed this option exists... ![image](https://user-images.githubusercontent.com/8172092/98407620-428e9a80-2070-11eb-9d3c-9a8c719abe1b.png) Thank you for your help, closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/mpd-discord-rpc#1338
No description provided.