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

Launcher fails to download jar for json version specifying "jar" from another version

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 2.2.7447 (Windows), 2.2.12145 (Windows), 2.3.240 (Windows), 2.3.443 (Windows), 2.3.645 (New Windows App), 2.14.12 (Win 10/11)
    • Minecraft Launcher
    • None
    • Confirmed
    • 1149718

      If you create a JSON file for a version that uses "jar" in order to reuse the jar (for example, the jar from an official version), the launcher will fail to download the jar if that didn't exist yet, and instead download an invalid file (the permission denied error page) that will make the startup crash without any useful debug info in subsequent launches.

       

      I've attached a minimal json file to reproduce this problem that simply inherits everything from 1.17.1, both the rest of the JSON and the jar.

      Steps to reproduce:

      • Remove the JAR file from your 1.17.1 folder inside of versions if you have it, you can keep the json
      • Save 1.17.1-Test.json into a folder called 1.17.1-Test in your versions folder
      • Open the launcher and create a new profile using version 1.17.1-Test (you need the "modded" checkbox enabled)
      • Launch that profile (acknowledge "modded" risks), and find the game not launching and an error in the log (and output window if open) about the downloaded file
      • Try launching again, and see that the game doesn't launch because the main class was just not found

      The launcher is trying to download the 1.17.1 jar from https://s3.amazonaws.com/Minecraft.Download/versions/1.17.1/1.17.1.jar, that seems to be a default/fallback url, instead of the actual URL as specified in the 1.17.1 json.

      This works properly if the 1.17.1 jar was already downloaded by launching the 1.17.1 version at least once, and the launcher will properly replace it with the 1.17.1 jar if you launch 1.17.1 afterwards (assuming this is because sha check fails there, that should probably also be checked when launching the one that inherits from it).

      Raw test json:

      {   "id": "1.17.1-Test",   "inheritsFrom": "1.17.1",   "jar": "1.17.1" }

        1. 1.17.1-Test.json
          0.1 kB
        2. MCL-20504.mp4
          3.50 MB
        3. image-2022-06-24-18-15-18-037.png
          image-2022-06-24-18-15-18-037.png
          202 kB
        4. MCL-20504.png
          MCL-20504.png
          751 kB
        5. Screenshot 2024-06-10 161524.png
          Screenshot 2024-06-10 161524.png
          35 kB

            Unassigned Unassigned
            altrisi altrisi
            Votes:
            8 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: