apibot Posted October 24, 2021 Report Posted October 24, 2021 client.on("webSession", set_cookies) client.on("loggedOn", online) function online() { log("logged on") } function set_cookies(cookies) { log("cookies set") community.setCookies(cookies); } 24 Oct 14:28:58 - test: logged on 24 Oct 14:28:59 - test: cookies set 24 Oct 14:29:01 - test: cookies set 24 Oct 14:29:04 - test: cookies set 24 Oct 14:29:08 - test: cookies set 24 Oct 14:29:17 - test: cookies set Quote
Dr. McKay Posted October 27, 2021 Report Posted October 27, 2021 The first argument to the webSession callback is sessionID, not cookies. My guess would be that you have a handler for SteamCommunity's sessionExpired event that calls client.webLogOn(), which it's continually doing because it never receives valid cookies. Quote
apibot Posted October 29, 2021 Author Report Posted October 29, 2021 On 10/27/2021 at 1:52 PM, Dr. McKay said: The first argument to the webSession callback is sessionID, not cookies. My guess would be that you have a handler for SteamCommunity's sessionExpired event that calls client.webLogOn(), which it's continually doing because it never receives valid cookies. that's exactly what it was Quote
TheM Posted August 3, 2022 Report Posted August 3, 2022 (edited) @Dr. McKay I seem to have the same problem. I tried opening new ticket, and it didn't open so im posting it here: module.exports = function(accountDetails, accountSettings, nickname, accountID, games){ this.client = new SteamUser(); this.community = new SteamCommunity(); let csgo = new GlobalOffensive(this.client); this.logOnOptions = { accountName: accountDetails.login, password: accountDetails.password, rememberPassword: true, machineName: machineName, clientOS: 16, dontRememberMachine: false, rememberPassword: true } if(accountDetails.sharedSecret) this.logOnOptions.twoFactorCode = SteamTotp.generateAuthCode(accountDetails.sharedSecret); this.client.setOption("promptSteamGuardCode", false); this.client.setOption("autoRelogin", true); this.client.logOn(this.logOnOptions); this.client.on('loggedOn', () => { ... }); this.client.on('webSession', (sessionId, cookies) => { log(`webSession found.`, this.login); this.community.setCookies(cookies); log(`Cookies set.`, this.login); if(identitySecret){ this.community.startConfirmationChecker(10000, accountDetails.identitySecret); log(`Confirmation checker started.`, this.login); } }); } And all I get is: Quote 03/08/2022 18:17 The M. Idle >> xxx >> Setting account up. 03/08/2022 18:17 The M. Idle >> xxx >> Online status and nickname set. 03/08/2022 18:17 The M. Idle >> xxx >> Idling started. 03/08/2022 18:17 The M. Idle >> xxx >> webSession found. 03/08/2022 18:17 The M. Idle >> xxx >> webSession found. 03/08/2022 18:17 The M. Idle >> xxx >> webSession found. 03/08/2022 18:18 The M. Idle >> xxx >> webSession found. 03/08/2022 18:18 The M. Idle >> xxx >> webSession found. 03/08/2022 18:18 The M. Idle >> xxx >> webSession found. 03/08/2022 18:19 The M. Idle >> xxx >> webSession found. 03/08/2022 18:19 The M. Idle >> xxx >> webSession found. 03/08/2022 18:20 The M. Idle >> xxx >> webSession found. Edited August 3, 2022 by TheM wrong code 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.