gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno/Bun or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
606 stars 146 forks source link

Arma3 server status dosen't work #255

Closed AlvaroGCH closed 2 years ago

AlvaroGCH commented 2 years ago

I have tried diferents public servers from arma3 and none worked. I have used this web to get the IP and Port

Code: Gamedig.query({ type: 'arma3', host: '51.38.71.171', port: '2302' })

Error: (node:1754) UnhandledPromiseRejectionWarning: Error: Failed all 2 attempts at QueryRunner.run (.../node_modules/gamedig/lib/QueryRunner.js:95:21) Attempt #1 - Port=2303 Retry=0: Error: UDP - Timed out after 2000ms at Timeout. (.../node_modules/gamedig/lib/Promises.js:7:25) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) Attempt #2 - Port=2302 Retry=0: Error: UDP - Timed out after 2000ms at Timeout. (.../node_modules/gamedig/lib/Promises.js:7:25) at listOnTimeout (internal/timers.js:554:17) at processTimers (internal/timers.js:497:7) (node:1754) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:1754) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

mmorrisontx commented 2 years ago

I just tried the top server from https://www.battlemetrics.com/servers/arma3 and it seems to work fine.

bin/gamedig.js --type arma3 altis.lyl.gg
{"name":"[GER] LiveYourLife #1 |Sprachtelefon|Clanbase|Quest| Altis Life","map":"altis","password":false,"raw":{"protocol":17,"folder":"Arma3","game":"Live Your Life RPG Altis - Lebe dein Leben | ....
AlvaroGCH commented 2 years ago

Yes, i have realized that replit doesn't use UDP protocols. My mistake, i should have read your documentation before opening this issue, i am so sorry. Thank you so much for the support.