Accessing "SteamNetworkingUtils003" before "SteamAPI_Init" succeeded error
See original GitHub issueDescribe the bug [S_API FAIL] Tried to access Steam interface SteamNetworkingUtils003 before SteamAPI_Init succeeded.
Build version prints this error, but Unity editor doesn’t. It doesn’t break the server, but it makes it, so I can’t query rules from that server. I’ve tried building the newest release, but get errors about net46 (am on Linux). So I settled with https://github.com/Crytilis/Facepunch.Steamworks fork instead. It didn’t help.
Server is functioning, at least the basic query is. But the QueryRulesAsync() doesn’t give any results.
I have identified, that the error comes from “SteamServer.Init(AppId, serverInit);”, and it’s not “bool asyncCallbacks”.
It might be because the steamclient.so is wrong on both my PC and my VPS (tried it on both machines). Since I’m linking it usually from linux64/. Linking it, copying it, using 32bit instead (wrong elfclass error), didn’t fix it, neither did adding a steam_appid.txt.
I tried removing all other Steamworks functionality to see if I’m calling it somewhere I shouldn’t, but it also didn’t help.
Google didn’t help me either. So finally coming here.
Also my game is supposed to release in 1 week, so that’s fun.
To Reproduce Steps to reproduce the behavior:
- Start server with server-only build
- “Tried to access Steam interface SteamNetworkingUtils003 before SteamAPI_Init succeeded.” error
- Not being able to get server rules results from query
Calling Code
private IEnumerator StartServer()
{
try
{
_isDedicatedServer = true;
var serverInit = new SteamServerInit("TagHop", "TagHop");
serverInit.GamePort = _gamePort;
serverInit.Secure = true;
serverInit.QueryPort = _queryPort;
serverInit.SteamPort = 27016;
serverInit.VersionString = _gameController.Version.ToStringSteam();//"0.1.3.0";
SteamServer.Init(AppId, serverInit);//LINE THAT TRIGGERS THE ERROR
SteamServer.ServerName = "Test Server";
SteamServer.LogOnAnonymous();
}
catch (Exception e)
{
Log.Error("Failed making a steam server");
Log.Exception(e);
}
if (!SteamServer.IsValid)
{
yield return new WaitForSeconds(1f);
Log.Error("Steam server isn't valid");
}
}
Desktop (please complete the following information):
- OS: Arch Linux LTS
- Unity 2020.3.25f1
Additional context Here’s the log (removed the redundant lines):
Preloaded ‘libsteam_api.so’ Initialize engine version: 2020.3.25f1 (9b9180224418) Begin MonoManager ReloadAssembly - Completed reload, in 0.066 seconds … UnloadTime: 0.497467 ms .… dlopen failed trying to load: steamclient.so with error: steamclient.so: cannot open shared object file: No such file or directory [S_API] SteamAPI_Init(): Loaded ‘/home/hostname/.local/share/Steam/linux64/steamclient.so’ OK. (First tried local ‘steamclient.so’) CAppInfoCacheReadFromDiskThread took 11 milliseconds to initialize Setting breakpad minidump AppID = 1625330 [S_API FAIL] Tried to access Steam interface SteamNetworkingUtils003 before SteamAPI_Init succeeded. .… UnloadTime: 3.921835 ms Finished loading scene in server-only mode.
Unloading 78 unused Assets to reduce memory usage. Loaded Objects now: 4942. Total: 11.692430 ms (FindLiveObjects: 0.185797 ms CreateObjectMapping: 0.082222 ms MarkObjects: 11.256767 ms DeleteObjects: 0.167282 ms)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top GitHub Comments
My memory is foggy, but I think I also might have gotten “Loaded local ‘steamclient.so’ OK.” before, and still got the same error.
What kind of crash is it? The one I get is that I can’t query for rules, and some additional extra logic.
The code hasn’t really changed since. The workaround doesn’t make the error go away, or fix the issue. It’s a way to get “rules”(extra info) without being able to query for them. I basically store all the data in SteamServer.ServerName instead.