sll552 / DiscordBee

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

Can't enable plugin #42

Closed Dougie18 closed 4 years ago

Dougie18 commented 4 years ago

Here's the error log: 7/16/2020 12:11:58 - 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=)

Dougie18 commented 4 years ago

So after a little bit of trial and error I've seem to get the plugin functional. I can't single out exactly what I changed that got it working but I'll list some things I tried.

After all that it's now running from the zip file in the x86 musicbee plugins folder. Maybe windows antivirus had some sort of probation period on the dll file? Regardless its working great now. Thanks for developing this plugin. 👍

sll552 commented 4 years ago

Nice that you got it working, this seems like the same symptoms as in #41 and I still have no idea how this happens or what causes it and I cant reproduce it. May I ask what you did as exactly as possible before while initially installing the plugin?

Dougie18 commented 4 years ago

I can't be 100% certain but I think loading the plugin from my downloads folder is what corrected it. Although to test it I deleted the zip file, restarted my computer, and tried installing again with a new copy from C:\Program Files (x86)\MusicBee\Plugins but It was still working ok. I think because you need admin privileges to alter files in this folder, maybe it couldn't enable correctly.