steamcmd/api

Windows only tools not found

Closed this issue · 5 comments

Originally reported by NorbiPeti via Twitter.


When trying to retrieve info of app id 1078000 the API cannot find it and returns a 404:

$ curl https://api.steamcmd.net/v1/info/1078000
{"status": "error", "data": "No information for this specific app id could be found on Steam"}

After some digging it seems that Windows (only) tools are not found by the API because of the way steamcmd is utilized to find the information.

There is some weird behaviour with steamcmd. Using @sSteamCmdForcePlatformType windows should force steamcmd to look for Windows apps (as well) and therefor allow app_print_info (which is used by the API) to be able to print out the information. But this does not seem to work (non-interactively) for some reason. Example:

$ steamcmd +@sSteamCmdForcePlatformType windows +login anonymous +app_info_update 1 +app_info_print 1078000 +quit
Redirecting stderr to '/root/.steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
"@sSteamCmdForcePlatformType" = "windows"

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
No app info for AppID 1078000 found, requesting...

$ steamcmd +@sSteamCmdForcePlatformType windows +login anonymous +app_info_update 1 +app_info_print 1078000 +quit
Redirecting stderr to '/root/.steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.
"@sSteamCmdForcePlatformType" = "windows"

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
No app info for AppID 1078000 found, requesting...

The strange thing is that in the scenario that we use @sSteamCmdForcePlatformType interactively and the app_print_info command is executed it works, but only when executed a second time. Example:

$ steamcmd
Redirecting stderr to '/root/.steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Steam>@sSteamCmdForcePlatformType windows
"@sSteamCmdForcePlatformType" = "windows"

Steam>login anonymous

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK

Steam>app_info_print 1078000
No app info for AppID 1078000 found, requesting...

Steam>app_info_print 1078000
AppID : 1078000, change number : 10275981/10275981, last change : Mon Jan  4 10:45:13 2021
"1078000"
{
	"common"
	{
		"name"		"Gamecraft"
        ...
}

After having this done manually via the interactive steamcmd shell the platformtype settings is still set and the info can be retrieved via the non-interactive way as well, without even having to sSteamCmdForcePlatformType as an option. Example:

		"name"		"Gamecraft"
        ...
}

Steam>^C

$ steamcmd +login anonymous +app_info_update 1 +app_info_print 1078000 +quit
Redirecting stderr to '/root/.steam/logs/stderr.txt'
Looks like steam didn't shutdown cleanly, scheduling immediate update check
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK
AppID : 1078000, change number : 10275981/4294967295, last change : Mon Jan  4 10:45:13 2021
"1078000"
{
	"common"
	{
		"name"		"Gamecraft"
        ...
}

I tested this with local steamcmd instances on Ubuntu 18.04 and Ubuntu 20.04 and and on both used the steamcmd package from the official repo and the manual .tar.gz download to make sure there are not differences between them. Luckily this part at least is consistent.

My previous comment is not correct. When testing more scenarios it seems that the @sSteamCmdForcePlatformType option apparently is unnecessary. Purely executing the app_info_print command twice in an interactive steamcmd shell seems to be doing the trick. Example:

$ steamcmd
Redirecting stderr to '/root/.steam/logs/stderr.txt'
[  0%] Checking for available updates...
[----] Verifying installation...
Steam Console Client (c) Valve Corporation
-- type 'quit' to exit --
Loading Steam API...OK.

Steam>login anonymous

Connecting anonymously to Steam Public...Logged in OK
Waiting for user info...OK

Steam>app_info_print 1078000
No app info for AppID 1078000 found, requesting...

Steam>app_info_print 1078000
AppID : 1078000, change number : 10275981/10275981, last change : Mon Jan  4 11:08:38 2021
"1078000"
{
	"common"
	{
		"name"		"Gamecraft"
        ...
}
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Fixed by merging #26. This fix is tagged in version 1.9.0 and therefor deployed to the live API.