betacraftuk / betacraft-launcher

A launcher for Minecraft focused on legacy versions of the game
https://betacraft.uk
GNU General Public License v3.0
336 stars 40 forks source link

[BUG] java.lang.NullPointerException black screen most versions #356

Closed peteriscool0930 closed 2 months ago

peteriscool0930 commented 2 months ago

Black screen consistently trying to run most versions. I've done most testing on 1.5.2 1.5.2-pre-250903 works

I have tried a few things: Manually downloading 1.5.2.jar version, without forcing the update ->In Windows 7, this does not change the log

I have also tried to download multiple versions of Java8 and forcing the update, including 8u51, 8u151, 8u202 and 8u421 (latest as of writing) ->All of these result in the same log, and I always end up with a 0-byte 1.5.2.jar version file.

Desktop:

LOG: (15:32:21) Java version: Oracle Corporation, Java(TM) SE Runtime Environment, 1.8.0_421-b09 (15:32:22) System: windows 7, 6.1, amd64 (15:32:23) Loaded in: 1668933847 ns (15:32:29) [Beta Evolutions] Authenticated with 0 nodes (15:32:29) (15:32:29) Classpath: (15:32:29) C:\Users\Kids\AppData\Roaming.betacraft\versions/1.5.2.jar (15:32:29) C:\Users\Kids\AppData\Roaming.betacraft\bin/jinput.jar (15:32:29) C:\Users\Kids\AppData\Roaming.betacraft\bin/lwjgl.jar (15:32:29) C:\Users\Kids\AppData\Roaming.betacraft\bin/lwjgl_util.jar (15:32:29) (15:32:29) (15:32:30) Loading addons: (15:32:30) (15:32:30) java.lang.NullPointerException (15:32:30) at org.betacraft.Wrapper.loadMainClass(Wrapper.java:400) (15:32:30) at org.betacraft.Wrapper.loadJars(Wrapper.java:479) (15:32:30) at org.betacraft.Wrapper.play(Wrapper.java:489) (15:32:30) at org.betacraft.Wrapper.(Wrapper.java:183) (15:32:30) at org.betacraft.launcher.Launcher.main(Launcher.java:209) (15:32:30) java.lang.NullPointerException (15:32:30) at org.betacraft.Wrapper.setGameFolder(Wrapper.java:412) (15:32:30) at org.betacraft.Wrapper.play(Wrapper.java:493) (15:32:30) at org.betacraft.Wrapper.(Wrapper.java:183) (15:32:30) at org.betacraft.launcher.Launcher.main(Launcher.java:209) (15:32:30) A critical error has occurred! (15:32:30) java.lang.NullPointerException (15:32:30) at org.betacraft.Wrapper.play(Wrapper.java:551) (15:32:30) at org.betacraft.Wrapper.(Wrapper.java:183) (15:32:30) at org.betacraft.launcher.Launcher.main(Launcher.java:209)

Moresteck commented 2 months ago

Try this release and tell if it's any different: https://github.com/betacraftuk/betacraft-launcher/releases/tag/1.09_17-rc2

peteriscool0930 commented 2 months ago

I actually figured out a solution. The 1.5.2 .jar file from https://betacraft.uk/server-archive/ that I downloaded doesn't work. I found another somewhere else (over 5MB, not <2.5MB in from the betacraft archive) and manually imported it without forcing the update. Worked.

Still seems like a bug in the 1.09_16 release, not being able to download. Maybe the 1.09_17 works, I haven't tried it. Fixing the archive file should be easy enough, tho.

Moresteck commented 2 months ago

Well, the issue is not about the launcher. It's about outdated Java failing to download versions from Mojang servers.

peteriscool0930 commented 2 months ago

What do you mean outdated Java? Java 8u421 released July 16, 2024.

Moresteck commented 2 months ago

What do you mean outdated Java? Java 8u421 released July 16, 2024.

I have also tried to download multiple versions of Java8 and forcing the update, including 8u51, 8u151, 8u202 and 8u421 (latest as of writing)

You're probably still using one of the older Javas to start the launcher. Just try 1.09_17-rc2 and you'll see.

Moresteck commented 2 months ago

I actually figured out a solution. The 1.5.2 .jar file from https://betacraft.uk/server-archive/

Also, as you might've noticed, that's a server archive. Not a client archive. You won't get the 1.5.2 client there.

peteriscool0930 commented 2 months ago

That makes sense now :)

But I thought betacraft was supposed to be compatible with Java8? I've been explicitly changing the java file path for every different version that I've tried.

Okay, I downloaded 1.09_17-rc2, with Java8_u421. Now in a popup, it says that my java is too old to connect to that resource. So, this is expected using Java8?

peteriscool0930 commented 2 months ago

Wait, I see what you're saying now. My computer is running an older version of Java just for the launcher. Let me uninstall all of my other versions except for u421.

Moresteck commented 2 months ago

That makes sense now :)

But I thought betacraft was supposed to be compatible with Java8?

Yes, it is compatible with Java 8. 1.09_16 can even run on Java 5. But not all download links used by the launcher are compatible with old Java, mainly the ones that link to Mojang servers.

peteriscool0930 commented 2 months ago

Well, I just tried it, uninstalling everything but u421, then reinstalling u421 for good measure. Neither 1.09_17-rc2 nor 1.09_16 work. Same issue. 1.09_17-rc2 has a popup, and 1.09_16 matches the original log.

Moresteck commented 2 months ago

Well, I just tried it, uninstalling everything but u421, then reinstalling u421 for good measure. Neither 1.09_17-rc2 nor 1.09_16 work. Same issue. 1.09_17-rc2 has a popup, and 1.09_16 matches the original log.

See what it says in .betacraft/launcher/launcher.log. Is it truly 8u421?

peteriscool0930 commented 2 months ago

Yes.

launcher.log

Moresteck commented 2 months ago

Ok, looks like the issue might be on you here. Your system clock is set to... 2006. You shouldn't expect the cert generated in June 2023 to be valid in 2006, should you? Lol

peteriscool0930 commented 2 months ago

I think that was it! Thanks for your help. Like I said, the 1.5.2-pre-250903 download worked fine, and with the other similar blackscreen bugs open I guess I didn't think of the cert.