Jump to content
McKay Development

Recommended Posts

Posted (edited)

Hey,

 

i'm running Bots with your API for 1year now and today, something happen, that never happed before. Before maintenance it was the last `webLogOn()` aka `The web cookies have been set!`.

The bot was running arround 24hours more (but i think we delayed accepting tradeoffers etc.) and stopped working anything. "Not logged in" on getReceivedItems callback.

 

 

[2017-08-30 01:10:25.337] INFO:webSession The web cookies have been set!

[2017-08-30 01:12:19.526] ERROR:offerExpire manager.getOffer error (SQL Row ID: 577811): Error: HTTP error 503
[2017-08-30 01:12:30.152] ERROR:offerExpire manager.getOffer error (SQL Row ID: 577811): Error: HTTP error 503
[2017-08-30 01:12:41.749] INFO:loggedOn The Bot has logged in!
[2017-08-30 01:12:53.389] ERROR:offerExpire manager.getOffer error (SQL Row ID: 577811): Error: HTTP error 503
[2017-08-30 01:12:58.978] ERROR:offerExpire manager.getOffer error (SQL Row ID: 577811): Error: HTTP error 503
[2017-08-30 01:13:06.180] ERROR:offerExpire manager.getOffer error (SQL Row ID: 577811): Error: Data temporarily unavailable

After this `webSession` never get fired again. I have a setInterval for doing webLogon, but this aswell not worked.

 

let logincredentials = function () {
    return (
        {
            "accountName": botconfig.account,
            "password": botconfig.password,
            "twoFactorCode": SteamTotp.generateAuthCode(botconfig.sharedsecret)
        });
};


function steamReconnect() {
    try {
        if (client.steamID) {
            client.webLogOn();
        } else {
            client.logOn(logincredentials());
        }
    } catch (e) {
        logging.error('steamReconnect', e);
    }
}


client.on("loggedOn", function (a) {
    logging.info("loggedOn", "The Bot has logged in!");
});

client.on("webSession", function (a,  {
    manager.setCookies(b, function (error) {
        if (error) {
            logging.error("webSession", "setCookies error: " + error);
            process.exit(1);
        } else {
            community.setCookies(;
            community.startConfirmationChecker(polling_interval, botconfig.identifysecret);
            logging.info("webSession", "The web cookies have been set!");
            manager.doPoll();
        }


    })
});

community.on("confKeyNeeded", function (a,  {
    logging.error("confKeyNeeded", "confKeyNeeded");
    let time = Math.floor(Date.now() / 1000);
    b(null, time, SteamTotp.getConfirmationKey(botconfig.identifysecret, time, a))
});




setInterval(function () {
    steamReconnect();
}, 900000);
 

 

 

 

 

Im completly clueless.. I have a log of `confKeyNeeded` Errors after this. There is nothing in the Logs. No Try/Catch Error, expect the `confKeyNeeded`. Maybe you have an Idea, where the problem could be.

Edited by Gassi

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.

Guest
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.

Loading...
×
×
  • Create New...