SteamKit icon indicating copy to clipboard operation
SteamKit copied to clipboard

ProtoBuf cannot deserialize message callback from GameCoordinator

Open 3fbaea00 opened this issue 1 year ago • 2 comments

I send a request for guild information for id 1021043:

var message = new ClientGCMsgProtobuf<CMsgClientToGCRequestAccountGuildEventData>(8673);
message.Body.guild_id = 1021043;
gameCoordinator.Send(message, 570);

and receive a response ClientGCMsgProtobuf(8674) with 650 bytes message where the ClientGCMsgProtobuf header is 17 bytes:

{
   HeaderLength: 9
   Msg: 8674
}

After header deserialization, an exception is thrown during the CMsgClientToGCRequestAccountGuildEventDataResponse body deserialization: ProtoBuf.ProtoException: Invalid wire-type (String); this usually means you have over-written a file without truncating or setting the length; see https://stackoverflow.com/q/2152978/23354.

Image

The body bytes: 080112f40408f3a83e12570a0630d185303032120630d18530303218d5f3e2c10620002800388daea5c9ed90eaa4a601402648ffea9412520b742e6d652f646f7461307858bed9b84c60086808700b78b0d8078001008801d5f3e2c10692010223341a140801120c4775696c64204c6561646572181f20011a0f080212074f666669636572180120021a0e080312064d656d62657218012003221408b7f08fda05100318baa2e3c1062090b3f6c106221408bbfcb8df03100118a39fe3c106208dcbe8c106221408e3add3e304100318ebe0e7c10620d0ffe7c106221408c2bcfee906100318deb1ebc106208ee0f0c106221408aa8391d604100318fc9ee8c10620f5b5e8c106221408b7fe9cfd06100318e7e8e7c106209fb3f6c106221308c1b7d856100318d79ee8c10620d2e8edc106221408c2a1b0ae01100318dba3e8c10620dcf4f2c106221408b58080c9041003188ba2e8c10620bce3f5c106221408ecf7a3ec04100318dfa3e8c10620fef0f4c106221408d4f1b9fb0310031894a4e8c1062086bbf6c106221408fefeace006100318b9abe8c1062085e1ebc106221308cdf1f146100318f0ace8c10620cea1f4c106221408a9b4f3a606100318c0e0e8c10620acb9f5c106221308aecb904d100318f6cae8c10620faace9c106221408e2fbc9d601100318cab9edc10620a8ededc1062214088984a696041003

I put this in https://good.tools/protobuf-decoder and saw the valid body Image but it doesn't look like CMsgClientToGCRequestAccountGuildEventDataResponse or at all, some other protobuf model inside MsgGCClientGuild class.

The ProtoBuf exception appears to be thrown due to a mismatch in the ProtoBuff models. Can you advise if this is the case, and how in a simple way I can get valid models if this is the case?

3fbaea00 avatar Jun 02 '25 15:06 3fbaea00

Here's valid ProtoBuf model: https://github.com/SteamDatabase/GameTracking-Dota2/blob/f84bcc41ca64f74a5f25575091160699d653608d/Protobufs/dota_gcmessages_client_guild.proto#L193

As long as I will use them

3fbaea00 avatar Jun 02 '25 15:06 3fbaea00

SteamKit doesn't have a CMsgClientToGCRequestGuildDataResponse implementation, what I was trying to use is Guild Events, not Guilds

3fbaea00 avatar Jun 02 '25 15:06 3fbaea00