sll552 / DiscordBee

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

Unable to initialise plugin #200

Closed Realswitzer closed 1 year ago

Realswitzer commented 1 year ago

Describe the bug While trying to enable Discordbee, after having to reinstall Musicbee due to it crashing constantly, plugin does not work. Receive error saying "Unable to initialise plugin: mb_DiscordBee.dll" with reason "Exception has been thrown by the target of an invocation."

To Reproduce Steps to reproduce the behavior:

  1. Download discordbee and put in Plugins folder
  2. Open Musicbee and try to enable plugin in Preferences > Plugins
  3. See error

Expected behavior The plugin would be enabled.

Screenshots image image

Environment (please complete the following information):

Additional context While I looked for another issue that mentioned this, plugin version 3.0.7 was linked but am unable to download as it's old and not hosted on the server.

Suppression345 commented 1 year ago

Hi there. I have been having this exact same issue. I've tried contacting the DiscordBee server about it, but my efforts are to no avail so far. Any updates?

sll552 commented 1 year ago

Please look in the error log of musicbee if there is an exception logged and post it here

Realswitzer commented 1 year ago

3/10/2023 2:58:13 PM - 10.0.19044.0 - 3.5.8447.35892D - System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type MusicBeePlugin.Settings. The data at the root level is invalid. Line 1, position 1. ---> System.Xml.XmlException: The data at the root level is invalid. Line 1, position 1. at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3) at System.Xml.XmlUTF8TextReader.Read() at System.Xml.XmlBaseReader.IsStartElement() at System.Xml.XmlBaseReader.IsStartElement(XmlDictionaryString localName, XmlDictionaryString namespaceUri) at System.Runtime.Serialization.XmlReaderDelegator.IsStartElement(XmlDictionaryString localname, XmlDictionaryString ns) at System.Runtime.Serialization.XmlObjectSerializer.IsRootElement(XmlReaderDelegator reader, DataContract contract, XmlDictionaryString name, XmlDictionaryString ns) at System.Runtime.Serialization.DataContractSerializer.InternalIsStartObject(XmlReaderDelegator reader) at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) --- End of inner exception stack trace --- at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(XmlDictionaryReader reader) at System.Runtime.Serialization.XmlObjectSerializer.ReadObject(Stream stream) at MusicBeePlugin.Settings.Load(String filePath) at MusicBeePlugin.Settings.GetInstance(String filePath) at MusicBeePlugin.Plugin.Initialise(IntPtr apiInterfacePtr) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at #=z5PgYRDH$zNo7WhzgWg==..ctor(#=z4$90odPQW5oVh9588w== #=zeHK_e $g=) Unfortunately, due to GitHub upload limitations I have to use a double extension to send the full log here. ErrorLog.dat.txt

sll552 commented 1 year ago

Ok looks like your settings file got corrupted somehow.

Just delete %APPDATA%\MusicBee\DiscordBee\DiscordBee.settings and try again

Realswitzer commented 1 year ago

Oh, it worked now. Unsure what caused it to get corrupted though. Will close, reopen if needed.