panel icon indicating copy to clipboard operation
panel copied to clipboard

Querying endpoint including eggs that use Process Management config inheritance throws exception

Open MrJoshuaT opened this issue 1 year ago • 4 comments

Current Behavior

Querying an endpoint, such as api/application/servers?include=egg or /api/application/nests/1/eggs throws an internal server error via the API.

[2023-12-31 18:11:24] production.ERROR: Syntax error {"userId":1,"exception":"[object] (JsonException(code: 4): Syntax error at /var/www/pterodactyl/app/Transformers/Api/Application/EggTransformer.php:44) [stacktrace]

Expected Behavior

Endpoints including egg data should not return an error.

Steps to Reproduce

The default Minecraft nest with id 1, seems to only one causing this. Exporting and importing the eggs to a new nest will not throw this error anymore. If I can do anymore debugging steps myside I can do this.

Panel Version

1.11.5

Wings Version

1.11.8

Games and/or Eggs Affected

No response

Docker Image

No response

Error Logs

https://pteropaste.com/325f67a6sric/

Is there an existing issue for this?

  • [X] I have searched the existing issues before opening this issue.
  • [X] I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
  • [X] I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.

MrJoshuaT avatar Dec 31 '23 20:12 MrJoshuaT

After much debugging, it seems I created an egg that was for Paper but with optimisations, with this under the Process Management section I used "Copy Settings From" and had Paper selected. When I just copied these values from the source egg to the new egg it didn't produce the error via the API

MrJoshuaT avatar Jan 01 '24 00:01 MrJoshuaT

Can confirm this. Eggs that have set "Copy Settings From" produce an error with the api. The EggTransformer seems to ignore inherits.

Boy132 avatar Jan 04 '24 07:01 Boy132

I'm also having this issue, /nest/1 always fails with internal server error. Any other id like /nest/2 works fine

devnatan avatar Jan 16 '24 16:01 devnatan

Quick note for anyone trying to reproduce this.

Clear the process management config from the child egg otherwise the error wont trigger.

danny6167 avatar May 05 '24 08:05 danny6167