When attempting to click "upload new world" under "reset world" in Java Realms, I get this error message:
Unable to load worlds
Cannot invoke "ctt.c()" because "this.b" is null
Update 2023-12-6
New error:
Unable to load worlds
Cannot invoke "net.minecraft.class_1940.method_8583()" because "this.field_25022" is null
Linked issues
is duplicated by
Attachments
Comments

Please try and upload a newly created vanilla world and see if you get the same error

@Greymagic27 Confirmed. Made the description more specific.

This can be reproduced if any of the world 1) is a symlink not authorized or 2) has corrupt level.dat
.
Code analysis (1.20.4 yarn)
RealmsSelectFileToUploadScreen
has multiple LevelSummary#isHardcore
calls. This is defined as this.levelInfo.isHardcore();
.
LevelSummary
has multiple subclasses, including SymlinkLevelSummary
and RecoveryWarning
. They are "fake entries" that aren't loaded. Hence, levelInfo == null
. However, they do not override isHardcore
, so any call to that method would throw NPE as seen here.
LevelStorage#loadSummaries
, used to enumerate the worlds, does not filter those 2 special cases, either (they are also used by the regular world screen, which needs to list those). And since the world enumeration and isHardcore
calls occur when rendering RealmsSelectFileToUploadScreen
, this error occurs.

Hello i have the same problem in 1.20.4. I cannot reset and load a world from the current 1.20.4 world we play on and not from a different reset world. I can reset the world with the ''World templates'', ''New World'', Adventures'', ''Experiences'' and ''Inspiration'' butten, only not ''Upload world''.
This is the error is get:
Maybe its a little hard to read due to my texture pack but it says:
Cannot invoke ''net.minecraft.class_1940.method_8583()'' beceus ''this.fiels_25022'' is null
[media]
Can confirm Helboy234's comment. I am unable to post a modified world onto my realm, and clicking Upload World gives me this:
[media]
having same issue how do i fix
This will be fixed in the upcoming release 1.20.5. There's no release date for it yet, but it's currently in the pre-release phase, which means it'll be commonly available soon.
Should be listed as affects version 1.20.3.