Ben Posted November 26, 2020 Report Posted November 26, 2020 C:\Users\benbo\Desktop\HH\reworked_Bot\node_modules\steamcommunity\index.js:296 cookies.forEach((cookie) => { ^ TypeError: cookies.forEach is not a function at SteamCommunity.setCookies (C:\Users\benbo\Desktop\HH\reworked_Bot\node_modules\steamcommunity\index.js:296:10) at TradeOfferManager.setCookies (C:\Users\benbo\Desktop\HH\reworked_Bot\node_modules\steam-tradeoffer-manager\lib\index.js:124:18) at SteamUser.<anonymous> (C:\Users\benbo\Desktop\HH\reworked_Bot\steam_bot.js:72:22) at SteamUser.emit (events.js:315:20) at C:\Users\benbo\node_modules\steam-user\components\web.js:64:9 at IncomingMessage.<anonymous> (C:\Users\benbo\node_modules\steam-user\components\webapi.js:82:4) at IncomingMessage.emit (events.js:327:22) at endReadableNT (_stream_readable.js:1221:12) at processTicksAndRejections (internal/process/task_queues.js:84:21) PS C:\Users\benbo\Desktop\HH\reworked_Bot> I get this error after the steam login. Someone had this before? I have also realised, that (even before i got this error) the community.setcookies is not executed right. this.client.on('webSession', (cookies) =>{ console.log(cookies,colors.FgWhite,this.bot_number) this.manager.setCookies(cookies, (err)=> { if (err) { console.log(err); process.exit(1); } this.community.setCookies(cookies, (err)=> { console.log("This is never printed") if (err) { console.log(err); process.exit(1); }else{ console.log("This is never printed") } console.log("Got API key: " + this.manager.apiKey,colors.FgWhite,this.bot_number); }) }) }) The "This is never printed" does not get printed. Quote
Dr. McKay Posted November 27, 2020 Report Posted November 27, 2020 The first argument to the webSession event is sessionID, not cookies. 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.