UltimMC / Launcher

Offline Minecraft launcher.
Other
1.4k stars 152 forks source link

Crash (IllegalArgumentException: Invalid UUID string: "") #303

Closed sussyGaymer closed 1 year ago

sussyGaymer commented 1 year ago

Operating System

Windows

Description of bug

As soon as you launch an instance it crashes with an IllegalArgumentException of Invalid UUID string:. Full game log: https://paste.ee/p/vT4so

Steps to reproduce

Launch an instance with the latest version from https://nightly.link/UltimMC/Launcher/workflows/main/develop/mmc-cracked-win32.zip

Suspected cause

It appears like the UUID is not being set correctly. I'm not familiar with the codebase and the inner workings of MultiMC/UtilmMC so I can't say for sure.

This issue is unique

APTEM591 commented 1 year ago

Same problem. When trying to launch 1.20.2 only

LoneDev6 commented 1 year ago

I confirm it's not compatible with 1.20.2

bassmannate commented 1 year ago

Same issue but on Linux. 1.20.1 works fine but 1.20.2 is not compatible yet.

stucq commented 1 year ago

the error comes about when mc's main function is called, and so presumably the error comes about by the fact that a uuid command line argument is necessary and it for some reason isn't supplied

stucq commented 1 year ago

update: --uuid specifically is parsed from the launch script (parsed by this function). the --uuid parameter specifically is generated by this function

stucq commented 1 year ago

update 2: this line defines the UUID. it calls this function to do so, which in turn calls this function, the value of which is defined on this line, which retrieves it from the list profiles accessed here. that function is called by this function, which is in turn called by this function, which is in turn called by this function, which gets its data from this function, which is called by this function on accounts.json

stucq commented 1 year ago

anyways i believe you just need to define ygg.id for all accounts though i'm not 100% sure. testing rn

stucq commented 1 year ago

update 3: every time i try to manually update accounts.json with the UUID, it is automatically rewritten and removed. so i think that's the source of the problem. looking into it right now

stucq commented 1 year ago

update 4: it's written by this function which calls this function which calls this function. anyways it seems the UUID should actually be kept in type (which is dummy), which comes from this function which gets the UUID from this function, which correctly returns "dummy". so we need to find the point of disconnect but from here that shouldn't be very difficult at all

stucq commented 1 year ago

update 5: i believe i've found the culprit

stucq commented 1 year ago

update 6: so i'm pretty sure what's broken is that a MinecraftProfile isn't created for each new account

stucq commented 1 year ago

update 7: yep, found it. MinecraftAccount doesn't initialize data.minecraftProfile, which leaves data.minecraftProfile.id as "", leading to the error

stucq commented 1 year ago

update 8: fixed #310