DoctorMcKay / node-globaloffensive

A Node.js module to connect to and interact with the CS2 game coordinator. Mostly used to get item data.
https://www.npmjs.com/package/globaloffensive
MIT License
262 stars 61 forks source link

cant connect to steam GC #85

Closed niksad8 closed 9 months ago

niksad8 commented 9 months ago
[steam][ownershipCached] Already own CSGO
[steam] Sending message: ClientChangeStatus
[steam] Sending message: ClientGamesPlayedWithDataBlob
[steam] [W1#17] Handled message: ClientPersonaState
[steam] [W1#17] Handled message: ClientPersonaState
[steam] [W1#18] Handled message: ClientPlayingSessionState
[steam] [W1#18] Handled message: ClientGameConnectTokens
[steam] Received 1 game connect tokens. Had 10 tokens.
[steam] [W1#18] Unhandled message: PlayerClient.NotifyLastPlayedTimes#1
[steam] [W1#19] Handled message: ClientPersonaState
[csgo][debug] Sending GC message ClientHello
[steam] Sending 730 GC message 4006
[steam] Sending message: ClientToGC
[csgo][debug] Sending hello, setting timer for next attempt to 2000 ms
[steam] [W1#20] Unhandled message: ClientServersAvailable
[steam] [W1#21] Unhandled message: ClientServiceCall
[steam] [W1#22] Handled message: ClientFromGC
[steam] Received 730 GC message 9187
[csgo][debug] Got unhandled GC message 9187
[csgo][debug] Sending GC message ClientHello
[steam] Sending 730 GC message 4006
[steam] Sending message: ClientToGC
[csgo][debug] Sending hello, setting timer for next attempt to 4000 ms
[csgo][debug] Sending GC message ClientHello
[steam] Sending 730 GC message 4006
[steam] Sending message: ClientToGC
[csgo][debug] Sending hello, setting timer for next attempt to 8000 ms
[csgo][debug] Sending GC message ClientHello
[steam] Sending 730 GC message 4006
[steam] Sending message: ClientToGC
[csgo][debug] Sending hello, setting timer for next attempt to 16000 ms

when i try to login do csgo using node-user and globaloffensive packages my script gets stuck in this loop of sending hello this started happening after the recent csgo update, i tried different accounts, different IP addresses and so on nothing is working

vladdnepr commented 9 months ago

same, maybe something with connectedToGC event

art-vanesyan commented 9 months ago

same

vladdnepr commented 9 months ago

k_EMsgGCCStrike15_v2_ClientLogonFatalError = 9187

https://github.com/SteamRE/SteamKit/blob/master/SteamKit2/SteamKit2/Base/Generated/GC/CSGO/MsgGC.cs

vladdnepr commented 9 months ago

when convert payload to string

Снимок экрана 2024-02-07 в 10 21 03
nguyenvokim commented 9 months ago

Same here, the event do not trigged

udisun commented 9 months ago

Same, I still see websites showing floats on items. Is there any other way of getting a float?

vladdnepr commented 9 months ago
message CMsgClientLogonFatalError {
    optional uint32 errorcode = 1;
    optional string message = 2;
    optional string country = 3;
}

errorcode = 4 message = null country = CY, sometime other 2 letters code

creeperyang commented 9 months ago

Same. Seems like the account is not accepted by csgo (not steam itself)?

vladdnepr commented 9 months ago

https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L120

changed to

this._send(Language.ClientHello, Protos.CMsgClientHello, {
    version: 2000202,
});

After I can login

info: csuser42 Log on OK
info: csuser42 Initiating GC Connection
debug: Sending GC message ClientHello
debug: Sending hello, setting timer for next attempt to 2000 ms
debug: Got handled GC message ClientWelcome
debug: Unknown SO type 2 with 1 items
debug: Unknown SO type 7 with 1 items
debug: GC connection established
info: csuser42 CSGO Client Ready!

But interesting thing, after I logged in with version: 2000202 all works fine without version: 2000202

vladdnepr commented 9 months ago

Can anybody explain magic?

vladdnepr commented 9 months ago
Снимок экрана 2024-02-07 в 12 12 07
vladdnepr commented 9 months ago

Versions can be received from https://github.com/SteamDatabase/GameTracking-CS2/commits

vladdnepr commented 9 months ago

https://github.com/DoctorMcKay/node-globaloffensive/pull/86

vladdnepr commented 9 months ago

@DoctorMcKay

hrjoyce1990 commented 9 months ago

https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L120

changed to

this._send(Language.ClientHello, Protos.CMsgClientHello, {
  version: 2000202,
});

After I can login

info: csuser42 Log on OK
info: csuser42 Initiating GC Connection
debug: Sending GC message ClientHello
debug: Sending hello, setting timer for next attempt to 2000 ms
debug: Got handled GC message ClientWelcome
debug: Unknown SO type 2 with 1 items
debug: Unknown SO type 7 with 1 items
debug: GC connection established
info: csuser42 CSGO Client Ready!

But interesting thing, after I logged in with version: 2000202 all works fine without version: 2000202

May I ask how you discovered that this interface needs the version parameter?

Hypoky commented 9 months ago

https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L120

changed to

this._send(Language.ClientHello, Protos.CMsgClientHello, {
  version: 2000202,
});

After I can login

info: csuser42 Log on OK
info: csuser42 Initiating GC Connection
debug: Sending GC message ClientHello
debug: Sending hello, setting timer for next attempt to 2000 ms
debug: Got handled GC message ClientWelcome
debug: Unknown SO type 2 with 1 items
debug: Unknown SO type 7 with 1 items
debug: GC connection established
info: csuser42 CSGO Client Ready!

But interesting thing, after I logged in with version: 2000202 all works fine without version: 2000202

Yes, but if you specify any other numbers in "version" at the first launch it will still work, i checked this. Even if you enter an incomprehensible set of numbers there like "51205612054"

vladdnepr commented 9 months ago

https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L120 changed to

this._send(Language.ClientHello, Protos.CMsgClientHello, {
    version: 2000202,
});

After I can login

info: csuser42 Log on OK
info: csuser42 Initiating GC Connection
debug: Sending GC message ClientHello
debug: Sending hello, setting timer for next attempt to 2000 ms
debug: Got handled GC message ClientWelcome
debug: Unknown SO type 2 with 1 items
debug: Unknown SO type 7 with 1 items
debug: GC connection established
info: csuser42 CSGO Client Ready!

But interesting thing, after I logged in with version: 2000202 all works fine without version: 2000202

May I ask how you discovered that this interface needs the version parameter?

tried fix from fork

https://github.com/Kolosok86/node-globaloffensive/commit/3b5fa5fa836f2c89bfcb5d4d6495e557a34adb12#diff-e727e4bdf3657fd1d798edcd6b099d6e092f8573cba266154583a746bba0f346R145

vladdnepr commented 9 months ago

https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L120 changed to

this._send(Language.ClientHello, Protos.CMsgClientHello, {
    version: 2000202,
});

After I can login

info: csuser42 Log on OK
info: csuser42 Initiating GC Connection
debug: Sending GC message ClientHello
debug: Sending hello, setting timer for next attempt to 2000 ms
debug: Got handled GC message ClientWelcome
debug: Unknown SO type 2 with 1 items
debug: Unknown SO type 7 with 1 items
debug: GC connection established
info: csuser42 CSGO Client Ready!

But interesting thing, after I logged in with version: 2000202 all works fine without version: 2000202

Yes, but if you specify any other numbers in "version" at the first launch it will still work, i checked this. Even if you enter an incomprehensible set of numbers there like "51205612054"

tried

1000000 1999999

but nothing

after changed 2000000 logon was success

After success logoun you can pass anything

maybe server remembers max version parameter passed in past?

Hypoky commented 9 months ago

https://github.com/DoctorMcKay/node-globaloffensive/blob/master/index.js#L120 changed to

this._send(Language.ClientHello, Protos.CMsgClientHello, {
  version: 2000202,
});

After I can login

info: csuser42 Log on OK
info: csuser42 Initiating GC Connection
debug: Sending GC message ClientHello
debug: Sending hello, setting timer for next attempt to 2000 ms
debug: Got handled GC message ClientWelcome
debug: Unknown SO type 2 with 1 items
debug: Unknown SO type 7 with 1 items
debug: GC connection established
info: csuser42 CSGO Client Ready!

But interesting thing, after I logged in with version: 2000202 all works fine without version: 2000202

Yes, but if you specify any other numbers in "version" at the first launch it will still work, i checked this. Even if you enter an incomprehensible set of numbers there like "51205612054"

tried

1000000 1999999

but nothing

after changed 2000000 logon was success

After success logoun you can pass anything

maybe server remembers max version parameter passed in past?

Maybe it need 2000000+, idk, but i checked it on new server with new accs and it works. I literally entered an incomprehensible set of numbers like "235982985"

DoctorMcKay commented 9 months ago

Fixed in 3.0.1.