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

Palworld broken after update #555

Closed
treemlt opened this issue Feb 27, 2024 · 32 comments · Fixed by #560
Closed

Palworld broken after update #555

treemlt opened this issue Feb 27, 2024 · 32 comments · Fixed by #560
Labels

Comments

@treemlt
Copy link

treemlt commented Feb 27, 2024

palworld not working

After the new palworld update it seems to have broken the way the data is retrieved.

@treemlt treemlt added the bug label Feb 27, 2024
@treemlt treemlt changed the title bug: something is not working Palworld broken after update Feb 27, 2024
@Murgator
Copy link

same problem

@indifferentbroccoli
Copy link

Also facing this problem

@Maxence1502
Copy link

Same here ! It was working before the update, but now it's not

@dgibbs64
Copy link
Contributor

Can confirm Palworld update has broken querying 😐

@podrivo
Copy link
Contributor

podrivo commented Feb 28, 2024

Palworld uses Epic Online Services to query servers and it needs some credentials to make it work.
Maybe these credentials have changed?

We currently have these ones:

// OAuth2 credentials extracted from Palworld files.
this.clientId = 'xyza78916PZ5DF0fAahu4tnrKKyFpqRE'
this.clientSecret = 'j0NapLEPm3R3EOrlQiM8cRLKq3Rt02ZVVwT0SkZstSg'
this.deploymentId = '0a18471f93d448e2a1f60e47e03d3413'

@CosminPerRam
Copy link
Member

Very possible, although it'll be better to move to RCON for this.

@jammsen
Copy link
Contributor

jammsen commented Feb 29, 2024

Very possible, although it'll be better to move to RCON for this.

@CosminPerRam - According to the DefaultPalWorldSettings.ini the key-value pair RCONEnabled=false is standard set to false.

Even if enabled, the values you can get from RCON are much more limited then what you got from the EOS service, see: https://tech.palworldgame.com/settings-and-operation/commands

@CosminPerRam
Copy link
Member

/Info and /ShowPlayers should be all we need (although I don't exactly know what fields they provide.
RCON has been discussed to be a feature that will come eventually, but It'll take a little while until then.

@jammsen
Copy link
Contributor

jammsen commented Feb 29, 2024

/Info and /ShowPlayers should be all we need (although I don't exactly know what fields they provide.

There you go:

$:~/development/docker-palworld-dedicated-server$ docker exec palworld-dedicated-server rcon info
Welcome to Pal Server[v0.1.5.1] jammsen.test.local
$:~/development/docker-palworld-dedicated-server$ docker exec palworld-dedicated-server rcon showplayers
name,playeruid,steamid
j,a,m,m,s  e,n,!123,130XXXXXXXX,765XXXXXXXXXXXXXXX

And yes my charactername is "j,a,m,m,s e,n,!123" on purpose for my "player-detection" rcon tool. Normally there should be only like "jammsen".

You will be missing, Map, MaxPlayerNumber and a lot of other stuff thats on the root-level of your regular steam/eos returns. What you can get is:

  • Servername (part of strings)
  • Player-Count (count of showplayers = N -1)
  • Players (parse the CSV format)
  • Version-Number (part of strings)

RCON has been discussed to be a feature that will come eventually, but It'll take a little while until then.

Do you mean as a native feature to lookup data instead of queries to master-servers-alike systems?

@dkoz
Copy link

dkoz commented Feb 29, 2024

I've been able to successfully query my server by name instead of IP address just by adjusting the filter.

@ionutshiro
Copy link

I've been able to successfully query my server by name instead of IP address just by adjusting the filter.

Well what if you decide to change name at some point ? You have to re-add it ?

@dkoz
Copy link

dkoz commented Feb 29, 2024

I've been able to successfully query my server by name instead of IP address just by adjusting the filter.

Well what if you decide to change name at some point ? You have to re-add it ?

Probably. I'm targeting it based on attributes.NAME_s and it's one word sensitive for some reason. It's really annoying to work with.

@ionutshiro
Copy link

Do we have any updates on this other than using name to query?

@Destarianon
Copy link

Can we clarify what is meant by "query by name"?
I am performing queries by hostname, rather than IP address but I am still failing to query servers. I don't see documentation for any other kind of "name" that can be provided.

Additional debug output:

Q#1 Requesting external access token ...
Q#1 Requesting deviceId access token ...
Q#1 POST: https://api.epicgames.dev/auth/v1/accounts/deviceid
Q#1 https://api.epicgames.dev/auth/v1/accounts/deviceid HTTP-->
Q#1 https://api.epicgames.dev/auth/v1/accounts/deviceid <--HTTP 200
Q#1 POST: https://api.epicgames.dev/auth/v1/oauth/token
Q#1 https://api.epicgames.dev/auth/v1/oauth/token HTTP-->
Q#1 https://api.epicgames.dev/auth/v1/oauth/token <--HTTP 200
Q#1 POST: https://api.epicgames.dev/matchmaking/v1/0a18471f93d448e2a1f60e47e03d3413/filter
Q#1 https://api.epicgames.dev/matchmaking/v1/0a18471f93d448e2a1f60e47e03d3413/filter HTTP-->
Q#1 https://api.epicgames.dev/matchmaking/v1/0a18471f93d448e2a1f60e47e03d3413/filter <--HTTP 200
Q#1 Query failed with error Error: Server not found
    at palworld.queryInfo (file:///usr/lib/node_modules/gamedig/protocols/epic.js:126:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async palworld.run (file:///usr/lib/node_modules/gamedig/protocols/epic.js:34:5)
    at async palworld.run (file:///usr/lib/node_modules/gamedig/protocols/palworld.js:15:5)
    at async palworld.runOnce (file:///usr/lib/node_modules/gamedig/protocols/core.js:80:5)
    at async palworld.runOnceSafe (file:///usr/lib/node_modules/gamedig/protocols/core.js:54:22)
    at async QueryRunner._attempt (file:///usr/lib/node_modules/gamedig/lib/QueryRunner.js:118:12)
    at async QueryRunner.run (file:///usr/lib/node_modules/gamedig/lib/QueryRunner.js:95:26)
    at async GameDig.query (file:///usr/lib/node_modules/gamedig/lib/gamedig.js:11:12)
Error: Failed all 2 attempts
    at QueryRunner.run (file:///usr/lib/node_modules/gamedig/lib/QueryRunner.js:106:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async GameDig.query (file:///usr/lib/node_modules/gamedig/lib/gamedig.js:11:12)
Attempt #1 - Port=8211 Retry=0:
Error: Server not found
    at palworld.queryInfo (file:///usr/lib/node_modules/gamedig/protocols/epic.js:126:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async palworld.run (file:///usr/lib/node_modules/gamedig/protocols/epic.js:34:5)
    at async palworld.run (file:///usr/lib/node_modules/gamedig/protocols/palworld.js:15:5)
    at async palworld.runOnce (file:///usr/lib/node_modules/gamedig/protocols/core.js:80:5)
    at async palworld.runOnceSafe (file:///usr/lib/node_modules/gamedig/protocols/core.js:54:22)
    at async QueryRunner._attempt (file:///usr/lib/node_modules/gamedig/lib/QueryRunner.js:118:12)
    at async QueryRunner.run (file:///usr/lib/node_modules/gamedig/lib/QueryRunner.js:95:26)
    at async GameDig.query (file:///usr/lib/node_modules/gamedig/lib/gamedig.js:11:12)

@CosminPerRam
Copy link
Member

I've been able to successfully query my server by name instead of IP address just by adjusting the filter.

Could you provide some more explainations or a code snippet regarding this?

@jammsen
Copy link
Contributor

jammsen commented Mar 3, 2024

Yeah @dkoz do you mean by "dns-name" or what do you mean? Please clarify.

@xstar97
Copy link

xstar97 commented Mar 6, 2024

I've developed a simple RCON API service in Go for Palworld, which you can find at palworld-query-api. The repository includes a container image for easy deployment.

This API heavily relies on the rcon-cli tool from another repository, available here. While the Docker image automatically downloads this tool for you, if you're running the Go code or binary directly, you'll need to obtain it yourself.

Feel free to check it out and contribute if you're interested!

plz delete if not allowed :)

@jammsen
Copy link
Contributor

jammsen commented Mar 6, 2024

I've developed a simple RCON API service in Go for Palworld, which you can find at palworld-query-api. The repository includes a container image for easy deployment.

This API heavily relies on the rcon-cli tool from another repository, available here. While the Docker image automatically downloads this tool for you, if you're running the Go code or binary directly, you'll need to obtain it yourself.

Feel free to check it out and contribute if you're interested!

plz delete if not allowed :)

Please dont use that binary or the image itself like it is, the Maintainer knows since weeks about CVEs and isnt patching them, please use my fix for that:

https://github.com/jammsen/docker-palworld-dedicated-server/blob/develop/Dockerfile#L5
Line 5-17

@CosminPerRam
Copy link
Member

@Jonnerz over on the Discord server noted that Palworld moved to what seems a proprietary master server service, api endpoint here.

@Maxence1502
Copy link

Is there a way to filter using this API ?
It’s very long to fetch all pages

@Destarianon
Copy link

That also appears like it wouldn't work if the server is configured as not publicly listed.

@jammsen
Copy link
Contributor

jammsen commented Mar 8, 2024

Makes sense, in the old api even people who disbaled community-mode, were listed in that server-list.
I guess they are trying to start fresh, which makes also sense, because the communit-mode setting totally change in name -> publiclobby.

@xstar97
Copy link

xstar97 commented Mar 8, 2024

@Jonnerz over on the Discord server noted that Palworld moved to what seems a proprietary master server service, api endpoint here.

thanks, implemented in my query api service now :)

@Maxence1502
Copy link

How do you find your server within this list with so many pages ?

@CosminPerRam
Copy link
Member

image

Here is a snippet of the first implementation that I'm working on now, and that's not even a complete query.

Unfortunately there doesnt seem to be any way to filter by ip or port, there is a search functionality but doesnt look in the address/port fields.

What we can do for now is to just query a page, check if our server is in it, and if not just query the next page, until we find our server and return. This is O(n) and it's bad for performance (on both sides) and it comes down to luck I guess for how up your server is in the list.

There could be much more of this API but we don't have any docs at all on it.

@CosminPerRam
Copy link
Member

We could add an option to encourage players to also include a field like "name" for palworld to try to narrow down the list, but it doesnt sound very great.

@xstar97
Copy link

xstar97 commented Mar 8, 2024

How do you find your server within this list with so many pages ?

we are getting off topic here, but the jist is...i cached the entire 150+ pages and query and filter that instead.
/search?name=SERVER_NAME
you can query the rest of the data if you further parse it.

@Maxence1502
Copy link

The latest update of Palworld added an API to query players, can we use that ?
https://tech.palworldgame.com/api/rest-api/players

@jammsen
Copy link
Contributor

jammsen commented Apr 4, 2024

That RESTAPI needs Basci-Auth with "admin:ADMIN_PASSWORD" so you might just need to extend things here in a way. But i forwarded @CosminPerRam some stuff im working on with my Palworld Docker Image.

@CosminPerRam
Copy link
Member

Yes, this looks really good!

@CosminPerRam
Copy link
Member

Successfully made a query on a server provided by @jammsen, if anyone encounters issues please mention or make a new issue (:

@jammsen
Copy link
Contributor

jammsen commented Apr 9, 2024

Testing from my side, positive and negative worked like a charm too.

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