lloesche / valheim-server-docker

Valheim dedicated gameserver with automatic update, World backup, BepInEx and ValheimPlus mod support
https://hub.docker.com/r/lloesche/valheim-server
Apache License 2.0
1.94k stars 272 forks source link

BepInEx no longer working after patch 0.207.20 #470

Closed hmellor closed 2 years ago

hmellor commented 2 years ago

BepinEx support appears to be broken after Valheim patch 0.207.20.

This patch introduced full controller support and the errors (which come in 100s of times per second) are related to controller support (IsGamepadActive etc.). Disabling BepInEx causes the errors to go away and the container to be usable as normal.

Here is a snippet of my logs:

...
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at Console.Update () [0x00056] in <5a2a40741ab34a4fbe56a67fda3894e0>:0 
/supervisord: valheim-server   at ZInput.GetButton (System.String name) [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at UIGroupHandler.Update () [0x0009a] in <98f42f5c8bbc4ad38ddefbf5b1b7a0b1>:0 
/supervisord: valheim-server   at ZInput.IsGamepadActive () [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at Console.Update () [0x00056] in <5a2a40741ab34a4fbe56a67fda3894e0>:0 
/supervisord: valheim-server   at ZInput.GetButton (System.String name) [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at UIGroupHandler.Update () [0x0009a] in <98f42f5c8bbc4ad38ddefbf5b1b7a0b1>:0 
/supervisord: valheim-server   at ZInput.IsGamepadActive () [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at Console.Update () [0x00056] in <5a2a40741ab34a4fbe56a67fda3894e0>:0 
/supervisord: valheim-server   at ZInput.GetButton (System.String name) [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at UIGroupHandler.Update () [0x0009a] in <98f42f5c8bbc4ad38ddefbf5b1b7a0b1>:0 
/supervisord: valheim-server   at ZInput.IsGamepadActive () [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at Console.Update () [0x00056] in <5a2a40741ab34a4fbe56a67fda3894e0>:0 
/supervisord: valheim-server   at ZInput.GetButton (System.String name) [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at UIGroupHandler.Update () [0x0009a] in <98f42f5c8bbc4ad38ddefbf5b1b7a0b1>:0 
/supervisord: valheim-server   at ZInput.IsGamepadActive () [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at Console.Update () [0x00056] in <5a2a40741ab34a4fbe56a67fda3894e0>:0 
/supervisord: valheim-server   at ZInput.GetButton (System.String name) [0x00000] in <df3d4d1b88a54036b84e64e3d77196d7>:0 
/supervisord: valheim-server NullReferenceException: Object reference not set to an instance of an object
/supervisord: valheim-server   at UIGroupHandler.Update () [0x0009a] in <98f42f5c8bbc4ad38ddefbf5b1b7a0b1>:0 
...
lloesche commented 2 years ago

I just tested on a fresh install and don't see any issues in the log. I'm running

Apr  9 18:12:52 /supervisord: valheim-server [Message:   BepInEx] BepInEx 5.4.19.0 - valheim_server (4/9/2022 6:10:27 PM)

Has your container auto-updated to BepInEx 5.4.19.0?

Generally speaking this container automatically keeps everything up to date. Chances are valheim-server got an update that was incompatible with the current version of BepInEx and it took the BepInEx authors a couple of hours or maybe days to update their code base to work with the latest Valheim server changes. Once they fixed their code everything resolved itself.

If you'd prefer the container not to constantly auto update you could set the UPDATE_CRON variable to check for updates like once a month or even less often. Though then your Steam client will likely still update the Desktop version of Valheim.

Hope this info helps.

hmellor commented 2 years ago

In a fresh container I still see the errors when I reuse my /config and /opt/valheim directories I have stored outside Docker. The logs indicate the latest version of BepInEx is being used, perhaps the configs are outdated and didn't get updated in the update process? I don't really know what to do if that is the case.

NevisTM commented 2 years ago

I also had same error and managed to fix it by editing BepinEx.cfg file (location: valheim/BepInEx/config/BepinEx.cfg) and restored all settings to defaults. You could probably archive this by just renaming the file and restarting the container. It should recreate the file with defaults already set.

theCrius commented 1 year ago

Same happening here

Fresh container, copied the bepinex plugins folders from my local valheim installation copied the configurations for the plugins as well.

What I find weird is that the plugins are to go in: valheim-server/config/bepinex/plugins

And if you go into your data volume folder on the host, you see that config actually points to /config/bepinex which will includes also the plugins directory. I don't know if that is causing some mess with the symbolic link.

This image is too complicated to try some changes on the fly for me at the moment but I'd suggest having the plugins configuration in a different directory that doesn't include the actual plugins.