Hello, I'm using the steam-user and steamcommunity packages to create a trade bot.
When I run my node program on a VPS, the program fails to login into steam without emitting an errors.
I presume this is because the VPS can't connect to Steam servers? But wouldn't a timeout exception occur?
Here's my code:
const SteamUser = require('steam-user');
const SteamTotp = require('steam-totp');
var client = new SteamUser();
var logOnOptions = {
accountName: this.doc.credentials.accountName,
password: this.doc.credentials.password,
twoFactorCode: SteamTotp.generateAuthCode(this.doc.credentials.sharedSecret)
}
client.logOn(logOnOptions);
client.on("loggedOn", ()=>{
console.log("Bot logged in to Steam.");
client.setPersona(1);
this.setOnline(true);
});
client.on("error", (err)=>{
console.error("An error occurred");
console.error(err);
})
The code logs in on my local machine, even with my personal VPN on.
Both my machine and VPS are in the same country as well.
No output is logged to the console (on the VPS) after 10 minutes. And yes, I've put a console log to ensure logOnOption's properties are defined, and, my code is indeed running!
I've looked into the webCompatibilityMode but still no luck.