Jump to content
McKay Development

cookies.forEach is not a function


Recommended Posts

        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=>{
        this.manager.setCookies(cookies, (err)=> {
          if (err) {
        this.community.setCookies(cookies, (err)=> {
            console.log("This is never printed")
            if (err) {
                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.


Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...