th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
8.99k stars 512 forks source link

Discord RPC_CONNECTION_TIMEOUT #891

Closed Technetium1 closed 1 year ago

Technetium1 commented 1 year ago

Discord Rich Presence isn't working for me. I tried to reconnect, and this is the error: Screenshot_1578

I also use PreMiD, which uses Discord RPC, so I closed PreMiD thinking it may be a new problem, relaunched ytm, and the same error appears on reconnect. Previously, it worked fine alongside PreMiD, and both activities were shown at the same time. I don't know when exactly this stopped working, but it was fine around 2 weeks ago.

Happy to provide any other details that might help.

JustTNE commented 1 year ago

Hi Tech! Fancy seeing you here :P This is actually just https://github.com/th-ch/youtube-music/issues/879, not sure why that one was closed, it's definitely still an issue and I don't see a commit fixing it.

unrelatedact commented 1 year ago

Yeah the problem was just because the Discord app ID was invalid and can't make an RPC connection. If you want an instant fix you can try to build ytm yourself and everything should work just fine since #888 was accepted to change the app id. Otherwise you could just wait until the next update releases.

Crawron commented 1 year ago

Hi Tech! Fancy seeing you here :P This is actually just #879, not sure why that one was closed, it's definitely still an issue and I don't see a commit fixing it.

879 was fixed in ee01ae1c00c73b0dfd5db8c6e7ff7352783987da

juleast commented 1 year ago

Hi Tech! Fancy seeing you here :P This is actually just #879, not sure why that one was closed, it's definitely still an issue and I don't see a commit fixing it.

879 was fixed in ee01ae1

But there is no new release referencing this change. I think for now in order to use the app, you have to build it yourself....

Technetium1 commented 1 year ago

As mentioned in my initial post, I have built the latest commit that is available on master branch. The full version is 1.18.0.r33.g335d515-1 from commit https://github.com/th-ch/youtube-music/commit/335d515e22e4fe721ad73b919871c5656e7bd4c5. If this issue is actually identical to 879, then this confirms it wasn't fixed in any of the recent commits.

Crawron commented 1 year ago

The issue in 879 displays a different error message, "Connection closed". I can confirm that 879 was fixed after building the newest commit. This is a different issue, tho it seems to happen at a similar time, when starting the RPC client.

In 879, the plugin managed to connect to Discord, but the connection was closed since the client ID stopped working, the client ID has been changed to a working one as of the latest commit. My guess is that in this case the plugin fails to connect with Discord altogether, for some reason

Zo-Bro-23 commented 1 year ago

I fixed this issue in https://github.com/th-ch/youtube-music/commit/ee01ae1c00c73b0dfd5db8c6e7ff7352783987da - don't know why it's still an issue. My build uses this commit, and it's still working. The Discord plugin files weren't changed after that, so that can't be the problem. How are you building the app? Package repositories and releases aren't updated yet (@th-ch?), probably since this is a minor change. Try using yarn build or yarn build:linux (after running yarn first of course).

Technetium1 commented 1 year ago

Well, it seems to be working now, but I'm not sure why! I'm still using the same exact build and have changed nothing. In case it stops working again, I'll wait a day to close this, since I can't open it back up myself.

Zo-Bro-23 commented 1 year ago

That's weird! Maybe you mixed up the commits and you were actually building an old version, or maybe there was some issue with the Discord token. I'm glad is working now though, and please let us know if you face any more issues!

Technetium1 commented 1 year ago

I'm 100% sure I'm still on the same commit. I wonder if there was a temporary issue with the token.

Zo-Bro-23 commented 1 year ago

Possibly. Let me know if you face further issues though, since the token is registered with my Discord account, so I'll need to debug it.

Technetium1 commented 1 year ago

Seems to be working fine still! I checked the dependencies of the package to see if anything changed, and nothing related to this has been changed in weeks.