TheMaster Posted April 19 Report Share Posted April 19 (edited) ummm i have a problem idk y this is happening can anyone diagnose? the below is the only connection logic client.logOn(logOnOptions); client.on('loggedOn', function() { console.log(green,`Logged into Steam ${accname}`); }); setInterval(() => { if (!client.steamID) { client.logOn(logOnOptions); } },600000); // 10 mins 600000 setInterval(() => { if (!client.steamID) { client.logOn(logOnOptions); }else{ client.webLogOn(); } },3600000); // 1 hour 3600000 C:\New folder\node_modules\steam-user\components\09-logon.js:49 let alreadyConnectingError = new Error('Already attempting to log on, cannot log on again'); ^ Error: Already attempting to log on, cannot log on again at SteamUser.logOn (C:\New folder\node_modules\steam-user\components\09-logon.js:49:32) at Timeout._onTimeout (C:\New folder\mainimprovements.js:788:20) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) Node.js v21.7.1 Edited April 19 by TheMaster Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted April 20 Report Share Posted April 20 There's no reason to ever call logOn in an interval. If you receive the error event, then just log on again and you'll always be connected. Quote Link to comment Share on other sites More sharing options...
m.tsa Posted 11 hours ago Report Share Posted 11 hours ago I apologize for my dumb question sir, but I haven't found it anywhere else. What is the specific error that I should listen for when I need to logOn again? ATM I'm only using community.on("sessionExpired") to call webLogon to refresh the cookies on community and trade manager, with the client.on("webSession") event btw. Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted 8 hours ago Report Share Posted 8 hours ago 2 hours ago, m.tsa said: I apologize for my dumb question sir, but I haven't found it anywhere else. What is the specific error that I should listen for when I need to logOn again? ATM I'm only using community.on("sessionExpired") to call webLogon to refresh the cookies on community and trade manager, with the client.on("webSession") event btw. https://github.com/DoctorMcKay/node-steam-user?tab=readme-ov-file#error The 'error' event. 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.