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

SteamCMD app_info_print no output to stdout before quit - Recent Issue #9683

Open
own3mall opened this issue Jun 20, 2023 · 15 comments
Open
Labels

Comments

@own3mall
Copy link

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

@tbeswick96
Copy link

tbeswick96 commented Jun 20, 2023

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)

@HunterZ
Copy link

HunterZ commented Jun 26, 2023

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

@GGHostDotGames
Copy link

GGHostDotGames commented Jun 30, 2023

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.

@GGHostDotGames
Copy link

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...

@0x00000ED
Copy link

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

@ThoronadNg
Copy link

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.

@Sipowicz
Copy link

Sipowicz commented Nov 26, 2023

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.

@tbeswick96
Copy link

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>).

@brandonsturgeon
Copy link

brandonsturgeon commented Dec 3, 2024

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)

@39sdev
Copy link

39sdev commented Dec 15, 2024

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.

@tuokri
Copy link

tuokri commented Dec 16, 2024

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

@own3mall
Copy link
Author

own3mall commented Dec 16, 2024

They broke it:

#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...

@FlaminSarge
Copy link

FlaminSarge commented Dec 18, 2024

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?

@svanegmond
Copy link

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

@JulianStiebler
Copy link

JulianStiebler commented Jan 3, 2025

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 you don't have to check many ID's, maybe you can create a script that interacts with a legit steamCMD as opposed to spawning one, login, and request twice. Maybe that works for ya aswell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests