Maxim Posted January 28, 2019 Report Share Posted January 28, 2019 Hi, i have 2 servers and have problem with http and my bot didn't working. So which hosting better for bot and mb have tutorial for setup guide server? Quote Link to comment Share on other sites More sharing options...
SnaBe Posted January 28, 2019 Report Share Posted January 28, 2019 (edited) I use Digitalocean myself, either for deployment of web apps and or bots. Edited January 28, 2019 by SnaBe Quote Link to comment Share on other sites More sharing options...
Maxim Posted January 29, 2019 Author Report Share Posted January 29, 2019 I use Digitalocean myself, either for deployment of web apps and or bots.I an used that but hane problem - Error polling for trade offers: Error: socket hang up. Mb you can tell me how check this problem, which rules need in firewall? Or mb have tutorial Quote Link to comment Share on other sites More sharing options...
SnaBe Posted February 2, 2019 Report Share Posted February 2, 2019 I usually use the one-click NodeJS app that they provide & it always seems to work with no issues. The error you get: Error polling for trade offers: Error: socket hang up, might be a code error and not a server host error. Quote Link to comment Share on other sites More sharing options...
Maxim Posted February 13, 2019 Author Report Share Posted February 13, 2019 I usually use the one-click NodeJS app that they provide & it always seems to work with no issues. The error you get: Error polling for trade offers: Error: socket hang up, might be a code error and not a server host error. const SteamUser = require('steam-user'); const SteamTotp = require('steam-totp'); const SteamCommunity = require('steamcommunity'); const TradeOfferManager = require('steam-tradeoffer-manager'); const config = require('./config.js'); let winston = require('winston'); // For logging const client = new SteamUser(); const community = new SteamCommunity(); let logger = winston.createLogger({ transports: [ new (winston.transports.Console)({ colorize: true, level: 'debug' }), new (winston.transports.File)({ level: 'info', timestamp: true, filename: 'cratedump.log', json: false }) ], }); const manager = new TradeOfferManager({ steam: client, community: community, language: 'en' }); const logOnOptions = { accountName: config.username, password: config.password, twoFactorCode: SteamTotp.generateAuthCode(config.shared_secret) }; client.logOn(logOnOptions); client.on('loggedOn', () => { logger.info("Logged into Steam"); client.setPersona(SteamUser.Steam.EPersonaState.Online); client.gamesPlayed(740); }); client.on('webSession', (sessionid, cookies) => { manager.setCookies(cookies, (err) => { if (err) { logger.error('Unable to set trade offer cookies: ' + err); process.exit(1); // Fatal error since we couldn't get our API key return; } logger.info("Trade offer cookies set. Got API Key: " + manager.apiKey); }); community.setCookies(cookies); }); manager.on('pollFailure', (err) => { console.log(err); logger.error("Error polling for trade offers: " + err); }); I use this. Quote Link to comment Share on other sites More sharing options...
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.