Skip to content

A2S_INFO requests a challenge #15

Open

Description

@Crizztl

I noticed on many DayZ-Servers that A2S_INFO will require a challenge.
Currently, GetServerInfoAsync() will fail on those.

Activity

  1. Tony322 commented on Nov 3, 2021

    @Tony322

    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

    GetPlayers call does not cause any exception tho

  2. Crizztl commented on Nov 3, 2021

    @Crizztl
    Author

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions