RinseV / valheim-skipsleep

Valheim Skip Sleep mod
GNU General Public License v3.0
3 stars 1 forks source link

BepInEx Fails to load SkipSleep #3

Open lxhwes opened 2 years ago

lxhwes commented 2 years ago

Skipsleep stopped working this past week. Server log shows an exception due to an unescaped character somewhere.

SkipSleep version: 1.0.5 BepInEx version: 5.4.1600

[Info   :   BepInEx] Loading [ModSkipSleepValheim 1.0.5]
[Error  : Unity Log] ArgumentException: Cannot use any of the following characters in section and key names: = \n \t \ " ' [ ]
Parameter name: section
Stack trace:
BepInEx.Configuration.ConfigDefinition.CheckInvalidConfigChars (System.String val, System.String name) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigDefinition..ctor (System.String section, System.String key) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigFile.Reload () (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigFile..ctor (System.String configPath, System.Boolean saveOnInit, BepInEx.BepInPlugin ownerMetadata) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigFile..ctor (System.String configPath, System.Boolean saveOnInit) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
ModSkipSleepValheim.Mod..cctor () (at <0877a1b4fa334af3a192fc18e53219b6>:0)
Rethrow as TypeInitializationException: The type initializer for 'ModSkipSleepValheim.Mod' threw an exception.
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Application:.cctor()
[Error  : Unity Log] ArgumentException: Cannot use any of the following characters in section and key names: = \n \t \ " ' [ ]
Parameter name: section
Stack trace:
BepInEx.Configuration.ConfigDefinition.CheckInvalidConfigChars (System.String val, System.String name) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigDefinition..ctor (System.String section, System.String key) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigFile.Reload () (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigFile..ctor (System.String configPath, System.Boolean saveOnInit, BepInEx.BepInPlugin ownerMetadata) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
BepInEx.Configuration.ConfigFile..ctor (System.String configPath, System.Boolean saveOnInit) (at <73d37a760d5a4444be8d7989b489dc1a>:0)
ModSkipSleepValheim.Mod..cctor () (at <0877a1b4fa334af3a192fc18e53219b6>:0)
Rethrow as TypeInitializationException: The type initializer for 'ModSkipSleepValheim.Mod' threw an exception.
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Application:.cctor()
RinseV commented 2 years ago

I am unable to replicate this bug using SkipSleep 1.0.5 and BepInEx 5.4.1600.

@lxhwes How are you running this mod? Are you running it on a server? What OS are you running the server on? Looking at the error, it seems the config of the mod might just be invalid.

lxhwes commented 2 years ago

@RinseV Thanks for the reply. This is running on a hosted server (Valhost.net). I am not sure what OS they are using, and the config file I am running is default:

[General]

## Threshold of ratio of players that need to be sleeping, must be > 0
# Setting type: Double
# Default value: 0.5
ratio = 0.5

## Show a continuous message of the amount of players currently sleeping (if > 0)
# Setting type: Boolean
# Default value: true
showMessage = true