Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getPlayerCount not working? (Request timed out) #413

Open
zakeryooo opened this issue Nov 18, 2022 · 2 comments
Open

getPlayerCount not working? (Request timed out) #413

zakeryooo opened this issue Nov 18, 2022 · 2 comments
Labels

Comments

@zakeryooo
Copy link

zakeryooo commented Nov 18, 2022

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 zakeryooo added the bug label Nov 18, 2022
@claudenobs
Copy link

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

@nolddor
Copy link

nolddor commented May 13, 2023

@zakeryooo is the issue still valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants