furi Posted February 3, 2019 Report Share Posted February 3, 2019 (edited) In my code i use only logOn method and event listeners such as loggedOn and webSession. Is it normal? Edited February 3, 2019 by Dr. McKay Uploaded image Revadike 1 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted February 3, 2019 Author Report Share Posted February 3, 2019 Is that happening consistently? If so, can you show what code you're using? Quote Link to comment Share on other sites More sharing options...
furi Posted February 3, 2019 Report Share Posted February 3, 2019 Is that happening consistently? If so, can you show what code you're using?it happened once on 2 of 4 my bots during recent problems with steam const SteamCommunity = require('steamcommunity'); const SteamUser = require('steam-user'); const TradeOfferManager = require('steam-tradeoffer-manager'); const steamTotp = require('steam-totp'); const client = new SteamUser(); const community = new SteamCommunity(); const manager = new TradeOfferManager({ community }); let isAlive = false; const DEFAULT_TIMER = 60 * 1000; client.logOn(logInOptions); client.on('loggedOn', () => { log('Steam client loggedOn okay'); client.setPersona(1); }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies, err => { if (err) return log(`Steam coockies: ${err}`); isAlive = true; log('Steam webSession okay'); }); }); community.on('sessionExpired', err => { setTimeout(steamCommunityLogin, DEFAULT_TIMER); isAlive = false; log(`Steam community session: ${err}`); }); client.on('error', err => log(`Steam client: ${err}`)); function steamCommunityLogin() { if (!isAlive) { community.login({ ...logInOptions, twoFactorCode: steamTotp.getAuthCode(sharedSecret) }, err => { if (err) { setTimeout(steamCommunityLogin, DEFAULT_TIMER); log(`Steam community login: ${err}`); } else { isAlive = true; log('Steam community login okay'); } }); } } Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted February 3, 2019 Author Report Share Posted February 3, 2019 Do you think you could possibly add: client.on('debug', log); This will help to narrow down what's going on if it happens again. You don't need to login through SteamCommunity if your session expires. Just call client.webLogOn() in that case. David - your friend 1 Quote Link to comment Share on other sites More sharing options...
furi Posted February 3, 2019 Report Share Posted February 3, 2019 (edited)  Do you think you could possibly add: client.on('debug', log); This will help to narrow down what's going on if it happens again. You don't need to login through SteamCommunity if your session expires. Just call client.webLogOn() in that case. 1. ok, i add this and if this will repeat, i'll report here2. yeah, actually, thanks Edited February 3, 2019 by furi David - your friend 1 Quote Link to comment Share on other sites More sharing options...
furi Posted February 6, 2019 Report Share Posted February 6, 2019 another error /root/bot/node_modules/steam-user/components/connection.js:21     this._connection.stream.setTimeout(0);                 ^  TypeError: Cannot read property 'setTimeout' of undefined   at SteamUser.<anonymous> (/root/bot/node_modules/steam-user/components/connection.js:21:26)   at handlers.forEach (/root/bot/node_modules/steam-user/components/classes/HandlerManager.js:37:12)   at Array.forEach (<anonymous>)   at HandlerManager.emit (/root/bot/node_modules/steam-user/components/classes/HandlerManager.js:36:12)   at SteamUser._handleMessage (/root/bot/node_modules/steam-user/components/messages.js:538:24)   at SteamUser._handleNetMessage (/root/bot/node_modules/steam-user/components/messages.js:464:7)   at TCPConnection._readMessage (/root/bot/node_modules/steam-user/components/connection_protocols/tcp.js:193:12)   at Socket.emit (events.js:182:13)   at emitReadable_ (_stream_readable.js:534:12)   at process._tickCallback (internal/process/next_tick.js:63:19) last 2 minute debug, in 23:40:45 was crash [Tue, 05 Feb 2019 23:38:21 GMT] Steam debug: Unhandled message: 850 [Tue, 05 Feb 2019 23:39:45 GMT] Steam debug: Handled message: 5599 [Tue, 05 Feb 2019 23:40:15 GMT] Steam debug: Handled message: 5599 [Tue, 05 Feb 2019 23:40:39 GMT] Steam debug: Handled message: 757 [Tue, 05 Feb 2019 23:40:39 GMT] Steam debug: Logged off: ServiceUnavailable [Tue, 05 Feb 2019 23:40:40 GMT] Steam debug: Using WebSocket; we rolled 47 and percent to use WS is 50 [Tue, 05 Feb 2019 23:40:41 GMT] Steam debug: WebSocket disconnected with error: read ECONNRESET [Tue, 05 Feb 2019 23:40:41 GMT] Steam debug: Using WebSocket; we rolled 47 and percent to use WS is 50 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: WS connection timed out [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Using TCP; we rolled 93 and percent to use WS is 50 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Connecting to TCP CM: *some IP* [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: WebSocket disconnected with error: read ECONNRESET [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Using TCP; we rolled 64 and percent to use WS is 50 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Connecting to TCP CM: *another IP* [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: TCP connection established [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Handled message: 1303 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Channel encrypt request: protocol 1, universe 1, nonce *some ID*, 0 remaining bytes [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Sending message: 1304 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Handled message: 1305 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Sending message: 5514 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Handled message: 751 [Tue, 05 Feb 2019 23:40:42 GMT] Steam debug: Log on response: TryAnotherCM [Tue, 05 Feb 2019 23:40:43 GMT] Steam debug: TCP connection established [Tue, 05 Feb 2019 23:40:43 GMT] Steam debug: Using WebSocket; we rolled 11 and percent to use WS is 50 [Tue, 05 Feb 2019 23:40:44 GMT] Steam debug: Handled message: 1303 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted February 6, 2019 Author Report Share Posted February 6, 2019 The next update will hopefully fix this. Quote Link to comment Share on other sites More sharing options...
Guest Ino Posted February 9, 2019 Report Share Posted February 9, 2019 (edited) The next update will hopefully fix this.Hello, i found a new bug. When set offline or invisible state through steam chat or method setPersona - event user emitted with persona_state 3 (Away) instead of persona_state 0 (offline) Edited February 9, 2019 by Ino Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted February 9, 2019 Author Report Share Posted February 9, 2019 Hello, i found a new bug. When set offline or invisible state through steam chat or method setPersona - event user emitted with persona_state 3 (Away) instead of persona_state 0 (offline) Assuming this is happening like you describe, that would be a problem with Steam, not with this module. But what I suspect is happening is that you're logged into that same account with another bot (or with the Steam client) and its persona state is away. If any logged-on session is in an online state (anything but invisible/offline), the account will show up as that state. Quote Link to comment Share on other sites More sharing options...
byteframe Posted February 14, 2019 Report Share Posted February 14, 2019 What is the recommendation for listening to chat events? Should we switch to watching the events from the new chat component, or are the older events sufficient? David - your friend 1 Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted February 25, 2019 Author Report Share Posted February 25, 2019 What is the recommendation for listening to chat events? Should we switch to watching the events from the new chat component, or are the older events sufficient? The older events are deprecated, but they will keep working until at least v5. Though I recommend switching to the new events. David - your friend 1 Quote Link to comment Share on other sites More sharing options...
Revadike Posted March 3, 2019 Report Share Posted March 3, 2019 (edited) Something weird is happening. I updated my bot to work with your latest steam packages. However, sometimes it seems like something inside steam-user gets stuck. Sometimes it works just fine, but other time it will only emit loggedOn and websession events. All other events are not emitted. And that's not all. I expect loggedOn to be only emitted once, since in my code I only login once, however when these other events are not emitted, loggedOn gets emitted every 2 minutes. Any idea what's going on? Edited March 3, 2019 by Royalgamer06 Quote Link to comment Share on other sites More sharing options...
Revadike Posted March 3, 2019 Report Share Posted March 3, 2019 (edited) I've made it log all debug events and this is the log: https://pastebin.com/EZRG8xm3It repeats every 2 minutes, until it finally works. Sometimes it works at first try, but often it takes several tries. loggedOnSteam only gets logged on loggedOn event. And signedIntoBarter only gets logged ONCE websession.This is my login config (un and pass omitted){ accountName: 'xxx', password: 'xxx', twoFactorCode: 'XXX', logonID: 1551653434369, rememberPassword: true, dontRememberMachine: false, autoRelogin: true, machineName: 'BOT@CLIENT' }:  WebSocket disconnected with error: Ping timeoutThis seems to cause it, or at least be related with it. Edited March 3, 2019 by Royalgamer06 Quote Link to comment Share on other sites More sharing options...
Revadike Posted March 3, 2019 Report Share Posted March 3, 2019 Another issue getProductInfo callback doesn't get fired. Quote Link to comment Share on other sites More sharing options...
Revadike Posted March 4, 2019 Report Share Posted March 4, 2019 Another issue getProductInfo callback doesn't get fired. This issue isn't specific to v4. I can't get it to work on the latest version of v3 either. Debugging this currently... Quote Link to comment Share on other sites More sharing options...
Revadike Posted March 4, 2019 Report Share Posted March 4, 2019 This issue isn't specific to v4. I can't get it to work on the latest version of v3 either. Debugging this currently...Nevermind, seems it just took a bit longer than usual. V3 is all good. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 26, 2019 Author Report Share Posted April 26, 2019 I'm pinning this thread again because of numerous recent questions about changes made in v4. David - your friend 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.