Jump to content
McKay Development


  • Posts

  • Joined

  • Last visited

Posts posted by neverhood

  1. Hello, I'm trying to keep my session alive with this code with interval 1 hour

    	if (client.steamID) {
    	} else {


    but in very rare case I'm getting crash (1 timer per 2-3 weeks, 24/7 running):


            if (steamID && sessionID && (sessionID != this._sessionID || steamID.toString() != this.steamID.toString())) {
    TypeError: Cannot read property 'toString' of null
        at SteamUser._handleNetMessage (/root/project/node_modules/steam-user/components/messages.js:472:98)
        at SteamUser.processMulti (/root/project/node_modules/steam-user/components/messages.js:570:9)
        at Gunzip.cb (/root/project/node_modules/steam-user/components/messages.js:561:17)
        at Gunzip.zlibBufferOnEnd (zlib.js:150:10)
        at Gunzip.emit (events.js:317:22)
        at endReadableNT (_stream_readable.js:1215:12)
        at processTicksAndRejections (internal/process/task_queues.js:84:21)


    newest library, newest nodejs, how can I handle it?

  2. Hello, I'm using only 'node-steam-user' library and sometimes (randomly, not only during Tuesday maintenance) my script is crashing when I'm doing 'client.webLogOn();' (I'm doing it in intervals to keep my session alive - just in case every 30 minutes)


    sometimes I'm getting this error (very rare case):

    throw new Error("Cannot log onto steamcommunity.com without first being connected to Steam network");

    is there any method that instead of crashing app I can try to login account again with 'client.logOn'? because I don't want to check my VPS if script got crashed or no (I want to run it constantly without worring that something crashed there)



    something with try, catch method?

  3. Hello, I'm using this library to check player's profiles, but sometimes (after a few hours of constant work) my variable 'haveGCSession' is set to false, and it doesnt want to auto-reconnect, script is running but when I'm trying to call 'requestPlayersProfile' (ofc before if (haveGCSession)) it says I dont have haveGCSession


    How can I reconnect to game-coordinator?

    sometimes script works good whole week without this error, sometimes I get it after 20 hours of run (randomly)


    I tired to use: 'client.gamesPlayed([730]);' but it doesn;'t reconnect GC session

    										if (csgo.haveGCSession) {
                                                                                       // MY CODE
                                                                                    } else {
    											console.log("haveGCSession is set to false");

    I had this problem before: https://dev.doctormckay.com/topic/2130-node-globaloffensive-after-v2-disconnect/


    should I use client.relog();?

    or maybe csgo._connect?

  4. is it technically possible to unlock achievements with some protobuf message with your library? even if you didn't prepare any ready-to-use code?


    I'm asking for it, because if its technically possible I will look closer for some coder to code it

  5. What do you get if you call buffer.toString('hex')?

  6. Hello, I'm trying to read protobuf message sent via Steam.



    that what I got in response:

    <Buffer 82 01 90 02 11 8a 86 e2 47 d3 18 55 fd 1a c2 01 0d 4f 8b e9 5c 11 df a0 92 37 01 00 10 01 1d 00 00 00 00 21 09 04 0d 40 30 31 40 01 29 4f 75 f2 f0 85 ... 226 more bytes>


    how can I decode this message?



  7. Hello, I'm using two versions of node-globaloffensive, I have old project done with 1.3.2 version (and it works like a charm), lately I updated same project to version 2.0.1 nad after long run of script (usually after a few days) GC is disconnecting randomly (Steam fault for sure) and not connecting again by itself (like with 1.3.2 version).


    Can you take a look at code if its something missing in auto-reconnect function or setting 'haveGCSession' after reconnect?

    I'm calling my functions only when haveGCSession is set to true, and with 2.0.1 version I'm facing issues after long run GC is disconnecting - haveGCSession is set to false until I restart whole script.


    All packages are updated and with 1.3.2. version everything works fine.




  8. now I get it (I think so :D), thank you for explaining me
    should I add setInterval in 'loggedOn' with 1 hour refresh? something like this:
    setInterval(function(){ client.webLogOn(); }, 3600000);

    my current code:


    client.on('webSession', (sessionID, cookies) => {
      const f = Object.keys(client.myFriends);
      for (let i = f.length - 1; i >= 0; i--)
        if (client.myFriends[f[i]] === 2)
    client.on('loggedOn', () => {
      console.log(`[${new Date().toLocaleTimeString()}] - ONLINE - ${client.steamID.getSteamID64()}`);

    am I setting properly manager cookies with every websession?


  9. The way you used community in your first post is correct. You can do just {community} which is interpreted as {community: community}.


    I think probably what's happening is that your session is just expiring (which happens normally) and you aren't expecting it. It wouldn't hurt to add an automatic hourly webLogOn call to be more proactive about renewing your session rather than reactive.


    I have no idea why this is happening randomly (when someone send trade offer session getting expired 1 second after and my bot stuck), sometimes my bot works even 72 hours without this issue, I think maybe because bot is idling for longer time (not receving any trade offer) this is happening.

  • Create New...