What Comes Around Posted February 19, 2021 Report Posted February 19, 2021 Good day! I get this error from time to time: ConfirmationChecker Error: Not Logged In at Request.init (D:\Node Projects\SteamMarketBot\node_modules\request\request.js:458:31) at Redirect.onResponse (D:\Node Projects\SteamMarketBot\node_modules\request\lib\redirect.js:149:11) at Request.onRequestResponse (D:\Node Projects\SteamMarketBot\node_modules\request\request.js:986:22) at ClientRequest.emit (events.js:315:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:641:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17) at HTTPParser.execute (<anonymous>) at TLSSocket.socketOnData (_http_client.js:509:22) at TLSSocket.emit (events.js:315:20) at addChunk (internal/streams/readable.js:309:12) What is strange is that the client is still connected in most cases. It still returns inventories, it still changes gamesPlayed but when accepting all confirmations, it gives me this error. So I am curious what I can do to fix the error. Quote
Dr. McKay Posted February 21, 2021 Report Posted February 21, 2021 (edited) Client connections and web sessions are two separate things. When steam-user connects to the Steam servers, it also negotiates a web session (which is what the cookies you've received contain). That web session expires pretty much whenever it wants, and when it does you'll get that error. You should use the sessionExpired event in steamcommunity to detect when your web session has expired and use webLogOn() in steam-user to get a new session. Or, just call webLogOn() every half hour or so. That tends to work well enough in my experience. Edited February 21, 2021 by Dr. McKay Quote
What Comes Around Posted February 21, 2021 Author Report Posted February 21, 2021 7 hours ago, Dr. McKay said: Client connections and web sessions are two separate things. When steam-user connects to the Steam servers, it also negotiates a web session (which is what the cookies you've received contain). That web session expires pretty much whenever it wants, and when it does you'll get that error. You should use the sessionExpired event in steamcommunity to detect when your web session has expired and use webLogOn() in steam-user to get a new session. Or, just call webLogOn() every half hour or so. That tends to work well enough in my experience. Thanks! This is the solution I was looking for! Quote
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.