PaperMC / PaperMC/Paper

Add debug for invalid GameProfiles on skull blocks/items patch no longer functions

Open
#7,983 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: accepted status: needs testing type: bug version: 1.19
Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Expected behavior

The patch https://github.com/PaperMC/Paper/blob/0bdbcd9d56e0b6e55274486c3162f37f59c41d6d/patches/removed/1.19/0823-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch was introduced to make debugging invalid skull block entities or items easier to locate.

It is expected that the provided debug flag is usable to enable the debug message.

Observed/Actual behavior

With 1.19, authlib was updated to 3.5.41. In either that version (or an intermediate one between 1.18.2's 3.3.39 the com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService wraps the logic in YggdrasilMinecraftSessionService#fillGameProfile(GameProfile,boolean) in a try-catch.

While this was always the case, the try catch was expanded to now also catch any IllegalArgumentException, which is the exception throw if an invalid game profile is constructed.

As such, the patch introduced try-catch no longer catches anything, as the exception is already handles by the library and logged to the console without any debug information.

Steps/models to reproduce

Have an invalid skull in your world.
A user reported this on the discord: https://discord.com/channels/289587909051416579/289587909051416579/986345805013209158

Plugin and Datapack List

N/A

Paper version

Flawed logic exists on 48f7a1a (current latest).

Other

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the removed 1.19 patch, 0823-Add-debug-for-invalid-GameProfiles-on-skull-blocks-i.patch, and the authlib YggdrasilMinecraftSessionService#fillGameProfile(GameProfile,boolean) behavior described in the issue. Reproduce with an invalid skull block or item and verify that the debug flag again provides useful debug information instead of only the library's console log.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.