sll552 / DiscordBee

MusicBee plugin that updates your Discord status with the currently playing track
Apache License 2.0
423 stars 31 forks source link

Rich presence not appearing #41

Open kcstar7 opened 4 years ago

kcstar7 commented 4 years ago

Describe the bug Attempted many things, rich presence still not appearing, just "Playing Musicbee"

To Reproduce Steps to reproduce the behavior: Clean reinstall with installer, installed plugin by dragging files in plugin folder. Attempted switching accounts on Discord. No Discord add-ons installed.

Expected behavior Song album art and track name etc. to appear on profile.

Environment (please complete the following information):

sll552 commented 4 years ago

Please verify that the plugin actually loads and is enabled in MusicBee -> Settings -> Plugins.

kcstar7 commented 4 years ago

Yes, it's in the plugins list and enabled. Tried disabling then re-enabling as well.

sll552 commented 4 years ago

If you registered MusicBee as a "Game" in Discord, try to remove that. As I cannot reproduce it, it is hard to debug from here. Also try to switch tracks, this should force an update.

Are you using the Microsoft Store version of MusicBee (as you said installer i assume not)? What is your OS, do you have some aggressive anti-virus

kcstar7 commented 4 years ago

I never registered it, and tried switching tracks as well. I'm not using store version. Using Win10 right now. Not sure what you mean by aggressive...

sll552 commented 4 years ago

Just try to switch it off, as I have no idea what causes this, I am basically guessing unfortunately.

Maybe there is something in the error log under MusicBee -> Help -> Support ->Error log

kcstar7 commented 4 years ago

Tried switching it off, still not working. Error log had text and is as follows: 2020-07-08 2:51:40 PM - 10.0.19041.0 - 3.3.7491.38139D - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'DiscordRPC, Version=1.0.150.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. at MusicBeePlugin.Plugin..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase) at #=zHqthFCuvsWP5aw_SIg==..ctor(#=z88wOfaCGeaMTPyIqug== #=zumfWCDQ=)

2020-07-08 2:56:31 PM - 10.0.19041.0 - 3.3.7491.38139D - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'DiscordRPC, Version=1.0.150.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. at MusicBeePlugin.Plugin..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase) at #=zHqthFCuvsWP5aw_SIg==..ctor(#=z88wOfaCGeaMTPyIqug== #=zumfWCDQ=)

All files, including DiscordRPC.dll is in the plug ins folder.

sll552 commented 4 years ago

Ok, at least we found the problem. Unfortunately I don't know what could be causing this, if you have the files in place. Do you have any other plugins in MusicBee?

kcstar7 commented 4 years ago

No, no other plugins other than the ones that came with it initially, last.fm, cd art display, and theater mode.

sll552 commented 4 years ago

Could you try to launch MusicBee as admin? It seems that a similar issue (#42) was resolved this way.

kcstar7 commented 4 years ago

Launched it as admin, even went into security details of all the files and allowed full control, still nothing... It's showing as enabled in musicbee just not showing on Discord

QQBQBQL commented 4 years ago

I believe I'm having the same problem. I have installed it, it's clearly appearing in MusicBee, but it's not integrating into Discord.

Error code:

8/29/2020 10:27:43 PM - 10.0.18363.0 - 3.3.7491.38139D - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'DiscordRPC, Version=1.0.150.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. at MusicBeePlugin.Plugin..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Reflection.Assembly.CreateInstance(String typeName, Boolean ignoreCase) at #=zHqthFCuvsWP5aw_SIg==..ctor(#=z88wOfaCGeaMTPyIqug== #=zumfWCDQ=)

Filoppi commented 3 years ago

I've been debugging this with VS given that it also happens on my machine. As long as I have both apps running in admin mode, DiscordRpcClient _discordClient is setup and connected correctly (.connection says it's connected, and I can see my username from there so it is connected), but then, discord just doesn't show it (and my discord is configured to show games rich presence), so it seems to be a problem on discord's side, or maybe some parameters we are passing along with RichPresence _discordPresence break the visualization.

No errors in the VS output log, and even trying to run a clean discord installation doesn't work. MusicBee is not manually added to the programs to show in discord. Rich presence seems to also not work for other applications though.

sll552 commented 3 years ago

I am still unable to reproduce this on my side, so unfortunately I am guessing, but could you try the things listed in https://github.com/sll552/DiscordBee/issues/42#issuecomment-659546385 in case you haven't already?

QQBQBQL commented 3 years ago

Hi, I'm just replying to let you know that this has fixed itself and it's now working as intended. I have no idea why or how it did so.

Filoppi commented 3 years ago

Same, it now works without changing anything. Though Discord is not showing me what it's showing to others. Don't think that's normal.

sll552 commented 3 years ago

Though Discord is not showing me what it's showing to others

Does that mean that others see your presence but you don't ?

Filoppi commented 3 years ago

Yes, Games without rich presence show up on top of my user, like: "Playing Apex Legends" but rich presence apps don't. Though this seems to be a discord problem as it also happens, nothing you can do anything about. I've already reported the bug to Discord.

sll552 commented 3 years ago

Could anyone with the "FileNotFoundException" try the things mentioned in #63 ? @kcstar7

Chaython commented 2 years ago

I'm using the newest MB patch https://getmusicbee.com/patches/MusicBee34_Patched.zip I've tried this and another plugin like it. The other one [ https://github.com/maybeclean/musicbee-rich-presence ] could only sync icons to the discord api, but didn't show presence... This one doesn't seem to be doing anything. I tried another one, that was dead from 2017, and it just gave a bunch of errors. Sad.

Qrusher14242 commented 2 years ago

i updated to the newest MB and then manually installed this plugin and get nothing in Discord except for the basic playtime of an app in it. It used to work on the older version of MB.

DeathOfBalance commented 2 years ago

I'm also experiencing this issue. It used to work properly, now it only shows this:

image

Lilith-J commented 1 year ago

I'm also experiencing this issue. It used to work properly, now it only shows this:

image

Just here to say that I'm getting the same issue a year later. Looks exactly like that and nothing seems to fix it. Plugin has yet to work for me on a fresh install of both apps.