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]: vhserver update error "[ FAIL ] Updating vhserver: Checking remote build: SteamCMD" #4713

Open
historical-theology opened this issue Dec 9, 2024 · 29 comments

Comments

@historical-theology
Copy link

User story

Fresh Valheim server installation with LinuxGSM in Debian 12. Running ./vhserver update yields this error message.

Game

Valheim

Linux distro

Debian 12

Command

command: update

Further information

This issue was just mentioned in a separate issue thread by @jaumebecks:

#4588 (comment)

It is not isolated to my own setup.

Relevant log output

[ FAIL ] Updating vhserver: Checking remote build: SteamCMD

Steps to reproduce

No response

@Aquato
Copy link

Aquato commented Dec 10, 2024

The same here.
On Satisfactory Server.
It is not necessarily the update function, as the check for update function is also affected and is certainly part of the update function.
The Steam version cannot be accessed, it seems.

@irobot73
Copy link

Same for most of the servers I run (PW, PZ, VH, SDTD).

Simply run SteamCMD manually & seems to work as expected

steam_upd.sh

#!/usr/bin/env bash
/app/*server stop
steamcmd +runscript /data/steamcmd.txt
/app/*server start

steamcmd.txt

force_install_dir /data/serverfiles
login anonymous 

// https://steamdb.info/app/{Steam_Dedi_Id}
//app_update {Steam_Dedi_Id} validate //-beta latest_experimental //{depot_id}

quit

@Aquato
Copy link

Aquato commented Dec 11, 2024

If you address the server with the parameter fu "force update" it also works manually. But it's all inconvenient and takes time.

@majorpdd
Copy link

Same here for insurgency server

@freaky-m0
Copy link

It seems to me that steamcmd no longer provides the necessary information.

vhserver@gameserver:~$ steamcmd +login user password +app_info_update 1 +app_info_print 896660 +quit
Redirecting stderr to '/home/vhserver/.local/share/Steam/logs/stderr.txt'
Logging directory: '/home/vhserver/.local/share/Steam/logs'
[  0%] Checking for available updates...
[----] Verifying installation...
UpdateUI: skip show logoSteam Console Client (c) Valve Corporation - version 1733269577
-- type 'quit' to exit --
Loading Steam API...OK
Logging in using username/password.
Logging in user '15_tatsache' [U:1:123456789] to Steam Public...OK
Waiting for client config...OK
Waiting for user info...OK
No app info for AppID 896660 found, requesting...
vhserver@gameserver:~$

From lgsm/modules/core_steamcmd.sh // fn_update_steamcmd_remotebuild():

remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

From log/steam/appinfo_log.txt:

[2024-12-13 21:14:03] Client version: 1733269577
[2024-12-13 21:14:03] ThreadedReadFromDisk: loading appinfo cache from: /home/vhserver/.local/share/Steam/appcache/appinfo.vdf
[2024-12-13 21:14:03] ThreadedReadFromDisk: header version: 0x7564429
[2024-12-13 21:14:03] ThreadedReadFromDisk: apps updated: 181
[2024-12-13 21:14:03] CAppInfoCacheReadFromDiskThread took 5 milliseconds to initialize
[2024-12-13 21:14:05] RequestAppInfoUpdate: AppIDs 7
[2024-12-13 21:14:06] Change number 26635879->26635881, apps: 0/2, packages: 0/0
[2024-12-13 21:14:06] Requesting 2 apps, 0 packages (meta data, 1024 prev attempts, expected 0 KB)
[2024-12-13 21:14:06] GetValidPlatforms: skipping platform entry  macos for app 18010
[2024-12-13 21:14:06] Requested 1 app access tokens, 0 received, 1 denied
[2024-12-13 21:14:06] UpdatesJob: finished OK, apps updated 0 (0 KB), packages updated 0 (0 KB)

@AndrewSav
Copy link

AndrewSav commented Dec 14, 2024

It seems to me that steamcmd no longer provides the necessary information.

We can confidently say that the old way does not work. I do not think you can blanketly judge "that steamcmd no longer provides the necessary information". Perhaps it changed, or perhaps the devloper need to come with an alternate way of doing this to fix the issue. For example we can see that this latest build id number is still publicly available here: https://steamdb.info/app/1690800/depots/?branch=public (I'm giving the satisfactory example, because this is the game server I have problems with) so it would be reasonable to assume there are working ways to retreive it.

@AndrewSav
Copy link

AndrewSav commented Dec 14, 2024

Related: ValveSoftware/steam-for-linux#11521 FWIW, the app info steamcmd command does work with an authenticated account (if you jump through the steam guard / 2FA hoops) and it does work with a game server token (you need to have the game registered to the account in question). The latter may be a practical way to fix this, but that requires lgsm code changes as it cannot authenticate via those tokens at the moment. Turned out I got that last bit wrong and probably was using cached credentials instead when it worked.

@dgibbs64
Copy link
Member

We were hoping that once they completed the updates to the various appid's it would settle down. Its appears that is not the case

@freaky-m0
Copy link

freaky-m0 commented Dec 14, 2024

...I do not think you can blanketly judge "that steamcmd no longer provides the necessary information". Perhaps it changed, or perhaps the devloper need to come with an alternate way of doing this to fix the issue...

I just wanted to say that this is the reason why it fails: An output from Steamcmd is missing. It is of course clear that there can be many reasons for this or different solutions. It should just help to understand/find the cause

Thanks for linking the related issue :)

@dgibbs64
Copy link
Member

I would rather not have to go down the route of LinuxGSM having to use logins to get the info moving forward. It is still not clear what the solution is moving forward. If anyone has any success getting appid info without requiring login please let us know

@svanegmond
Copy link

I poked around on this. My problem is with sfserver. It is the same problem, no app info returned from steamcmd.

While experimenting, I left off the +quit and entered app_info_print 1690800 interactively and got a response payload.

Then I went into core_steamcmd.sh and removed the passage which deletes appinfo.vdk at line 170.

sfserver update now runs successfully.

If I stack multiple app_info_print's on the command line I sometimes get an empty payload, like this:

AppID : 1690800, change number : 0/0, last change : Wed Dec 31 19:00:00 1969
"1690800"
{
}

I am still unable to reliably cause steamcmd to return a payload via a script without the step of doing this interactively.

@AndrewSav
Copy link

AndrewSav commented Dec 15, 2024

You probably could run steamcmd in backgroud, sleep a little and then kill it once the info is retreived. Terrible, I know. As a PoC:

docker run -it --rm --init --name steamcmd --entrypoint /bin/bash gameservermanagers/steamcmd:latest -c \
  "apt update && DEBIAN_FRONTEND='noninteractive' apt install screen -y && \
  rm -f /root/.local/share/Steam/appcache/appinfo.vdf && \
  screen -d -m -S steam steamcmd +login anonymous +app_info_print 1690800 && \
  while [ ! -f /root/.local/share/Steam/appcache/appinfo.vdf ]; do sleep 1; done && \
  sleep 5 && \
  screen -S steam -p 0 -X stuff "quit^M" && \
  steamcmd +login anonymous +app_info_print 1690800 +quit"

@FlaminSarge
Copy link

FlaminSarge commented Dec 18, 2024

Editing https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/modules/core_steamcmd.sh#L186 with the solution presented in ValveSoftware/steam-for-linux#9683 (comment) (extra +app_info_request APPID + +login anonymous) worked for me for working around steamcmd's issue.

My full replaced line:

	remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

@AndrewSav
Copy link

Looks like it comes down to timing. If you cause the command to delay long enough to get the info before it quits you get the results. So padding it in any way to make it run longer seems to work.

@FlaminSarge
Copy link

Looks like it comes down to timing. If you cause the command to delay long enough to get the info before it quits you get the results. So padding it in any way to make it run longer seems to work.

Right, but prior to some update, it would wait/block for app_info_print to finish before moving on to the next command, but not anymore, necessitating the extra commands to stall.
If this isn't something that can be reverted, may be useful to add app_info_print_blocking or something to replicate old behavior. As it stands, though, app_info_print arbitrarily not printing anything despite the "requesting..." message seems like a bug, not a feature.

@AndrewSav
Copy link

That probably best to go somewhere where it can be actioned, e.g. ValveSoftware/steam-for-linux#11521 linked above.

@dgibbs64
Copy link
Member

Yeah, I suggest leaving comments on the steam-for-linux issues page. Upvote related issues as well. As currently this is something that Valve have broken and there is no decent workaround currently. Hopefully they sort it out soon. Until there is a reliable workaround we can use or a fix there isnt anything I can do currently.

@sahammer
Copy link

sahammer commented Dec 18, 2024

Editing https://github.com/GameServerManagers/LinuxGSM/blob/master/lgsm/modules/core_steamcmd.sh#L186 with the solution presented in ValveSoftware/steam-for-linux#9683 (comment) (extra +app_info_request APPID + +login anonymous) worked for me for working around steamcmd's issue.

My full replaced line:

	remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

Just wanted to chime in here and say, this change worked for me with Satisfactory as well as Valheim.

Edit: It worked for ./server cu - but there's no updates at the moment so cant test update.

@Mystik-Spiral
Copy link

This also worked for me to fix the command "l4d2server check-update" and the command "l4d2server update":

from:
remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/"${branch}"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

to:
remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/"${branch}"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

Thank you freaky-m0 and sahammer.

@Aquato
Copy link

Aquato commented Dec 19, 2024

This also worked for me to fix the command "l4d2server check-update" and the command "l4d2server update":

from: remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/"${branch}"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

to: remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/"${branch}"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

Thank you freaky-m0 and sahammer.

Some chars are missing here. Must be ...
to: remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

the \ will be deleted if you do not mark the text as code.
But then the code works again for me :) and the remote build can be accessed. Thx to all!

@dgibbs64
Copy link
Member

Looks like we might have a workaround. I will do some testing with this suggestion to see how well it works. If successful I will get a hot fix out 😊

@Mystik-Spiral
Copy link

@Aquato Yes, you are correct. I posted without marking as code and it stripped the back slashes. Sorry about that and thank you for correcting! What you have is correct, but I am posting again as confirmation:

In:
core_steamcmd.sh

from:
remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

to:
remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

@dgibbs64
Copy link
Member

dgibbs64 commented Dec 19, 2024

Any reason why we need +login twice?

edit: becuase it dont work without login twice 🙄

@AndrewSav
Copy link

AndrewSav commented Dec 19, 2024

My opinion, is that anything that is running long enough to let the async call to get the information will work. So if you do not pad it with enough commands, such as login, it still sometimes not going to get the data. Of course it all depends on timing and therefore results may wary, but the longer it takes the more probability the data will be there.

@AndrewSav
Copy link

FWIW the above "fix" works most of the time but not all of the time during my testing. About 1 time out of ten on my box it still returms nothing.

@Mystik-Spiral
Copy link

@AndrewSav Here is a very small change (added +logoff before +quit) and I am curious if it helps you go from 90% to 100% working:

remotebuildversion=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_request "${appid}" +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +logoff +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]')

@AndrewSav
Copy link

@Mystik-Spiral I think I'll leave it where it is. I wrote an automation script to demonstrate the failures, but with the script it is not failing any more, only ocasionally fails when running manually from the command line. Probably comes down to some wierd timing and good enough.

@dgibbs64
Copy link
Member

Yeah, sounds like the hotfix have reduced the problem but probably to got rid of it totally...which is a step in the right direction.

@FlaminSarge
Copy link

Any reason why we need +login twice?

The only purpose of the second login/etc is to stall for long enough that the app_info_request finishes and populates the temp vdf files, so that the followup app_info_print just reads from the vdf instead of fetching from remote again.
The core issue is that they changed app_info_print to not block+wait for response, and instead made it print its info as a side-effect during execution if the info was available, or no-op while fetching the info if it was not available. This seems like a bug on steamcmd's end and we'll have to keep track of ValveSoftware/steam-for-linux#9683 for when they eventually fix it. The other option is to loop, say, 10 times trying to fetch the info (without deleting local temp vdf) to see if app_info_print will eventually get it on its own, which may be a bit more deterministic than hoping that 2 logins is enough stall time for the request to finish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🆕 New Issues
Development

No branches or pull requests