Launcher "fatal error 4 (null)" error - fix included
See also MC-431, which was wrongly closed as "not a bug".
There is indeed a bug in the launcher, as a quick decompile of the launcher JAR shows. See this code around line 454 of GameUpdater, in the downloadJars() method:
str1 = localURLConnection.getHeaderField("ETag");
str1 = str1.substring(1, str1.length() - 1);
The code blindly assumes that the HTTP response header always contains an ETag field, which is not necessarily true. This tag is often stripped by HTTP proxies.
Very easily fixed by adding a "if (str1 != null)" test to line 454 (note that str1 is later compared with null in the method so it's safe to continue with it set to null).
Environment
Linux, Windows (this is not platform-specific)
Linked Issues
Created Issue:
Launcher "fatal error 4 (null)" error - fix included
See also
MC-431, which was wrongly closed as "not a bug".There is indeed a bug in the launcher, as a quick decompile of the launcher JAR shows. See this code around line 454 of GameUpdater, in the downloadJars() method:
str1 = localURLConnection.getHeaderField("ETag"); str1 = str1.substring(1, str1.length() - 1);The code blindly assumes that the HTTP response header always contains an ETag field, which is not necessarily true. This tag is often stripped by HTTP proxies.
Very easily fixed by adding a "if (str1 != null)" test to line 454 (note that str1 is later compared with null in the method so it's to continue with it set to null).
Environment
Linux, Windows (this is not platform-specific)
Linked Issues
- Unresolved
- Open
- Minecraft - Public
- Unconfirmed
Normal
- launcher
- 1.4.5
See also
MC-431, which was wrongly closed as "not a bug".There is indeed a bug in the launcher, as a quick decompile of the launcher JAR shows. See this code around line 454 of GameUpdater, in the downloadJars() method:
str1 = localURLConnection.getHeaderField("ETag"); str1 = str1.substring(1, str1.length() - 1);The code blindly assumes that the HTTP response header always contains an ETag field, which is not necessarily true. This tag is often stripped by HTTP proxies.
Very easily fixed by adding a "if (str1 != null)" test to line 454 (note that str1 is later compared with null in the method so it's safe to continue with it set to null).
duplicates
is duplicated by
is duplicated by
I see ticket
MC-431was again wrongly closed, this time as an invalid report. Please don't just close this ticket for the same reason. See my comment inMC-431for why.Same issue for me. I am behind a proxy and cannot update minecraft due to NullPointerException:
java.lang.NullPointerException at net.minecraft.GameUpdater.downloadJars(GameUpdater.java:454) at net.minecraft.GameUpdater.run(GameUpdater.java:247) at net.minecraft.Launcher$1.run(Launcher.java:76) Fatal error occured (4): null java.lang.NullPointerException at net.minecraft.GameUpdater.downloadJars(GameUpdater.java:454) at net.minecraft.GameUpdater.run(GameUpdater.java:247) at net.minecraft.Launcher$1.run(Launcher.java:76)Does the new launcher fix this?