You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this is why my query against a valheim suddenly broke for me.
GetServerInfoAsync and the sync counterpart throws an exception using this example code
IServerQuery serverQuery = new ServerQuery(info.Ip, steamQueryPort);
var serverInfo = await serverQuery.GetServerInfoAsync().ConfigureAwait(false);
The serverQuery instance show its IsConnected flag as true.
I noted there is a implementation of requestChallange/RenewChallange, altho, i dont see a way to use them.
The actual exception: System.NullReferenceException: Object reference not set to an instance of an object. at SteamQueryNet.Utils.DataResolutionUtils.ExtractData[TObject](TObject objectRef, Byte[] dataSource, String edfPropName, Boolean stripHeaders) at SteamQueryNet.ServerQuery.GetServerInfoAsync() at ... local stacktrace
GetServerInfoAsync() uses SteamQueryNet.Utils.RequestHelpers.PrepareAS2_INFO_Request() which ignores challenges.
GetPlayers() uses PrepareAS2_GENERIC_Request() which works with challenges.
It has to be rewritten.
There's a Pull Request which includes this fix.
Activity
Tony322 commentedon Nov 3, 2021
I think this is why my query against a valheim suddenly broke for me.
GetServerInfoAsync and the sync counterpart throws an exception using this example code
The serverQuery instance show its IsConnected flag as true.
I noted there is a implementation of requestChallange/RenewChallange, altho, i dont see a way to use them.
The actual exception:
System.NullReferenceException: Object reference not set to an instance of an object. at SteamQueryNet.Utils.DataResolutionUtils.ExtractData[TObject](TObject objectRef, Byte[] dataSource, String edfPropName, Boolean stripHeaders) at SteamQueryNet.ServerQuery.GetServerInfoAsync() at ... local stacktraceGetPlayers call does not cause any exception tho
Crizztl commentedon Nov 3, 2021
GetServerInfoAsync() uses
SteamQueryNet.Utils.RequestHelpers.PrepareAS2_INFO_Request()which ignores challenges.GetPlayers() uses
PrepareAS2_GENERIC_Request()which works with challenges.It has to be rewritten.
There's a Pull Request which includes this fix.