Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Breaking compatibility changes #709

Closed
lyoumi opened this issue Sep 27, 2022 · 18 comments
Closed

[BUG] Breaking compatibility changes #709

lyoumi opened this issue Sep 27, 2022 · 18 comments
Labels
bug Something isn't working

Comments

@lyoumi
Copy link

lyoumi commented Sep 27, 2022

  • OS: Windows 10 Pro
  • Valheim Game Version: 0.211.7
  • V+ Mod Version: 0.9.9.8

Describe the bug

A clear and concise description of what the bug is and how you found it.

To Reproduce

Steps for the devs to reproduce the behavior:

  1. Download server files
  2. Install it to the game folder according to instruction
  3. Launch the game
  4. Game UI is broken, some button is not active

Expected behavior

Game starting correctly

Troubleshooting

I tried to download game server once again and install it over the clean game setup, but issue was reproduced.
[Message: BepInEx] BepInEx 5.4.19.0 - valheim (27.09.2022 14:19:58) [Info : BepInEx] Running under Unity v2020.3.33.9525882 [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.19.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] 1 plugins to load [Info : BepInEx] Loading [Valheim Plus 0.9.9.8] ... [Info :Valheim Plus] Configuration file loaded succesfully. [Warning: HarmonyX] AccessTools.DeclaredMethod: Could not find method for type Chat and name OnNewChatMessage and parameters (UnityEngine.GameObject, long, UnityEngine.Vector3, Talker+Type, string, string) [Error : Unity Log] ArgumentException: Undefined target method for patch method static bool ValheimPlus.GameClasses.Chat_AddInworldText_Patch::Prefix(Chat& __instance, UnityEngine.GameObject go, long senderID, UnityEngine.Vector3 pos, Talker+Type type, string user, string text) Stack trace: HarmonyLib.PatchClassProcessor.PatchWithAttributes (System.Reflection.MethodBase& lastOriginal) (at <474744d65d8e460fa08cd5fd82b5d65f>:0) HarmonyLib.PatchClassProcessor.Patch () (at <474744d65d8e460fa08cd5fd82b5d65f>:0) Rethrow as HarmonyException: Patching exception in method null HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) (at <474744d65d8e460fa08cd5fd82b5d65f>:0) HarmonyLib.PatchClassProcessor.Patch () (at <474744d65d8e460fa08cd5fd82b5d65f>:0) HarmonyLib.Harmony.<PatchAll>b__11_0 (System.Type type) (at <474744d65d8e460fa08cd5fd82b5d65f>:0) HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable1[T] sequence, System.Action`1[T] action) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.PatchAll () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
ValheimPlus.ValheimPlusPlugin.Awake () (at <8d21b3cade284489bb9f6cebda2f9f8b>:0)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Application:.cctor()

[Message: BepInEx] Chainloader startup complete
[Info : Unity Log] 09/27/2022 15:05:23: Starting to load scene:start

[Warning: Unity Log] Only custom filters can be played. Please add a custom filter or an audioclip to the audiosource (Amb_MainMenu).
[Info : Unity Log] 09/27/2022 15:05:27: Using environment steamid 892970

[Info : Unity Log] 09/27/2022 15:05:27: Using steam APPID:892970

Setting breakpad minidump AppID = 892970
SteamInternal_SetMinidumpSteamID: Caching Steam ID: ***[API loaded no]
[Info : Unity Log] 09/27/2022 15:05:27: Authentication:k_ESteamNetworkingAvailability_Attempting

[Info : Unity Log] 09/27/2022 15:05:27: Steam initialized, persona:jomski troll

[Info : Unity Log] 09/27/2022 15:05:27: PlayFab custom ID set to "***"

[Info : Unity Log] 09/27/2022 15:05:27: Using default prefs

[Info : Unity Log] 09/27/2022 15:05:27: Valheim version:0.211.7

[Info : Unity Log] 09/27/2022 15:05:27: Render threading mode:MultiThreaded

[Error : Unity Log] MissingFieldException: Field 'FejdStartup.m_serverPlayerLimit' not found.
Stack trace:
(wrapper dynamic-method) FejdStartup.DMDFejdStartup::Awake(FejdStartup)

[Warning: Unity Log] 09/27/2022 15:05:27: Missing audio clip in music respawn

[Info : Unity Log] 09/27/2022 15:05:27: Checking for installed DLCs

[Info : Unity Log] 09/27/2022 15:05:27: DLC:beta installed:False

[Info : Unity Log] 09/27/2022 15:05:28: Ticket is System.Byte[] of length 369

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
ZInput.IsGamepadActive () (at <841306864da343f8aaec04315355c4f5>:0)
UIGroupHandler.Update () (at <408fb2feebfa4a519b8eeaef491b5d76>:0)

[Info : Unity Log] 09/27/2022 15:05:29: PlayFab logged in as "Steam_76561197979893848"

[Info : Unity Log] 09/27/2022 15:05:29: PlayFab local entity ID is 60BCA76F8FFE9F2B

[Info : Unity Log] 09/27/2022 15:05:29: UI Group status changed Menu = True
...
`

Screenshots

image
image
image

@lyoumi lyoumi added the bug Something isn't working label Sep 27, 2022
@snips86x
Copy link

The screenshots you have provided relate to a patch that was dropped today for Valheim. You will need to opt-in to the 'previous stable' release via the Beta menu within the steams game properties and use the following to update the server to use the previous stable:
app_update <app_id> [-beta <betaname>] [validate]

@kblaschke
Copy link
Contributor

@snips86x This might be a workaround for now, but not a viable one for those who want to use crossplay or have no control over server updates.

It looks like Valheim devs changed the Chat class a bit and now HarmonyX can't patch the code anymore and fails, which then leads to all kinds of issues as the game will run on half-patched code. There might be other functions that were changed though.

@lyoumi
Copy link
Author

lyoumi commented Sep 27, 2022

Yup. At the moment I changed game version to the previous stable one, nut agreed that this is temporary workaraond. Do you planing some fix for upcoming Valheim version?

@mdbdb
Copy link

mdbdb commented Sep 27, 2022

I run a Valheim server in the local network. I use https://github.com/lloesche/valheim-server-docker for this - V+ is already integrated there. Since I am not able to use the previous version in the Docker container, I have now copied the saves from the server and activated V+ locally on my computer with the above workaround. It works for now.

However, I hope that the developers will keep working on V+ and fix the bug.

@Tripoli69
Copy link

Yup. At the moment I changed game version to the previous stable one, nut agreed that this is temporary workaraond. Do you planing some fix for upcoming Valheim version?

How do you change the game version to the previous one? Tried searching for a solution, but can't find one.

@creativegaffers
Copy link

How do you change the game version to the previous one? Tried searching for a solution, but can't find one.

Someone on reddit suggested this, but I haven't tried it myself:

Steam > Valheim > Properties > Beta > default_old

@banspaugh
Copy link

The screenshots you have provided relate to a patch that was dropped today for Valheim. You will need to opt-in to the 'previous stable' release via the Beta menu within the steams game properties and use the following to update the server to use the previous stable: app_update <app_id> [-beta <betaname>] [validate]

Could someone let me know where to run this command app_update <app_id> [-beta <betaname>] [validate]

I use Gportal as a host and I'm not sure where to get in to run it. Is this even an option if I'm hosting with Gportal? TIA

@PedrinElPhreak
Copy link

I run a Valheim server in the local network. I use https://github.com/lloesche/valheim-server-docker for this - V+ is already integrated there. Since I am not able to use the previous version in the Docker container, I have now copied the saves from the server and activated V+ locally on my computer with the above workaround. It works for now.

However, I hope that the developers will keep working on V+ and fix the bug.

So I managed to apply the workaround in my server created by the same docker.
Here's How.

You will need to keep the docker running

Then from the server terminal, you'll access container terminal using:
docker exec -it vhserver-aline /bin/bash

then you'll need to put the -beta flag inside the 'valheim-updater' script by running
vi /usr/local/bin/valheim-updater

Then will open VI text editor
This file will have a line like this

download_valheim() {

so two lines below, will be the command that updates valheim
You'll need to put "-beta default_old" after the app-id.
IMPORTANT - To edit with VI you'll have to press 'i' to enter in insert mode, and will have to digit the text, since paste didn't work for me.

-beta default_old

After editing, press esc to leave the insert mode, and then press ':wq' for Write and Quit

Here is how my line gets after the change.

/opt/steamcmd/steamcmd.sh +force_install_dir "$valheim_download_path" +login anonymous +app_update 896660 -beta default_old $STEAMCMD_ARGS +quit

Works well for me. Hope this can help you.

@MartenBE
Copy link

MartenBE commented Sep 27, 2022

I run a Valheim server in the local network. I use https://github.com/lloesche/valheim-server-docker for this - V+ is already integrated there. Since I am not able to use the previous version in the Docker container, I have now copied the saves from the server and activated V+ locally on my computer with the above workaround. It works for now.

If you use that docker container, it doesn't need to be so complicated. Just add the STEAMCMD_ARGS environment variable and restart the docker container:

version: "3"

services:
    valheim:
      image: lloesche/valheim-server:latest
      ports:
          - "2456-2457:2456-2457/udp"
          - "8080:3000/tcp"
      environment:
          - "SERVER_NAME=A server"
          - "SERVER_PASS=${PASSWORD}"
          - "BEPINEX=false"
          - "VALHEIM_PLUS=true"
          - "STEAMCMD_ARGS=-beta default_old"
      volumes:
          - "./.files-valheim/config:/config"
          - "./.files-valheim/data:/opt/valheim"

For each client, change Steam Beta Option (steps provided by the Discord channel):

  1. Open steam library
  2. Right click valheim
  3. Manage
  4. Betas
  5. On the first field, click it to get the drop-down menu and change to default_old

Tested and works

@mdbdb
Copy link

mdbdb commented Sep 28, 2022

Tested and works

Yes, thank you. That works for me too. However, I hope that V+ will be updated in the very near future.

@losciamano
Copy link

For folks using mbround18/valheim instead of lloesche/valheim-server the env var to pass additional parameters to is ADDITIONAL_STEAMCMD_ARGS (this is documented on their github but not on docker hub).

Tested this today and works for now.

@smietanka
Copy link

Someone trying to fix that?

@healiha
Copy link
Contributor

healiha commented Oct 3, 2022

This will be fixed by #710
We're waiting for @nxPublic to be back as he's the only one who can approve the PR and create the release on github.

In the meantime, you can use the pre-release .dll which is available in the #alpha-releases channel of our discord.

@jdrusso
Copy link

jdrusso commented Oct 4, 2022

As of last night, @MartenBE 's -beta default_old fix for the https://github.com/lloesche/valheim-server-docker container no longer works for me :(

@SSimp258
Copy link

SSimp258 commented Oct 4, 2022

The reason it no longer works is the "default_old" version is now 211.7. The only workaround now is to get on the Valheim Plus Discord channel and get the alpha version. NX will be back this weekend to publish it. Once it gets published, Thunderstore and Nexus will work as normal.

@jdrusso
Copy link

jdrusso commented Oct 5, 2022

The following has temporarily resolved this for me with the https://github.com/lloesche/valheim-server-docker server container, using the alpha release DLL:

  1. Attach to container (docker exec -it valheim /bin/bash)
  2. Replace the DLL in /opt/valheim/plus/BepInEx/plugins with the alpha release, from discord
  3. Kill the currently running server with kill $(cat /var/run/valheim/valheim-server.pid)

The container will automatically run a new server process to restore the one you killed, which will load the new V+ DLL, and the logic to download V+ from github appears not to be run

I left -beta default_old on both the server + my client, but I'm not sure if it's necessary, I'm just lazy and it worked.

@avaryx
Copy link

avaryx commented Oct 6, 2022

To follow up on what @jdrusso has provided, I did the following:

  1. I downloaded the alpha ValheimPlus.dll from Discord
  2. I backed up my current ValeheimPlus.dll in my server directory, and replaced it with the alpha version
  3. I started up the container and the logs were fine

Note that the DLL is found here:
./valheim-server/data/plus/BepInEx/plugins/ValheimPlus.dll

I did not do anything with the -beta default_old settings but rather kept my server settings the same as they were before.

@healiha
Copy link
Contributor

healiha commented Oct 12, 2022

Closing with 0.9.9.9 release.

@healiha healiha closed this as completed Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests