PlanetTeamSpeakk/DevLogin

Error when using DevLogin

Closed this issue · 12 comments

When trying to use this inside of IntelliJ, I am presented with following error:
Uncaught exception in thread "main" java.lang.RuntimeException: Mixin transformation of net.minecraft.client.main.Main failed at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:419) at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323) at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218) at net.fabricmc.loader.impl.launch.knot.KnotClassLoader.loadClass(KnotClassLoader.java:145) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:454) at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) Caused by: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:392) at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:234) at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClassBytes(MixinTransformer.java:202) at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:414) ... 8 more Caused by: org.spongepowered.asm.mixin.injection.throwables.InjectionError: Critical injection failure: Redirector listenForUsernameSpec(Ljoptsimple/OptionSpecBuilder;)Ljoptsimple/ArgumentAcceptingOptionSpec; in devlogin.mixins.json:MixinMain from mod devlogin failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap DevLogin-refmap.json at org.spongepowered.asm.mixin.injection.struct.InjectionInfo.postInject(InjectionInfo.java:468) at org.spongepowered.asm.mixin.transformer.MixinTargetContext.applyInjections(MixinTargetContext.java:1385) at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyInjections(MixinApplicatorStandard.java:1052) at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:400) at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:421) at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:403) at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ... 11 more

I must personally say I also encountered this error when using this library in combination with Moj mappings as it was made with Yarn mappings and as it modifies a class that's loaded early on, remapping it does not work.

I'll see if I can make a release for Moj mappings too as I believe Yarn and Moj will suffice.

If you aren't using Moj mappings, please re-open this issue as I would have to dig a little deeper.

My mappings in my build.gradle dependencies are the following:
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
with the variable project.yarn_mappings set to 1.19.2+build.4

Also, I wasn't sure if you meant to re-open this issue (which I can't do, I believe) or to create a new one.

Guessing it's an incompatibility with 1.19.2 then. Although I don't see why there would be one, but that would be the only explanation.

Just did a quick check and it does indeed seem to work on 1.19 as in: it does open the Microsoft Login Window and it allows me to fill in the code etc. It does go wrong however right after I gave access and I could "close this Microsoft window now". The error code here:
java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.getAsString()" because the return value of "com.google.gson.JsonObject.get(String)" is null at com.ptsmods.devlogin.MSA.lambda$reqXSTSToken$10(MSA.java:281) ~[devlogin-2.1.jar:?] at com.ptsmods.devlogin.MSA.lambda$doRequest$15(MSA.java:424) ~[devlogin-2.1.jar:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) [?:?]

Not sure if:

  1. I'm doing something wrong? A bit of context: I just changed the gradle.properties to match for a 1.19 MC version.
  2. I should've created a different issue for this error.

I believe that error means the account you signed in with does not have a Minecraft profile, but this does verify there's an incompatibility with 1. 19.2.

Actually, when I tried this on 1.19.1 the same issue occured (original issue). I'm not very up to date on what these updates actually changed though.

Latest version only has a single mixin. Any mixin-related error is now virtually impossible.

Yeah no longer any problems with Mixins. Now I'm still having the "java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.getAsString()" because the return value of "com.google.gson.JsonObject.get(String)" is null" problem, however. You said it's because the account doesn't have a Minecraft profile but I'm pretty sure it's the right account.

I just tried using my 2nd Microsoft account (which has my alt account attached to it, but same issue)

According to wiki.vg, the issue could be that the Microsoft account you're logging in with is underage and has not been added to a family.
Obviously don't know if this is the case for you, but I'll add a check for an error code when requesting the XSTS token and display it in a dialog.

Oh yeah you're right. I'm 17, I managed to change my birth date on my alt account and now it works. Thanks.

Aight, that would be the issue then. I'll still add the dialog in case people encounter this issue later.