protonscr

SteamCMD app_info_print no output to stdout before quit - Recent Issue

steamopen SteamCMD
ValveSoftware/steam-for-linux#9683 · opened 2023-06-20 by own3mall · updated 2025-01-06 · 15 comments · github
Oown3mall 2023-06-20 github

Your system information

Latest steamcmd linux script:

./steamcmd.sh +login anonymous +app_info_update 1 +app_info_print 232130 +quit

Please describe your issue in as much detail as possible:

./steamcmd.sh +login anonymous +app_info_update 1 +app_info_print 232130 +quit produces no output before exit.

./steamcmd.sh +login anonymous +app_info_update 1 +app_info_print 232130 prints output but doesn't exit (because no quit parameter passed in)

Steps for reproducing this issue:

  1. Run this command: ./steamcmd.sh +login anonymous +app_info_update 1 +app_info_print 232130 +quit
  2. No app_info_print output.

It should output to stdout the same thing it does when running the script without the +quit parameter:

./steamcmd.sh +login anonymous +app_info_update 1 +app_info_print 232130

Ttbeswick96 2023-06-20 github

Am having the same problem on Windows.
Same command but with APP ID 233780 (don't think that matters)

Same thing working without +quit bt not working with +quit. Sometimes it dumps the data, most of the time it does not.

This started happening for me on 15th June (confirmed working on 13th)

HHunterZ 2023-06-26 github

For me it sometimes prints the info and sometimes does not. Very strange.

GGGHostDotGames 2023-06-30 github

Same problem here with SteamCMD on Windows. It started about two weeks ago. I ended up putting the command in a loop, which checks if the required output is there and, if not, repeats the command. Loops every 0.5s and usually returns the results within ten iterations.

GGGHostDotGames 2023-06-30 github

Based on the output it does give on failed attempts, it would seem as if it fails on executions where SteamCMD decides to autoupdate itself. The successful executions seem to be the ones where the auto-update was skipped.

For example, a successful execution's output:

Steam Console Client (c) Valve Corporation - version 1687387651
-- type 'quit' to exit --
Loading Steam API...OK
src\public\tier1\interface.h (265) : m_pModule
AppID : 4940, change number : 19358343/0, last change : Fri Jun 30 21:02:11 2023 
"4940"
{
	"common"
	{
	
	etc, etc

Vs a failed one:

Steam Console Client (c) Valve Corporation - version 1687387651
-- type 'quit' to exit --
Loading Steam API...OK
src\public\tier1\interface.h (265) : m_pModule
Redirecting stderr to 'C:\Users\juanh\Desktop\SCUMUpdater4\steamcmd\logs\stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
00x00000ED 2023-08-20 github

Windows.

Hello, I’ll say right away that everything worked before, but now I can’t get the vdf package in node js
I run node script like this

let cmd = spawn(
this.#launcher,
['+login', this.#username, '+app_info_update', '0', '+app_info_print', serverAppID, "+quit"],
{cwd: this.#folder, shell: false}
);

cmd.stdout.on('data', (data) => {
stdout += data.toString();

console.log(data.toString());
});

// this.#username = "anonymous"
// serverAppID = "232330"

stamcmd exits and I don't get information about the requested application

log

Steam Console Client (c) Valve Corporation - version 1691628584
-- type 'quit' to exit --
Loading Steam API...OK

Connecting anonymously to Steam Public...
OK
Waiting for client config...OK
Waiting for user info...
OK

Redirecting stderr to 'D:\server\server\[SteamCmd]\logs\stderr.txt'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[] Проверка на наличие обновлений...
[----] Проверка установки...

How to fix it?
please don't suggest to use runscript

TThoronadNg 2023-11-11 github

still the same problem here.
when i use steamcmd.exe +login anonymous +app_info_update 1 +app_info_print 232130 +quit
it rarly prints out the app_info before quit.

SSipowicz 2023-11-26 github

Hello everyone,

TL:DR - I use this and it works now:
steamcmd.exe +login anonymous +app_info_update +app_info_print steamAppID +logoff +quit

I am working with Windows server 2022, but the issue was the same when using SteamCMD

steamcmd.exe +login anonymous +app_info_update 1 +app_info_print $steamAppID +app_info_print $steamAppID +quit - normally produces the wrong output, but randomly produces the correct output. Removing +quit always produces correct output.

When I originally started using this command in 2016 it worked fine.
After few years it randomly stopped working reliably which I was able to fix by adding a few more "+app_info_print"s
steamcmd.exe +login anonymous +app_info_update 1 +app_info_print $steamAppID +app_info_print $steamAppID +app_info_print $steamAppID +app_info_print $steamAppID +quit - This worked up until a few weeks ago (as far as I can tell).

It seemed like the data pull was being cut off by the +quit option, so I added +logoff before +quit, and that seems to have done the trick.

Ttbeswick96 2024-03-22 github

So doing the +logoff worked to make it dump the output. Now I occasionally get invalid JSON:
Why is there an OK in the middle of the dump? Seems possibly like text dumps are getting mixed up as that OK is from a previous message (e.g Logging off current session...<OK should be here>).

Ssarahsturgeon 2024-12-03 github

The last solution here stopped working for me (within the last few days).

However, I found something that works again (for me):

steamcmd.sh \
    +login anonymous \
    +app_info_request <id> \
    +login anonymous \
    +app_info_print <id> \
    +quit

If we're lucky, +login actually waits for all pending requests to finish.

If we're unlucky, this is just introducing an artificial delay which gives app_info_request enough time to finish.

In the event that the latter is true, you could just keep adding more +login anonymous until you get a sufficiently safe delay... 😅

I hope we get one of the following solutions:

  • Make app_info_request/app_info_update 1 blocking, or add blocking alternatives
  • Make app_info_print blocking until the data is received
  • Or, give us some kind of +wait that either:
    • Waits for all pending requests to finish (🙏)
    • Blocks for the given number of seconds (💩 but workable)
339sdev 2024-12-15 github

The last solution here stopped working for me (within the last few days).

However, I found something that works again (for me):

steamcmd.sh \
    +login anonymous \
    +app_info_request <id> \
    +login anonymous \
    +app_info_print <id> \
    +quit

this works most of the time. but for some apps it also fails.

I got this response from it:

AppID : 730, change number : 26584392/26584392, last change : Sun Dec 15 13:25:00 2024 
"730"
{
}

and it just stays that way, even if rerun.
is there some cache it keeps?

edit:

is there some cache it keeps?

it does, at ~/.local/share/Steam/appcache/appinfo.vdf
deleting it makes it work again.

Ttuokri 2024-12-16 github

The +logoff trick seems to work for me for the time being. For reference, here's a snippet from the script I use:

. $PSScriptRoot\__VARIABLES.ps1

$Proc = Start-Process -FilePath "$STEAMCMD_EXE_PATH" `
    -ArgumentList "+force_install_dir", \"$SERVER_DIR_PATH\", `
    "+login", $STEAM_USERNAME, $STEAM_PASSWORD, `
    "+app_info_update", "1", `
    "+app_status", "REDACTED", `
    "+app_info_print", "REDACTED", `
    "+logoff", `
    "+quit" `
    -NoNewWindow `
    -Wait `
    -PassThru

exit $Proc.ExitCode
Oown3mall 2024-12-16 github

They broke it:

https://github.com/ValveSoftware/steam-for-linux/issues/11521

Basically, you're unable to query information about the server files unless you login and own the games. Which is really dumb when it comes to making an API to check build IDs...

FFlaminSarge 2024-12-18 github

Was app_info_print made non-blocking for some reason? Made to mirror the behavior of app_info_request plus print as a side-effect instead of as an end result?

Ssvanegmond 2024-12-30 github

Please fix this absurd bug. The info command should return a response before moving to the next command.

JJulianStiebler 2025-01-03 github

I found working to login with a unlimited steam account in a interactive steamCMD, as opposed to programatically; sending app_info_print may still result in a empty response like "No app info found, requesting...", but sending it a second time does bring back a full response if logged in a unlimtied steam account. When i try it anonymous, i only get back {}. Same if programmatically.