node-steam-user icon indicating copy to clipboard operation
node-steam-user copied to clipboard

getPlayerCount not working? (Request timed out)

Open zakeryooo opened this issue 2 years ago • 2 comments

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

zakeryooo avatar Nov 18 '22 10:11 zakeryooo

works fine for me: node: v18.13.0 steam-user: 4.27.0

claudenobs avatar Feb 02 '23 18:02 claudenobs

@zakeryooo is the issue still valid?

nolddor avatar May 13 '23 07:05 nolddor