roughnecks Posted December 28, 2018 Report Share Posted December 28, 2018 //Logging ON client.logOn(logOnOptions); client.on('loggedOn', function (details) { if (details.eresult == SteamUser.EResult.OK) { client.getPersonas([client.steamID], function (personas) { console.log("== Logged in =============") console.log('== Name: ' + personas[client.steamID]["player_name"]); console.log('== ID64: ' + client.steamID); console.log("=========================="); console.log(""); }); client.setPersona(5); //"5": "LookingToTrade" -- https://github.com/DoctorMcKay/node-steam-user/blob/master/enums/EPersonaState.js client.gamesPlayed('Accepting Junk and Making Friends'); } else { console.log(details); //Do whatever u want to handle the error... } }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies); community.setCookies(cookies); }); As soon as the bot starts everythings works fine. After some minutes, every time an offer is received by the bot, I get the "Not Logged In" error.I set up a cron (after reading a similar thread on this forum), like this://Session refresh every 15 minutes cron.schedule('*/15 * * * *', () => { if (client.steamID) { client.webLogOn(); } else { client.logOn(logOnOptions); console.log('Logged in again using cron'); } }); but the "not logged in" error still remains. I also read this topic where Admin says this but at this point I don't understand which session needs to be refreshed and how.Also calling "sessionExpired" isn't helping because whenever an incoming trade offer gives me the error, bot doesn't try anymore to accept it, even after session is refreshed, so I have to restart it.manager.on('newOffer', offer => { if (offer.partner.getSteamID64() === 'my_stemid_64') { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Accepted offer from owner. Status: ${status}.`); } }); } else { if (offer.itemsToGive.length === 0) { offer.accept((err, status) => { if (err) { console.log(err); } else { console.log(`Donation accepted. Status: ${status}.`); } }); } else { offer.decline(err => { if (err) { console.log(err); } else { console.log('Donation declined (wanted our items).'); } }); } } }); Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
roughnecks Posted December 28, 2018 Author Report Share Posted December 28, 2018 This is an example log between different attempts with almost the same code as above: [[20:48:09]] [LOG] == Logged in =============[[20:48:10]] [LOG] == Name: BOT[[20:48:10]] [LOG] == ID64: 765611.................[[20:48:10]] [LOG] ==========================[[20:48:10]] [LOG][[21:00:00]] [LOG] Already logged in[[21:06:05]] [LOG] Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (D:\Portable\Birba\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:483:25) Quote Link to comment Share on other sites More sharing options...
roughnecks Posted December 28, 2018 Author Report Share Posted December 28, 2018 Also found this: https://dev.doctormckay.com/topic/1900-has-cookies-changed/?do=findComment&comment=6149 Looks like same (not resolved) issue. Quote Link to comment Share on other sites More sharing options...
KaMilml Posted December 28, 2018 Report Share Posted December 28, 2018 same problem.. still have not any solutions Quote Link to comment Share on other sites More sharing options...
roughnecks Posted December 29, 2018 Author Report Share Posted December 29, 2018 Tried once more after adding a new piece of code:community.on('sessionExpired', function(err) { if (err) { console.log('Session Expired: ' + err); } if (client.steamID) { client.webLogOn(); console.log('called weblogon: ' + client.steamID); } else { client.logOn(logOnOptions); console.log('called logon'); } }); and I got this error: [[01:46:43]] [LOG] Session Expired: Error: HTTP error 403[[01:46:43]] [LOG] called weblogon: 76........[[01:46:43]] [LOG] Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (D:\Portable\Birba\node_modules\steam-tradeoffer-manager\lib\classes\TradeOffer.js:483:25) It repeats every time I send a new offer. Quote Link to comment Share on other sites More sharing options...
Berlioz Posted December 29, 2018 Report Share Posted December 29, 2018 I have same problem. Quote Link to comment Share on other sites More sharing options...
Riya Posted December 29, 2018 Report Share Posted December 29, 2018 same problem my devloper told me its something of steam issue, what u can do right now is simply restart the whole bot eg when sessionexpired is thrown u can log out completly and login again completely then the bot will work for 15-20 mins and will repeat same if prob continues Quote Link to comment Share on other sites More sharing options...
byteframe Posted January 1, 2019 Report Share Posted January 1, 2019 i wouldnt understand whats going on, but you basically lose your web session very quickly, and have to add your own logic to retry your web calls after calling webLogOn again when the session expires. It will prolly be sorted in the new version. Quote Link to comment Share on other sites More sharing options...
roughnecks Posted January 13, 2019 Author Report Share Posted January 13, 2019 This seems to be fixed for me since I switched to Mobile Auth. Quote Link to comment Share on other sites More sharing options...
roughnecks Posted January 17, 2019 Author Report Share Posted January 17, 2019 (edited) Unfortunately it's happening again. [16:37:22] [LOG][16:37:22] [LOG] Bot version: 1.3.2[16:37:22] [LOG] node.js version: v8.11.1[16:37:24] [LOG][16:37:24] [LOG] == Logged in =============[16:37:24] [LOG] == Name: ZED[16:37:24] [LOG] == ID64: 76561198[16:37:24] [LOG] ==========================[16:37:24] [LOG][16:37:29] [LOG] Accepted offer 3442372810 from owner. Status: pending.[16:37:33] [LOG] Offer 3442372810: Confirmed![17:00:00] [LOG] Already logged in: 76561198[17:00:00] [LOG] Called weblogon from cron[17:05:22] [LOG] Session Expired: Error: HTTP error 403[17:05:22] [LOG] called weblogon: 76561198[17:05:22] [LOG] Error: Not Logged In at SteamCommunity.manager._community.httpRequestPost (/mnt/d/Portable/ZED/node_modules/steam-tradeoffer-manager/lib/classes/TradeOffer.js:483:25) at Request._callback (/mnt/d/Portable/ZED/node_modules/steamcommunity/components/http.js:67:15) at Request.self.callback (/mnt/d/Portable/ZED/node_modules/request/request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request.<anonymous> (/mnt/d/Portable/ZED/node_modules/request/request.js:1161:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage.<anonymous> (/mnt/d/Portable/ZED/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:313:30) This thing is driving me crazy. Edited January 17, 2019 by roughnecks Quote Link to comment Share on other sites More sharing options...
ahmet Posted January 17, 2020 Report Share Posted January 17, 2020 same problem. but nobody wants to find a solution to this problem! we have almost the same codes. Quote Link to comment Share on other sites More sharing options...
Ben Posted November 26, 2020 Report Share Posted November 26, 2020 Any solutions? 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.