buttilda / Headcrumbs

Headcrumbs
aww yiss
14 stars 21 forks source link

Headcrumbs causing crash on world load #125

Open b-chu opened 4 years ago

b-chu commented 4 years ago

Playing Sky Factory 4 Headcrumbs version 2.0.4

Crash log below https://pastebin.com/tBCyHYRC

There's no indication that it's Headcrumbs in the log, but I was suspicious of the error it was throwing. The only thing I did was disable Headcrumbs (and Twitchcrumbs and Wither Crumbs) and it worked again. So almost 100% sure it's Headcrumbs

To make this issue Googleable:

java.lang.IllegalArgumentException: Name and ID cannot both be blank
    at com.mojang.authlib.GameProfile.<init>(GameProfile.java:26)
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:186)
    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:173)
    at net.minecraft.client.Minecraft.func_71371_a(Minecraft.java:2421)
    at net.minecraftforge.fml.client.FMLClientHandler.tryLoadExistingWorld(FMLClientHandler.java:734)
    at net.minecraft.client.gui.GuiListWorldSelectionEntry.func_186777_e(GuiListWorldSelectionEntry.java:249)
    at net.minecraft.client.gui.GuiListWorldSelectionEntry.func_186774_a(GuiListWorldSelectionEntry.java:199)
    at net.minecraft.client.gui.GuiListWorldSelectionEntry.func_148278_a(GuiListWorldSelectionEntry.java:168)
    at net.minecraft.client.gui.GuiListExtended.func_148179_a(SourceFile:41)
    at net.minecraft.client.gui.GuiWorldSelection.func_73864_a(SourceFile:117)
    at com.blamejared.worldbook.client.gui.GuiWorldBook.func_73864_a(GuiWorldBook.java:99)
    at net.minecraft.client.gui.GuiScreen.func_146274_d(GuiScreen.java:533)
    at net.minecraft.client.gui.GuiWorldSelection.func_146274_d(SourceFile:49)
    at net.minecraft.client.gui.GuiScreen.func_146269_k(GuiScreen.java:501)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1759)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1098)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398)
    at net.minecraft.client.main.Main.main(SourceFile:123)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:196)
    at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:231)
    at org.multimc.EntryPoint.listen(EntryPoint.java:143)
    at org.multimc.EntryPoint.main(EntryPoint.java:34)
Dutchs commented 4 years ago

We had a other user report the same issue, identical stacktrace.

modpack: SkyFactory4 4.1.0 Headcrumbs: 1.12.2-2.0.5.17

Just before the crash they had this logged to the console:


[Thread-282/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]: java.lang.IllegalArgumentException: Name and ID cannot both be blank
[Thread-282/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:    at com.mojang.authlib.GameProfile.<init>(GameProfile.java:26)
[Thread-282/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:186)
[Thread-282/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:    at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:173)
[Thread-282/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:    at net.minecraft.tileentity.TileEntitySkull.updateGameProfile(SourceFile:151)
[Thread-282/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:    at ganymedes01.headcrumbs.utils.ThreadedProfileFiller$1.run(ThreadedProfileFiller.java:25)
[Thread-282/INFO] [STDERR]: [java.lang.ThreadGroup:uncaughtException:-1]:    at java.lang.Thread.run(Unknown Source)
sam-kirby commented 4 years ago

It seems the format of an error response from Mojang's API has changed, it now looks like:

{
  "path" : "/session/minecraft/profile/<uuid>",
  "errorType" : "Too Many Requests",
  "developerMessage" : "Too Many Requests",
  "details" : { }
}

whilst authlib expects the following structure (from: ...authlib.yggdrasil.response.Response)

{
  "error": <String>,
  "errorMessage": <String>,
  "cause": <String>
}

This means that the response is non-null, but does not contain an error field. As a result, YggdrasilAuthenticationService#makeRequest treats this as a valid response and does not throw.

This means both ID and Name are null in the returned response.

The API was reported as having changed on the 24/04/20 to Mojang, although received no response: https://bugs.mojang.com/browse/WEB-2198

This change may well be a mistake, as authlib included in 1.15 expects the same response structure.

The new rate limits mentioned seem to have been tweaked, it took 15 requests to trigger a rate limited response, though that was with a single UUID. Testing with a unique UUID per request was not performed as I do not have that many UUIDs easily accessible!

tl;dr is that any rate limited request will now throw an unhandled exception due to Mojang.

sam-kirby commented 4 years ago

24/04/2020 was also the first day this was reported to us, though without enough information to do anything useful with: DarkPacks/SkyFactory-4#1429

sam-kirby commented 4 years ago

New bug report to Mojang: https://bugs.mojang.com/browse/WEB-2381