Issues with some pluginsNot An Issue

I'm running into some issues here that weren't a problem before, plugins that I've added to my server that were working fine before, suddenly decide to stop working for no reason.

First one here is BetterChat. Everything was working perfectly fine until suddenly some random error comes up and it can't compile the plugin.


BetterChat - After parsing a value an unexpected character was encountered: ". Path '[0].Format', line 25, position 4.

This ends up spamming the RCON console with this;

Failed to initialize plugin 'BetterChat v5.0.19' (JsonReaderException: After parsing a value an unexpected character was encountered: ". Path '[0].Format', line 25, position 4.)
  at Newtonsoft.Json.JsonTextReader.ParsePostValue () [0x00179] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonTextReader.Read () [0x0005a] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolvePropertyAndCreatorValues (Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00229] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.Serialization.ObjectConstructor`1[T] creator, System.String id) [0x000b7] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract objectContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id, System.Boolean& createdFromNonDefaultCreator) [0x0008c] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00143] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0006d] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList (System.Collections.IList list, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x0016f] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String id) [0x000dc] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x0007f] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000d9] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00053] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Oxide.Core.Configuration.DynamicConfigFile.ReadObject[T] (System.String filename) [0x00028] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Core.DataFileSystem.ReadObject[T] (System.String name) [0x00021] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Plugins.BetterChat.LoadData[T] (T& data, System.String filename) [0x00019] in <850e54f337f247ee830a126b256e2381>:0 
  at Oxide.Plugins.BetterChat.Loaded () [0x00012] in <850e54f337f247ee830a126b256e2381>:0 
  at Oxide.Plugins.BetterChat.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x000e5] in <850e54f337f247ee830a126b256e2381>:0 
  at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <9affce1cd15c4ec183941adef8db1722>:0 
  at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000d8] in <4452f821def6406d834e4149849fe7ea>:0 
  at Oxide.Plugins.CSharpPlugin.HandleAddedToManager (Oxide.Core.Plugins.PluginManager manager) [0x0006e] in <9affce1cd15c4ec183941adef8db1722>:0 

Unloaded plugin Better Chat v5.0.19 by LaserHydra

No previous version to rollback plugin: BetterChat


Everything was working fine until this decided to happen. I deleted the BetterChat.cs and downloaded a fresh copy of the file, but it still doesn't work. No idea what triggered this to happen, nothing was changed in its plugin source file, and I don't get what it's trying to reference at in the error. There's nothing wrong with line 25, position 4 in it's source file.

 22         #region Variables
 23
 24         public static BetterChat Instance;
 25         public static List<ChatGroup> ChatGroups;
 26         public static Dictionary<Plugin, Func<IPlayer, string>> ThirdPartyTitles = new Dictionary<Plugin, Func<IPlayer, string>>();
 27
 28         private static readonly ChatGroup FallbackGroup = new ChatGroup("default");


it looks pretty normal, nothing out the ordinary.

the other plugin here is Godmode, doesn't seem to affect the functionality of the plugin from working, but it always shows this error upon being loaded or viewing list of installed plugins;

Godmode - Failed to compile: Godmode.cs(412,0): error CS1525: Unexpected symbol `}'
The first error is an invalid configuration file. Make sure when editing, that you are following the format and the result is valid JSON.

The last error is an incomplete or modified plugin file, which means the plugin wouldn't be loaded. Generally this is from local changes or corrupt downloads/uploads to your server. The build compiles on our site, so it wouldn't be on our end.
In response to Wulf ():
The first error is an invalid configuration file. Make sure when editing, that you are following the...
Configuration file is valid though, I copied from the template on the page for the plugin.

the plugin file hasn't been changed, it's only been downloaded as is straight to the Oxide plugins folder.
In response to Alkaris ():
Configuration file is valid though, I copied from the template on the page for the plugin.
While those may have been the steps you took, it doesn't change the facts as to that there's an issue with them locally. I'd suggest starting with the default configuration and re-downloading the other plugin.
In response to Wulf ():
While those may have been the steps you took, it doesn't change the facts as to that there's an issu...
I eventually figured out what was wrong with the JSON config for BetterChat, it was missing a comma in the data config file.


As for the Godmod one, the syntax isn't correct which is why the plugin doesn't work. I ran your code through a C# validator and it shows me there's no matching bracket for the line it gave.

Error while compiling: Godmode.cs(412,0): error CS1525: Unexpected symbol `}'​

no matching bracket, or bracket match out of range, which is why it says unexpected symbol when the plugin attempts to load. You might want to re-check your code for missing brackets to make it valid which is why it doesn't work after downloading a fresh copy of it.
In response to Alkaris ():
I eventually figured out what was wrong with the JSON config for BetterChat, it was missing a comma...
The plugin is compiling fine both locally and online, it hasn't changed and is verified as compiling successfully on our site. I'd suggest making sure you downloaded it fully and it wsn't modified.

Also, there isn't 412 lines in the plugin, only 407 in the release from 6 months ago. If this was not a localized issue, I would have known about it 6 months ago.
Locked automatically