JsonSerializationException when loading plugin
Colesy

I just started a rust server with botspawn, all was going amazingly till we added the finishing touches and then suddenly the chat commands stopped working and I get an error message, I've tried uninstalling and reinstalling to no success 

this is the error

[Error] Failed to initialize plugin 'BotSpawn v1.9.0' (JsonSerializationException: Unexpected end when deserializing object. Path 'DataProfiles', line 185, position 1.)
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ThrowUnexpectedEndException (Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonContract contract, System.Object currentObject, System.String message) [0x0002d] in <8fe7f8665ff548909c2f26d557e5093a>:0 
  at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x0029c] 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) [0x0015c] 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.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.BotSpawn.Loaded () [0x0008d] in <84a84713c3284d21b821cfea874bf308>:0 
  at Oxide.Plugins.BotSpawn.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x00569] in <84a84713c3284d21b821cfea874bf308>: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 
01:23 [Info] Unloaded plugin BotSpawn v1.9.0 by Steenamaroo
01:23 [Info] No previous version to rollback plugin: BotSpawn
MrBlue

Hey,

The error is basically telling you that the config is broken...
Check your config at line 185.
If you can’t find the misstate you made, try using a json validator online.
Colesy
Original Poster
In response to MrBlue ():
Hey,

The error is basically telling you that the config is broken...
Check your conf...
Checked the config, nothing out of place

Ran the config thought a json validator and no errors found

MrBlue

Have you tried removing the config and reloading the plugin?
Doing this will generate a new config.
If this works and you don’t get an error after regenerating the config, your config is invalid in some way.

Merged post

Oh wait a second, this plugin is using a data file as well, try validating the data/BotSpawn.json file.
pookins
In response to MrBlue ():
Have you tried removing the config and reloading the plugin?
Doing this will generate a new con...
it only uses the data file for custom spawns,

Colsey can you please post your config as its working fine on my server