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).
Linked issues
Comments 3
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)
I see ticket MC-431 was again wrongly closed, this time as an invalid report. Please don't just close this ticket for the same reason. See my comment in MC-431 for why.