darkwar123 Posted April 7, 2016 Report Posted April 7, 2016 I see this error by the first time, steamcommunity display error.message: Not Logged In, when I try to get page with my trade offers.I don't know why it's happen but after about an hour this error disappears. And one more notice, bot can accept offers but can't send it (error 503 as Not Loged in). Quote
Dr. McKay Posted April 7, 2016 Report Posted April 7, 2016 If you're getting a "Not Logged In" error, then you're not logged in and you should relog. Quote
darkwar123 Posted April 7, 2016 Author Report Posted April 7, 2016 (edited) I am already logged in this function only starts when bot is logged in.Sorry if I waste your time, but this error exist only with one of my bots, another works perfect. Part of my code when sending offer: Bot.prototype.CreateOffer = function(partner, items, token, callback){ var self = this; var items = items; self.LoadInventory(function(err, inventory){ if(err){ self.SteamLoginRepeat(err); callback(true, null); return; } var inventory = inventory; var itemsToSend = []; self.steam.httpRequest("http://steamcommunity.com/my/tradeoffers/sent/",{}, function(err, response, body){ if(err){ self.log("error", "Error httpRequest: " + err.message); // err.message here == Not logged in self.SteamLoginRepeat(err); // this function relogin bot with steamcommunity.oauth or if error on oauth with steamcommunity.login callback(true, null); return; } if(response.statusCode != 200) return; body = new HtmlDom(body); body.$('.inactive').remove(); body = body.html(); for(var index in items) { for(var i in inventory) { var thisItem = inventory[i]; if(thisItem.classid == items[index].classid && body.indexOf(thisItem.assetid) == -1){ var push = { "assetid": thisItem.assetid, "appid": thisItem.appid, "contextid": thisItem.contextid, "amount": 1 }; itemsToSend.push(push); delete inventory[i]; break; } } } if(itemsToSend.length <= 0){ self.log("error", "Nothing to send!"); callback(true, null); return; } var newOffer = self.manager.createOffer(partner); newOffer.addMyItems(itemsToSend); newOffer.send("" , token, function(err){ if(err){ self.SteamLoginRepeat(err.message);// if no errors above, here appear error: HTTP Error 403 callback(true, null); return; } callback(false, newOffer); }); }); }); }; Edited April 7, 2016 by Dr. McKay Code tags Quote
darkwar123 Posted April 7, 2016 Author Report Posted April 7, 2016 If you're getting a "Not Logged In" error, then you're not logged in and you should relog. Quote
Dr. McKay Posted April 7, 2016 Report Posted April 7, 2016 Why are you scraping your sent offers page? Quote
darkwar123 Posted April 7, 2016 Author Report Posted April 7, 2016 (edited) Why are you scraping your sent offers page?Find items which I have already sent Edited April 7, 2016 by darkwar123 Quote
darkwar123 Posted April 7, 2016 Author Report Posted April 7, 2016 I think the problem with the bot account, but why? I don't understand. I think so because I have many many bots all use my library that include your's. And errors only in this botAccount: https://steamcommunity.com/profiles/76561198284670929/ Quote
Dr. McKay Posted April 7, 2016 Report Posted April 7, 2016 You should use the API to get details about trade offers. Scraping the sent offers page is asking for trouble. Also, there's a getOffersContainingItems method in the latest version anyway. 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.