Uploaded image for project: 'Minecraft Launcher'
  1. Minecraft Launcher
  2. MCL-2913

Slow internet connection can prevent Minecraft downloading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Incomplete
    • None
    • 1.5, 1.5.1
    • None
    • Windows 8.1, Java 1.8.
      Slow Internet connection.
    • Unconfirmed

      If you have a slow Internet connection, the launcher may fail to download completely the files.
      14w32b file is sized about 700 kB in my computer but the real size is about 7.3 MB
      Console log:

      [10:09:22 INFO]: Attempting to download C:\Users\theo\AppData\Roaming\.minecraft\versions\14w32b\14w32b.jar for job 'Version & Libraries'... (try 5)
      [10:09:53 WARN]: Couldn't download http://s3.amazonaws.com/Minecraft.Download/versions/14w32b/14w32b.jar for job 'Version & Libraries'
      java.lang.RuntimeException: E-tag did not match downloaded MD5 (ETag was 34169165e621bb9a5bff8cd950b1c7d2, downloaded b30aae6a765d384c30eb342adef336e4)
      	at com.mojang.launcher.updater.download.EtagDownloadable.download(EtagDownloadable.java:38) ~[launcher.jar:?]
      	at com.mojang.launcher.updater.download.DownloadJob.popAndDownload(DownloadJob.java:109) [launcher.jar:?]
      	at com.mojang.launcher.updater.download.DownloadJob.access$000(DownloadJob.java:12) [launcher.jar:?]
      	at com.mojang.launcher.updater.download.DownloadJob$1.run(DownloadJob.java:86) [launcher.jar:?]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_11]
      	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_11]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_11]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_11]
      	at java.lang.Thread.run(Unknown Source) [?:1.8.0_11]
      

      Explanations:
      I successfully decompile launcher.jar and I found this:

      protected HttpURLConnection makeConnection(URL url) throws IOException
      {
          HttpURLConnection connection = (HttpURLConnection)url.openConnection(this.proxy);
          connection.setUseCaches(false);
          connection.setDefaultUseCaches(false);
          connection.setRequestProperty("Cache-Control", "no-store,max-age=0,no-cache");
          connection.setRequestProperty("Expires", "0");
          connection.setRequestProperty("Pragma", "no-cache");
          connection.setConnectTimeout(5000); //High timeout connections may prevent downloading files
          connection.setReadTimeout(30000); //This causes the connection to abort after 30 sec
          return connection;
      }
      

      So if the file can't be downloaded within 30 seconds, the file is partial and prevent Minecraft to run.
      Then Minecraft 1.7.10 can't be downloaded in connections under 171 kB/s or 1369 kb/s.
      How to reproduce: (not reliable)
      Download lots of big files.
      Possible fixes:

      • Give unlimited time to download files.
      • Use a quite large timeout (like 3 min).

            Unassigned Unassigned
            theo77186 theo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: