node-steam-user
node-steam-user copied to clipboard
getPlayerCount not working? (Request timed out)
If I use getPlayerCount the request just times out, been trying it throughout the day to see if it was just a steam server problem but still not working. Tried different IPs and a httpProxy to check if I was being blocked for whatever reason but that doesn't seem to be the case. Doesn't matter how high I set the timeout it always times out.
const SteamUser = require('steam-user');
let client = new SteamUser();
client.logOn();
client.on('loggedOn', async (details) => {
console.log("Logged onto Steam as " + client.steamID.steam3());
let result = await client.getPlayerCount(1245620);
console.log(result);
client.logOff();
});
Versions
❯ node --version v18.12.0 ([email protected])
Screenshots and Error Logs
Logged onto Steam
P:\node-steam-test\node_modules\@doctormckay\stdlib\components\promises.js:17
reject(new Error('Request timed out'));
^
Error: Request timed out
at Timeout._onTimeout (P:\node-steam-test\node_modules\@doctormckay\stdlib\components\promises.js:17:12)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7)
If I just hit the HTTP API https://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/?format=json&appid=1245620
it works but ideally I want to do it via the client.
Any ideas what's wrong? Thanks in advance
works fine for me: node: v18.13.0 steam-user: 4.27.0
@zakeryooo is the issue still valid?