MinecraftLauncher-core icon indicating copy to clipboard operation
MinecraftLauncher-core copied to clipboard

1.7.X forge guava library issue

Open dooji2 opened this issue 1 year ago • 7 comments

It seems that all 1.7 forge versions crash, unless the guava library is removed from the /versions/version.json, specifically:

        {
            "downloads": {
                "artifact": {
                    "path": "com/google/guava/guava/15.0/guava-15.0.jar",
                    "sha1": "ed727a8d9f247e2050281cb083f1c77b09dcb5cd",
                    "size": 2172168,
                    "url": "https://libraries.minecraft.net/com/google/guava/guava/15.0/guava-15.0.jar"
                }
            },
            "name": "com.google.guava:guava:15.0"
        },

Not sure if I'm doing something wrong, but it's just using the .json that was generated for Forge by MCLC. I'm also not too sure if removing this library would cause issues, but it seems to be fine. If it shouldn't be there I assume one could skip it in the downloadToDirectory function in handler.js, but again I could be wrong.

Any help is appreciated, thanks!

dooji2 avatar Jun 23 '24 14:06 dooji2

I don't think there's something MCLC can do. MCLC gets the version.json from the version itself, modifying nothing

PadowYT2 avatar Jun 23 '24 16:06 PadowYT2

I'm traveling abroad so I'll be able to debug on my end once I get back (26th). In the meantime, could you post the stack trace that's being returned when Minecraft crashes?

Pierce01 avatar Jun 23 '24 23:06 Pierce01

Yep here it is

[20:24:05] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

App.js:320 [20:24:05] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

App.js:320 Exception in thread "main" 
App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: java.lang.NoSuchMethodError: com.google.common.io.CharSource.readLines(Lcom/google/common/io/LineProcessor;)Ljava/lang/Object;

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at cpw.mods.fml.common.asm.transformers.AccessTransformer.processATFile(AccessTransformer.java:125)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at cpw.mods.fml.common.asm.transformers.AccessTransformer.readMapFile(AccessTransformer.java:120)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at cpw.mods.fml.common.asm.transformers.AccessTransformer.<init>(AccessTransformer.java:101)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at cpw.mods.fml.common.asm.transformers.AccessTransformer.<init>(AccessTransformer.java:97)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at java.lang.Class.newInstance(Class.java:442)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.launchwrapper.LaunchClassLoader.registerTransformer(LaunchClassLoader.java:88)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at cpw.mods.fml.common.launcher.FMLDeobfTweaker.injectIntoClassLoader(FMLDeobfTweaker.java:32)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.launchwrapper.Launch.launch(Launch.java:115)

App.js:320 [20:24:05] [main/INFO]: [java.lang.Throwable$WrappedPrintStream:println:748]: 	at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

App.js:323 Minecraft process exited with code 1

dooji2 avatar Jun 24 '24 20:06 dooji2

Not sure if its related but I am having a similar issue with fresh vanilla 1.7.x versions being completely unable to launch.

Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
        at com.google.gson.Gson.fromJson(Gson.java:815)
        at com.google.gson.Gson.fromJson(Gson.java:768)

        at com.google.gson.Gson.fromJson(Gson.java:717)
        at net.minecraft.client.main.Main.main(SourceFile:120)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
        at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:374)
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183)
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
        at com.google.gson.Gson.fromJson(Gson.java:803)
        ... 3 more

CERcoding avatar Jul 15 '24 06:07 CERcoding

Well, I found the fix for my issue. In the handler, getLaunchOptions() does args = args.filter(value => typeof value === 'string' || typeof value === 'number') just before returning. this removes arg user_properties value {} which seems to be a required argument for 1.7 minecraft versions. I quickly fixed it by changing the filter to: args = args.map(value => typeof value === 'object' ? JSON.stringify(value) : value)

this is just a quick fix and not very deeply looked into. I tested some other versions and it seems to be fine. There still might be some nuances I am missing.

If this helps with OPs issue then great, if not, still something to take note of in my opinion.

CERcoding avatar Jul 15 '24 07:07 CERcoding

Unfortunately that didn't help :(, although oddly in my case vanilla 1.7.X works fine for me out-of-the-box. Interesting enough, it seems that replacing the guava-15.0.jar with guava-17.0.jar and renaming it to guava-15.0.jar results in a successful launch

dooji2 avatar Jul 15 '24 16:07 dooji2

I had the same problem. The solution above with guava replacement helped

w01f-o avatar Oct 13 '24 14:10 w01f-o