Error STEAM: [AppId: 0] Game Server API initialized 0

Hello,
im trying to get my dedicated server running. I have compiled the engine and added steamworks. the modules etc should be fine.
I think it might be a problem with the config files. When i try to launch the dedicated server it tells me appID=0.
The defaultengine.ini should be correct since steam is launching in clientmode(i can even start a listenserver).

Any idea what might cause this ? Thanks for ur help :)(steam integration is really a time sink…)

----------------What i also discovered is:
(Ue4-18.2 from laucher): 
Steam works in editor mode/standalone client

(Ue4-19.2 from github): PACKED GAME
Steam doesnt work in development editor mode.
Steam doesnt work on development dedicated server.
But Steam works when i lauch game (development client mode)


---------------------------LOGS:
LogOnline: Display: STEAM: Loading Steam SDK 1.39
LogOnline: Verbose: STEAM: Initializing Steam Game Server IP: 0x00000000 Port: 7777 SteamPort: 7778 QueryPort: 27015
LogOnline: STEAM: [AppId: 0] Game Server API initialized 0
LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: Warning: STEAM: Steam API failed to initialize!
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()

SOLVED:
i solved it with placing an steam_appid.txt in the same folder.

i think its a little strange that the client creates/deletes its own steam_appid.txt but the server doesnt it.
hope this helps some other ppl

For anyone googling, “same folder” means same folder as the binary. On a linux dedicated server that meant: [Gamename]/Binaries/Linux

@muchcharles Does this apply for Development Build also? Also everytime i paste the txt file there it dissappears after launching server. Is this supposed to happen?

1 Like

i have same problem and (steam_appid) it getting deletes every time i open the game/server — did u solved it ?

1 Like

Hi!

We are having the exact same issue in our project and I was wandering if you remembered what port you opened on your dedicated server?

I also have this exact same issue. (Development build, I haven’t tested shipping)

  • I have my custom AppId.
  • Dedicated Linux server works
  • Dedicated Windows server on a Windows Server, does not work. Because, there and ONLY there, appId is weirdly zero for some reason.
  • Using the exact same build (copy paste) on my own W10 machine, the dedicated server works just fine. But it has a Steam Client installed.

Things I have double checked/done on the Windows Server:

  • SteamCMD is in the path (just in case).
  • Briefly disabled the firewall in the OS and in the baremetal host provider, to ensure it wasn’t a firewall issue (though of course the relevant ports were already open)
  • The 3 steam DLLs are inside of the packaged folder in binary/thirdparties/steam/v157/etc…
  • Manually adding steam_appid.txt, it dissapears as soon as I start the executable (which makes sense since a few ms after the start of the executable, the OnlineSubsystemSteam fails to initialize, shuts down, and in the shutdown function is the deletion of this file.) This enabled me to check if it was somehow a filesystem access rights issue. This didn’t change anything, which means the accepted solution doesn’t work anymore. I suspect since they redid things in 4.24

The logs, of course, are completely unhelpful.

LogSteamShared: Display: Loading Steam SDK 1.57
LogSteamShared: Steam SDK Loaded!
LogSteamShared: Warning: Steam Dedicated Server API failed to initialize.
LogOnline: STEAM: [AppId: 0] Game Server API initialized 0
LogOnline: Warning: STEAM: Failed to initialize Steam, this could be due to a Steam server and client running on the same machine. Try running with -NOSTEAM on the cmdline to disable.
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()
LogOnline: Warning: STEAM: Steam API failed to initialize!
LogOnline: Display: STEAM: OnlineSubsystemSteam::Shutdown()

I guess I will next have to try a shipping build, since shipping builds use the Target.cs variables, like UE_PROJECT_STEAMSHIPPINGID, instead of the config variables like SteamDevAppId. But it really seems like the non shipping builds are completely broken without a steam client somehow.

Or maybe install rider on my windows server machine and debug step by step the issue… Remote ssh debugging is a pain for stuff that happens immediately after opening an executable.

If someone has a solution, I would be interested!