Valheim-Modding/Jotunn

[BUG] Mod CompatibilityLevel check fails (false negative) / Mods reported incorrect

SpikeHimself opened this issue Β· 20 comments

Details
Jotunn Version: 2.20.0
Jotunn Submodule(if applicable): N/A
Repeatability: 100%

Problem Description:
When connecting to a dedicated server, Jotunn claims the server is not running any mods (including itself), resulting in clients being disconnected when mods they have require existence on the server

Note: This started happening after Ashlands update

Expected Behaviour:
Client should connect without warnings about missing mods

Actual Behaviour:
image

Link to your server's and client's LogOutput.log
Dedicated Server.log
Client.log

Update: This also happens when playing with a friend (friend hosts, no dedicated server involved)

You are not running the supported BepInEx pack from Thunderstore https://thunderstore.io/c/valheim/p/denikson/BepInExPack_Valheim/, possibly the mods are crashing silently. Valheim requires a non-standard entrypoint

Curious, I am using the BepInEx pack that comes with Vortex. I didn't realise there would be a difference. Will look into this, thank you.

Can confirm this is fixed after changing Type to GameObject (was Application) under the section [Preloader.Entrypoint] in the BepInEx config file.

We have checked: on the client side the config was already set to GameObject and the Server did not have that Config so we still can not connect to the server whith that Mod. (We use a Nitrado server)

@LMorgil make sure to enable BepInEx in the server web dashboard, otherwise Nitrado launches vanilla Valheim regardless of your local files.

I am still experiencing this issue. My BepInEx config seems to have been set correctly already too I didn't need to modify it.

Log from client:
[Message: BepInEx] BepInEx 5.4.22.0 - Valheim (2024-05-20 11:17:56 AM)
[Message: BepInEx] User is running BepInExPack Valheim version 5.4.2202 from Thunderstore
[Info : BepInEx] Running under Unity v2022.3.17.5228416
[Info : BepInEx] CLR runtime version: 4.0.30319.42000
[Info : BepInEx] Supports SRE: True
[Info : BepInEx] System platform: Bits64, Windows
[Message: BepInEx] Preloader started
[Info : BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.22.0]
[Info : BepInEx] 1 patcher plugin loaded
[Info : BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message: BepInEx] Preloader finished
[Message: BepInEx] Chainloader ready
[Message: BepInEx] Chainloader started
[Info : BepInEx] 62 plugins to load
[Info : BepInEx] Loading [MoreSlotsPatcher 1.1.0]
[Info : BepInEx] Loading [PlantEasily 1.8.0]
[Info : BepInEx] Loading [PlantEverything 1.17.3]
[Info : BepInEx] Loading [Death Tweaks 1.3.0]
[Info : BepInEx] Loading [Simple Sort 0.8.0]
[Info : BepInEx] Loading [AzuClock 1.0.3]
[Info : BepInEx] Loading [AzuContainerSizes 1.0.3]
[Info : BepInEx] Loading [AzuCraftyBoxes 1.3.0]
[Info : BepInEx] Loading [AzuHoverStats 1.1.6]
[Info : BepInEx] Loading [BiomeObserver 1.0.4]
[Info : BepInEx] Loading [CraftyCarts 3.1.2]
[Info : BepInEx] Loading [FirstPersonMode 1.3.3]
[Info : BepInEx] Loading [NoHoeDust 1.0.6]
[Info : BepInEx] Loading [Recycle_N_Reclaim 1.3.4]
[Info : BepInEx] Loading [BoatAdditions 1.3.1]
[Info : BepInEx] Loading [ClayBuildPieces 1.1.6]
[Info : BepInEx] Loading [CoordinatesDisplay 1.0.0]
[Info : BepInEx] Loading [CoreWoodPieces 1.1.8]
[Info : BepInEx] Loading [CrystalCollector 1.1.2]
[Info : BepInEx] Loading [FeatherCollector 1.1.4]
[Info : BepInEx] Loading [FineWoodBuildPieces 1.1.0]
[Info : BepInEx] Loading [FineWoodFurnitures 1.0.4]
[Info : BepInEx] Loading [GuckCollector 1.1.1]
[Info : BepInEx] Loading [RefinedStonePieces 1.0.1]
[Info : BepInEx] Loading [ResinCollector 1.1.0]
[Info : BepInEx] Loading [SeedBed 1.1.3]
[Info : BepInEx] Loading [TarCollector 1.1.3]
[Info : BepInEx] Loading [WeaponAdditions 1.1.9]
[Info : BepInEx] Loading [InfinityTools 1.0.0]
[Info : BepInEx] Loading [GimmeFuelGimmeFire 0.0.6]
[Info : BepInEx] Loading [Configuration Manager 18.3]
[Info : BepInEx] Loading [Jotunn 2.20.0]
[Info :Jotunn.Main] Initializing ModCompatibility
[Info :Jotunn.Main] Initializing SynchronizationManager
[Info :Jotunn.Main] Initializing NetworkManager
[Info : BepInEx] Loading [TeleportEverything 2.6.1]
[Info : BepInEx] Loading [Veinmine 1.3.0]
[Info : BepInEx] Loading [BlacksmithTools 2.0.1]
[Info : BepInEx] Loading [OdinsFoodBarrels 1.0.22]
[Info : BepInEx] Loading [HS_EquipInWater 1.0.0]
[Info : BepInEx] Loading [Server Devcommands 1.79]
[Info : BepInEx] Loading [Infinity Hammer 1.54]
[Info : BepInEx] Loading [MyDirtyHoe 1.1.7]
[Info :Jotunn.Main] Initializing PrefabManager
[Info :Jotunn.Main] Initializing AssetManager
[Info :Jotunn.Main] Initializing ItemManager
[Info :Jotunn.Main] Initializing PieceManager
[Info :Jotunn.Main] Initializing LocalizationManager
[Info :Jotunn.Main] Initializing MockManager
[Info :Jotunn.Main] Initializing CommandManager
[Info : BepInEx] Loading [BetterUI 2.5.6]
[Info : BetterUI] BetterUI (Forever Maintained Version) loaded
[Info : BepInEx] Loading [Simple Sailing 1.1.0]
[Info : BepInEx] Loading [ItemStacks 1.2.0]
[Info :ItemStacks] ItemStacks loaded.
[Info : BepInEx] Loading [Speedy Paths Mod 1.0.8]
[Info :AuthoritativeConfig_nex.SpeedyPaths] Initialized Server Authoritative Config Manager.
[Info : BepInEx] Loading [OdinsKingdom 1.2.21]
[Info : BepInEx] Loading [Bigger Minimap Discovery Radius 3.6.17.0]
[Info : BepInEx] Loading [Display BepInEx Info In-Game 2.0.2]
[Info : BepInEx] Loading [OdinCampsite 1.5.3]
[Info : BepInEx] Loading [OdinTrainingPlace 1.5.3]
[Info : BepInEx] Loading [SearsCatalog 1.4.0]
[Info : BepInEx] Loading [ChaosArmor 13.0.0]
[Info : BepInEx] Loading [SafetyStatus 1.1.0]
[Info : BepInEx] Loading [Server Sync Fix 1.3]
[Info : BepInEx] Loading [Rock the Boat 1.0.5]
[Info : BepInEx] Loading [SouthsilArmor 3.0.5]
[Info : BepInEx] Loading [No Wave Ship Damage 1.0.0]
[Info : BepInEx] Loading [AutoRepair 5.4.1600]
[Info : BepInEx] Loading [No Rain Damage 1.2.2]
[Info : BepInEx] Loading [More Slots 1.1.6]
[Info :More Slots] More Slots mod - Created by Fang86
[Info :More Slots] Gravekeeper not found
[Info : BepInEx] Loading [FramePerSecondPlus 1.1.0]
[Warning: HarmonyX] AccessTools.DeclaredMethod: Could not find method for type LightFlicker and name Update and parameters
[Info : BepInEx] Loading [TorchesEternal 0.3]
[Info : BepInEx] Loading [XPortal 1.2.21]
[Info :Jotunn.Main] Initializing GUIManager
[Info :Jotunn.Main] Initializing InputManager
[Info :Jotunn.Main] Initializing MinimapManager
[Message: BepInEx] Chainloader startup complete
[Info :MyDirtyHoe.TerrainReset+Patch_Terminal_InitTerminal] Adding Terminal Command "resetterrain".
[Info :MyDirtyHoe.TerrainReset+Patch_Terminal_InitTerminal] Adding Terminal Command "resetterrain".
[Info :Jotunn.Managers.CommandManager] Adding 2 commands to the Console
[Info :Jotunn.Managers.InputManager] Registering 2 custom inputs
[Message:MyDirtyHoe.MyDirtyHoeMod] Loading Dirty Hoe SFX...
[Message:MyDirtyHoe.MyDirtyHoeMod] Loading Dirty Hoe Prefabs...
[Info :Jotunn.Managers.ItemManager] Adding 1 custom items to the ObjectDB
[Info :Jotunn.Managers.CommandManager] Adding 2 commands to the Console
[Info :Jotunn.Managers.PrefabManager] Adding 19 custom prefabs to the ZNetScene
[Info :Server Devcommands] Reloading 48 bind data.
[Info :Jotunn.Managers.ItemManager] Adding 1 custom items to the ObjectDB
[Info :Jotunn.Managers.ItemManager] Adding 1 custom recipes to the ObjectDB
[Info :Jotunn.Managers.ItemManager] Adding 2 custom status effects to the ObjectDB
[Info :Jotunn.Managers.PieceManager] Adding 13 custom pieces to the PieceTables
[Info :Jotunn.Managers.NetworkManager] Registering 2 custom RPCs
[Info :AuthoritativeConfig_nex.SpeedyPaths] Authoritative Config Registered -> AuthoritativeConfig_nex.SpeedyPaths
[Info :AzuContainerSizes] Invoking version check
[Info :AzuCraftyBoxes] Invoking version check
[Info :AzuHoverStats] Invoking version check
[Info :CraftyCarts] Invoking version check
[Info :Recycle_N_Reclaim] Invoking version check
[Info : Veinmine] Invoking version check
[Info :Server Devcommands] Reloading 48 bind data.
[Warning:Jotunn.Utils.ModCompatibility] JΓΆtunn is not installed on the server. Client has mandatory mods, cancelling connection. Mods that need to be installed on the server:
XPortal
[Info :Jotunn.Managers.CommandManager] Adding 2 commands to the Console
[Info :Jotunn.Managers.ItemManager] Adding 1 custom items to the ObjectDB
[Warning:Jotunn.Utils.ModCompatibility] Client loaded additional mod: XPortal

Unfortunately BepInEx on my server doesn't seem to be outputting a log file for some reason (ApexHosting). But everything on my server including BepInEx itself were all copied from my local setup so all the versions and configs are in sync. I have 61 mods running and they all appear to be working fine. I can connect to the server just fine after removing XPortal.

Capture1
Capture2
Capture3
LogOutput-Client.log

If no log file generates on the server, BepInEx isn't loading.
See https://apexminecrafthosting.com/valheim-server-mods/, probably you can select BepInEx instead of ValheimPlus.

BepInEx is definitely loading though. I can play on my server with all 60 mods I've installed. I just can't connect if I add XPortal.

Valheim is mostly client authoritative, meaning that almost no mods execute actual game logic on the server. However, many mods sync config files and some mods like XPortal are enforced on the server, to prevent issues when modded and vanilla clients join.
Thus, just because you can play with 60 mods doesn't imply BepInEx loads. If you don't have a log file the very least BepInEx is misconfigured but most likely it's not starting at all.

I'm seeing the same behaviour and am able to observe XPortal loading in the BepInEx dedicated server logs...

@joegoldin please shut down the server, delete the log file and start the server. Then connect with a client and if it fails, send the server log here (as a file please).

I'm happy to fix any bugs related to this. It's just that in the last two years of maintaining this project, this specific issue has consistently been due to BepInEx not loading properly on the server.

Just chiming in to say I'm still watching this thread, and if there is anything on the XPortal side that needs changing, then I'm open to it, but atm I don't know what that could be.

@MSchmoecker thanks for taking a look. After going to grab logs, I realized I was mistaken -- the server insists that no mods are installed (isModded: false), even though mods which require server-side logic are functioning... It seems like BepInEx isn't hooking, or at least not in some major way(s).

@SpikeHimself, I've seen this with a few other mods, so I assume this is a larger issue with the Ashlands patch / my own idiocy, because:

I switched to running the server via a docker container and suddenly it's loading fine 🀷 I tried reinstalling BepInEx quite a few times before that and tripled checked my .so paths and env vars, etc, so really not sure what I was missing, but appreciate the double check here!

Any more leads to what else could be the issue here? I'm having trouble loading any Jotunn related mods on my dedicated server. Disabling those specific mods allows the server to load up fine so I know it has something to do with Jotunn. Also already checked my config and also didn't have to make any changes. Jotunn and dependent mods also work perfectly fine with offline worlds so something is stopping the server from recognizing the Jotunn mod install.

Hey @YaBoiChuckNasty, I'm not an expert on this topic (hopefully @MSchmoecker will chime in too!), but I think it would be useful if you could attach your server's BepInEx logfile, so we can have a look at what's going on in there.

Make sure you delete the current one first, so you're not tricked by a previous output log making it seem that everything is ok ;)

I understand that this is a closed thread, but I am still having this issue myself. I cannot get any jotunn mods to load on my dedicated server. fwiw I am loading the server and the client on the same R2modman profile.

@rudnuh please refer to my previous comment: #432 (comment)

It can cause issues (duo to file locks) to use the same r2modman profile for both server and client. Better to use two identical ones e.g. duplicate it with the export feature.
Furthermore, the start script provided by Valheim cuts off any additional parameters the mod manager needs, please see https://github.com/Valheim-Modding/Wiki/wiki/Server-Troubleshooting#thunderstore-mod-manager-or-r2modman to adjust the script.

@SpikeHimself @MSchmoecker
Thanks for the feedback and assistance!
I actually managed to solve my issues by using the advice from @MSchmoecker and created separate profiles. My hunch though is that the actual fix for me was appending %* to the server start file as outlined in the link posted above.

Jotunn is happy again, thank you so much!