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

bug: Trackmania Nations Forever Query not possible #634

Open
Hornochs opened this issue Sep 14, 2024 · 3 comments
Open

bug: Trackmania Nations Forever Query not possible #634

Hornochs opened this issue Sep 14, 2024 · 3 comments
Labels

Comments

@Hornochs
Copy link

Describe the bug
Querying Trackmania Nations Forever is not possible and runs into an error

Steps To Reproduce

const { GameDig } = require('gamedig'); 

GameDig.query({
    type: 'trackmaniaforever',
    host: '10.13.37.7',
    port: '5000',
    login: 'User',
    password: 'User',
    debug: true
}).then((state) => {
    console.log(state);
}).catch((error) => {
    console.log(`Server is offline, error: ${error}`);
});

Expected behavior
Successfull Query

Screenshots or Data
Following is the Debug Log:

Q#0 DNS Lookup: 10.13.37.7
Q#0 Raw IP Address: 10.13.37.7
Q#0 Registered RTT: 87ms
Q#0 Query failed with error Error: XML-RPC fault: Method 'GetCurrentMapInfo' not defined
    at createFault (/home/stephanschaffner/gamedig/node_modules/xmlrpc/lib/deserializer.js:83:21)
    at Deserializer.onDone (/home/stephanschaffner/gamedig/node_modules/xmlrpc/lib/deserializer.js:89:21)
    at SAXStream.emit (node:events:517:28)
    at SAXStream._parser.onend (/home/stephanschaffner/gamedig/node_modules/sax/lib/sax.js:190:10)
    at emit (/home/stephanschaffner/gamedig/node_modules/sax/lib/sax.js:624:35)
    at end (/home/stephanschaffner/gamedig/node_modules/sax/lib/sax.js:667:5)
    at SAXParser.end (/home/stephanschaffner/gamedig/node_modules/sax/lib/sax.js:154:24)
    at SAXStream.end (/home/stephanschaffner/gamedig/node_modules/sax/lib/sax.js:248:18)
    at StringStream.onend (/home/stephanschaffner/gamedig/node_modules/string-to-stream/node_modules/readable-stream/lib/_stream_readable.js:577:10)
    at Object.onceWrapper (node:events:631:28)

Additional context
I'm in the finding if its a GameDig Bug, or a GameServer Bug

@Hornochs Hornochs added the bug label Sep 14, 2024
@CosminPerRam
Copy link
Member

Seems like its a GameDig issue.
The query fails here:

const results = await this.query(client, 'GetCurrentMapInfo')

And if you comment this, then here:
const results = await this.query(client, 'GetNextMapInfo')

If I comment both blocks, the query succeeds.

Maybe the API changed or the server hasnt loaded a map yet, still investigating.

@Hornochs
Copy link
Author

Or maybe the current handler is for the current games? Trackmania Nations (Forever) is quite old. Maybe the API was changed with the later Nadeo Games?

@CosminPerRam
Copy link
Member

CosminPerRam commented Sep 18, 2024

Or maybe the current handler is for the current games? Trackmania Nations (Forever) is quite old. Maybe the API was changed with the later Nadeo Games?

No, as far as I know the protocol hasn't changed in a good while.

Some docs regarding available methods: ListMethods.txt (renamed to .txt from .html cause Github wouldn't let me attach it otherwise).

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

2 participants