Steamworks.GameServer.Init doesn't take 6 arguments / gameserver.init "bad_response"
See original GitHub issueSteam.cs : lines 156/162
public static bool Init(uint unIP, ushort usAuthPort, ushort usGamePort, ushort usQueryPort, EServerMode eServerMode, string pchVersionString) { // added AuthPort variable
InteropHelp.TestIfPlatformSupported();
bool ret;
using (var pchVersionString2 = new InteropHelp.UTF8StringHandle(pchVersionString)) {
ret = NativeMethods.SteamInternal_GameServer_Init(unIP, usAuthPort, usGamePort, usQueryPort, eServerMode, pchVersionString2); // use NativeMethods.SteamInternal_GameServer_Init instead
}
Steamworks GameServer won’t initialize correctly without the Authentication port, this allows the use of the Authentication port.
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (12 by maintainers)
Top Results From Across the Web
[Steamworks.NET] Could not initialize GameServer
I've got this error every time i start a game. ERR [Steamworks.NET] Could not initialize GameServer. I've reinstalled Steam and 7 days to ......
Read more >Dedicated Server dying on launch after today's update
Dedicated Server dying on launch after today's update. The error was: InvalidOperationException: Steamworks GameServer is not initialized.
Read more >[Steamworks.NET] Could not initialize GameServer
I've got this error every time i start a game. ERR [Steamworks.NET] Could not initialize GameServer. I've reinstalled Steam and 7 days to...
Read more >steam_api.h
Provides the core foundation to initialize and access the Steamworks API. ... k_EResultBadResponse, 76, Bad Response due to a Parse failure, missing field, ......
Read more >GameServer.LogOn timed out issues - no player can ...
I started dedicated server, forwarded ports, (26900-26910) but server still goes to time out. (see last row from log).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s the worksround we are using at the moment Simply passing in a value of 0 on the usSteam port I think the param is called.
We are seeing issues with GameServers not getting messages from clients when using SteamNetworking or SteamNetworkingSockets (and its GameServer varients) even with this work around in place. That issue may be releated to something else around Mirror or similar but was hoping the server intialization and transport issue was related for a single easy fix 😃
For the moment we using a modified Steam.cs which calls SteamInternal_GameServer_Init, from what I saw in the game server header this is what SteamGameServer_Init does anyway so I think that will do us for now.
I have done a re-read and some more testing on this one
using the source from this project directly so the assemblies are the ones included in this project’s Plugin folder.
As is e.g. without any changes when we initalize GameServer.init … we see the issue reported above, that is the odd looking UDP port binding on port 1 and the server will not show up in Steam Game Server Browser either via query through the API nor via the view in the Steam Client.
If we modify Steam.cs to call SteamInternal_GameServer_Init passing in any value even 0 as the second param the most apparent issues appear to resolve and the server shows up in the browser.
Having a look over the change you linked from Steamworks SDK and the related steam_gameserver.h I do see a note there
When I examen the NativeMethods.cs of Steamworks.NET for the method in question SteamGameServer_Init I see its referencing an entry point SteamGameServer_InitSafe
[DllImport(NativeLibraryName, EntryPoint = "SteamGameServer_InitSafe", CallingConvention = CallingConvention.Cdecl)]
That is as far as I got, its far to late in the evening 😃 … or well early in the day now 😦 … to keep poking Hopfully that is of some use to others