Jump to content
McKay Development

Bheem

Member
  • Posts

    5
  • Joined

  • Last visited

Bheem's Achievements

  1. Hi timgfx, In steamcommunity, cookies are returned with login. Please refer to the following link: https://github.com/DoctorMcKay/node-steamcommunity/wiki/SteamCommunity#logindetails-callback My bot works fine on login. Its just that sometimes when session expires and I re login, the following problem occurs.
  2. Hi, I am using node-steamcommunity to login and then pass the cookies to node-steam-tradeoffer-manager. Whenever session expires, I relogin and pass the cookies to tradeoffer manager: community.on('sessionExpired', function(err) { community.login(logOnOptions,function(err,sessionID,cookies,steamguard) { if(err) { connectRetry-=1; if(connectRetry==0) { connectRetry=5; setTimeout(function(){logger.info("Couldn't reach server, will log in after 30 min");logIn();},1000*60*30); // try again after 30 minutes } } fs.writeFile(homeDir+'data/steamguard.txt', steamguard); logger.info("Logged into Steam"); connectRetry=5; //use steamcommunity cookies for tradeoffer-manager manager.setCookies(cookies, function(err) { if (err) { logger.error(err); process.exit(1); return; } logger.info("Got API key: " + manager.apiKey); }); community.chatLogon(); //Log on to the chat so that bot appears online community.startConfirmationChecker(10000,secrets.identity_secret); //poll every 10 seconds and confirm }); }); Sometimes I get the following error: info: Logged into Steam C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:212 cookies.forEach(function(cookie) { ^ TypeError: Cannot read property 'forEach' of undefined at SteamCommunity.setCookies (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:212:9) at TradeOfferManager.setCookies (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steam-tradeoffer-manager\lib\index.js:80:18) at C:\MyData\education\NodeJsTutorial\steam-trade-bot\tradingBot.js:344:11 at SteamCommunity.<anonymous> (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\index.js:128:5) at Request._callback (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\components\http.js:62:14) at Request.self.callback (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\node_modules\request\request.js:200:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) at Request.<anonymous> (C:\MyData\education\NodeJsTutorial\steam-trade-bot\node_modules\steamcommunity\node_modules\request\request.js:1067:10) at emitOne (events.js:82:20) The error is coming on the line manager.setCookies(). Am I handling it in the wrong way or is this some bug? Thanks & Regards, Bheem
  3. Thank you for your reply. Yes I saw that an example was saving steamguard.txt and I missed it somehow. I fixed the problem. Thanks!
  4. Hi, I apologize if this question is not relevant as I am fairly new to Openshift and development of steam bots. I have used steamcommunity to develop a trading bot which handles incoming trade offers. I want to host it on Openshift and am following the firepowered tutorial (http://firepowered.org/developer/hosting-a-steam-bot-on-openshift-online/). SteamCommunity saves a steamguard.txt file on login in the directory where the code is present. Is it possible to use it on Openshift as it needs data to be on the data directory referred by env variable OPENSHIFT_DATA_DIR? Thank you. Regards, Bheem
×
×
  • Create New...