meza / minecraft-mod-manager

A CLI utility to Manage Minecraft Mods
https://discord.gg/dvg3tcQCPW
GNU General Public License v3.0
33 stars 3 forks source link

Error during update mods "Jar file was empty" #524

Closed SkirOwen closed 4 months ago

SkirOwen commented 11 months ago

What happened?

I run mmm update after adding mods to check if up to date. I got the following error:

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: Jar file was empty
    at C:\snapshot\minecraft-mod-manager\dist\mmm.cjs
    at Array.map (<anonymous>)
    at getScanResults (C:\snapshot\minecraft-mod-manager\dist\mmm.cjs)
    at scanFiles (C:\snapshot\minecraft-mod-manager\dist\mmm.cjs)
    at handleUnknownFiles (C:\snapshot\minecraft-mod-manager\dist\mmm.cjs)
    at async install (C:\snapshot\minecraft-mod-manager\dist\mmm.cjs)
    at async update (C:\snapshot\minecraft-mod-manager\dist\mmm.cjs)
    at async _Command.<anonymous> (C:\snapshot\minecraft-mod-manager\dist\mmm.cjs)
    at async _Command.parseAsync (C:\snapshot\minecraft-mod-manager\dist\mmm.cjs)

Node.js v18.5.0

What did you expect to happen?

I expected it to update mods.

Which command did you run?

mmm update

Operating System

Windows

What version of MMM are you running?

1.3.8

Contents of the modlist.json

{
  "loader": "fabric",
  "gameVersion": "1.20.4",
  "defaultAllowedReleaseTypes": [
    "beta",
    "release"
  ],
  "modsFolder": "./mods",
  "mods": [
    {
      "type": "modrinth",
      "id": "AANobbMI",
      "name": "Sodium"
    },
    {
      "type": "modrinth",
      "id": "mOgUt4GM",
      "name": "Mod Menu"
    },
    {
      "type": "modrinth",
      "id": "TQTTVgYE",
      "name": "Carpet"
    },
    {
      "type": "modrinth",
      "id": "Bh37bMuy",
      "name": "Reese's Sodium Options"
    },
    {
      "type": "modrinth",
      "id": "9s6osm5g",
      "name": "Cloth Config API"
    },
    {
      "type": "modrinth",
      "id": "YL57xq9U",
      "name": "Iris Shaders"
    },
    {
      "type": "curseforge",
      "id": "557076",
      "name": "Freecam (Fabric/Forge)"
    },
    {
      "type": "modrinth",
      "id": "8shC1gFX",
      "name": "BetterF3"
    },
    {
      "type": "modrinth",
      "id": "Nv2fQJo5",
      "name": "ReplayMod"
    },
    {
      "type": "modrinth",
      "id": "M08ruV16",
      "name": "Bobby"
    },
    {
      "type": "curseforge",
      "id": "303119",
      "name": "MaLiLib"
    },
    {
      "type": "curseforge",
      "id": "308892",
      "name": "Litematica"
    },
    {
      "type": "curseforge",
      "id": "244260",
      "name": "MiniHUD"
    },
    {
      "type": "modrinth",
      "id": "PtjYWJkn",
      "name": "Sodium Extra"
    }
  ]
}

Contents of the modlist-lock.json

[
  {
    "name": "Sodium",
    "type": "modrinth",
    "id": "AANobbMI",
    "fileName": "sodium-fabric-mc1.20.3-0.5.5.jar",
    "releasedOn": "2023-12-09T04:06:09.723989Z",
    "hash": "999eb53c5761850e99d234812dd0f710640b79a5",
    "downloadUrl": "https://cdn.modrinth.com/data/AANobbMI/versions/InGKdfel/sodium-fabric-mc1.20.3-0.5.5.jar"
  },
  {
    "name": "Mod Menu",
    "type": "modrinth",
    "id": "mOgUt4GM",
    "fileName": "modmenu-9.0.0.jar",
    "releasedOn": "2023-12-18T21:18:12.030704Z",
    "hash": "eb09a3b6668407df4ad9b24849d52a38c448877e",
    "downloadUrl": "https://cdn.modrinth.com/data/mOgUt4GM/versions/sjtVVlsA/modmenu-9.0.0.jar"
  },
  {
    "name": "Carpet",
    "type": "modrinth",
    "id": "TQTTVgYE",
    "fileName": "fabric-carpet-1.20.3-1.4.128+v231205.jar",
    "releasedOn": "2023-12-11T16:59:42.634207Z",
    "hash": "53ee95647e15097f369061e372d8c9411635b4a7",
    "downloadUrl": "https://cdn.modrinth.com/data/TQTTVgYE/versions/yYzR60Xd/fabric-carpet-1.20.3-1.4.128%2Bv231205.jar"
  },
  {
    "name": "Reese's Sodium Options",
    "type": "modrinth",
    "id": "Bh37bMuy",
    "fileName": "reeses_sodium_options-1.7.0+mc1.20.2-build.97.jar",
    "releasedOn": "2023-10-27T21:17:53.638437Z",
    "hash": "5ab271d5c698f96618f717a231218810afc927b0",
    "downloadUrl": "https://cdn.modrinth.com/data/Bh37bMuy/versions/YxKBGhki/reeses_sodium_options-1.7.0%2Bmc1.20.2-build.97.jar"
  },
  {
    "name": "Cloth Config API",
    "type": "modrinth",
    "id": "9s6osm5g",
    "fileName": "cloth-config-13.0.121-fabric.jar",
    "releasedOn": "2023-12-21T10:23:27.195922Z",
    "hash": "e20f396a937a09b686aa986c802643b9adbb311e",
    "downloadUrl": "https://cdn.modrinth.com/data/9s6osm5g/versions/eBZiZ9NS/cloth-config-13.0.121-fabric.jar"
  },
  {
    "name": "Iris Shaders",
    "type": "modrinth",
    "id": "YL57xq9U",
    "fileName": "iris-mc1.20.4-1.6.14.jar",
    "releasedOn": "2023-12-13T02:48:57.229816Z",
    "hash": "7e62bb2851f2afc06946ea3fc170173528aefdbb",
    "downloadUrl": "https://cdn.modrinth.com/data/YL57xq9U/versions/Xl7oywRL/iris-mc1.20.4-1.6.14.jar"
  },
  {
    "name": "Freecam (Fabric/Forge)",
    "type": "curseforge",
    "id": "557076",
    "fileName": "freecam-fabric-1.2.2+1.20.4.jar",
    "releasedOn": "2023-12-25T05:27:13.453Z",
    "hash": "0e36669dc5ce3b554037505e4c18a6a5018c3242",
    "downloadUrl": "https://edge.forgecdn.net/files/4981/830/freecam-fabric-1.2.2%2b1.20.4.jar"
  },
  {
    "name": "BetterF3",
    "type": "modrinth",
    "id": "8shC1gFX",
    "fileName": "BetterF3-9.0.0-Fabric-1.20.4.jar",
    "releasedOn": "2023-12-17T20:59:01.495527Z",
    "hash": "38d1588b91104c7375bf81e455902a5b7b61c479",
    "downloadUrl": "https://cdn.modrinth.com/data/8shC1gFX/versions/zlYOLCve/BetterF3-9.0.0-Fabric-1.20.4.jar"
  },
  {
    "name": "ReplayMod",
    "type": "modrinth",
    "id": "Nv2fQJo5",
    "fileName": "replaymod-1.20.4-2.6.14.jar",
    "releasedOn": "2023-12-12T15:21:17.474496Z",
    "hash": "427b8fcf0725246c837427d16119f42f883a70ed",
    "downloadUrl": "https://cdn.modrinth.com/data/Nv2fQJo5/versions/gxDkodfS/replaymod-1.20.4-2.6.14.jar"
  },
  {
    "name": "Bobby",
    "type": "modrinth",
    "id": "M08ruV16",
    "fileName": "bobby-5.0.3.jar",
    "releasedOn": "2023-12-06T09:09:15.895005Z",
    "hash": "e910ff7dfa6a56ed00f62b7fb8e523f40525c9ca",
    "downloadUrl": "https://cdn.modrinth.com/data/M08ruV16/versions/Byj5ahzr/bobby-5.0.3.jar"
  },
  {
    "name": "MaLiLib",
    "type": "curseforge",
    "id": "303119",
    "fileName": "malilib-fabric-1.20.4-0.18.0.jar",
    "releasedOn": "2023-12-10T15:54:47.85Z",
    "hash": "edd1316f7e8696b013a124ef724eb05e93fea9ae",
    "downloadUrl": "https://edge.forgecdn.net/files/4946/328/malilib-fabric-1.20.4-0.18.0.jar"
  },
  {
    "name": "Litematica",
    "type": "curseforge",
    "id": "308892",
    "fileName": "litematica-fabric-1.20.4-0.17.0.jar",
    "releasedOn": "2023-12-10T16:55:09.09Z",
    "hash": "76d3ac7054b779f517441cbea4c575368071bdba",
    "downloadUrl": "https://edge.forgecdn.net/files/4946/471/litematica-fabric-1.20.4-0.17.0.jar"
  },
  {
    "name": "MiniHUD",
    "type": "curseforge",
    "id": "244260",
    "fileName": "minihud-fabric-1.20.4-0.30.0.jar",
    "releasedOn": "2023-12-10T15:56:57.777Z",
    "hash": "581ff2c0d2e8db8f759f07032165344f68c9b605",
    "downloadUrl": "https://edge.forgecdn.net/files/4946/335/minihud-fabric-1.20.4-0.30.0.jar"
  },
  {
    "name": "Sodium Extra",
    "type": "modrinth",
    "id": "PtjYWJkn",
    "fileName": "sodium-extra-0.5.3+mc1.20.2-build.114.jar",
    "releasedOn": "2023-10-27T21:18:55.873288Z",
    "hash": "36f5fbe6b699600b648bdbb854c9f54d54fd9444",
    "downloadUrl": "https://cdn.modrinth.com/data/PtjYWJkn/versions/e8Jw5Pey/sodium-extra-0.5.3%2Bmc1.20.2-build.114.jar"
  }
]

I have updated

meza commented 11 months ago

Wow, interesting! Can you try deleting all the mods you have locally (in your mods folder) and run mmm u?

Might have been a weird internet somewhere along the line

SkirOwen commented 11 months ago

That solved it, thanks!

meza commented 11 months ago

Great to hear! I should put this in the docs 🤣 The equivalent of turning it off and on again.

Sometimes Modrinth or Cursforge act up and things go wrong for no apparent reason.

meza commented 4 months ago

I can't reproduce it but I am keen on finding ways to make things better so if anyone else is having this exact issue, please help me find a way!