Misleading error message for syntax errors within mmc-pack.json
System Information
MultiMC version: 0.6.11
Operating System: linux64
Summary of the issue or suggestion:
When manually editing mmc-pack.json, sometimes a syntax error is inadvertently introduced. However, trying to launch the instance, the error message "Instance update failed because: Null jar is specified in the metadata, aborting." is displayed instead. This error message is pretty bad to begin with and likely should be made more clear, but in this case it's entirely unrelated to what's going on.
What should happen:
An error message similar to: "Could not parse mmc-pack.json due to a JSON syntax error: (error message)"
Steps to reproduce the issue (Add more if needed):
-
Create a new MultiMC instance
-
Introduce a syntax error in the mmc-pack.json
-
Attempt to launch the game
Suspected cause:
MultiMC accurately detects an error:
6590.175 C Couldn't parse "/home/coderbot/.local/share/multimc/instances/JSON Syntax Error/mmc-pack.json" : "unterminated object"
6590.175 W Ignoring overriden order
6590.175 C Failed to load the component config for instance "JSON Syntax Error"
However, it continues to proceed with the launch process regardless instead of reporting that error directly. This probably leads to a weird internal state causing MultiMC to report this unrelated error.
Logs/Screenshots:
6579.885 D Opening directory "/home/coderbot/.local/share/multimc/instances/JSON Syntax Error"
6589.838 D Task "LaunchController(0x3016120)" starting for the first time
6589.839 D Task "RefreshTask(0x26c2590)" starting for the first time
6590.081 D Processing authentication response.
6590.081 D Getting new access token.
6590.081 D Finished reading refresh response.
6590.081 D Task "RefreshTask(0x26c2590)" succeeded
6590.081 D Writing account list to "accounts.json"
6590.081 D Building JSON data structure.
6590.081 D Building account array.
6590.081 D Writing account list to file.
6590.081 D Saved account list to "accounts.json"
6590.147 C Couldn't parse "/home/coderbot/.local/share/multimc/instances/JSON Syntax Error/mmc-pack.json" : "unterminated object"
6590.147 W Ignoring overriden order
6590.147 C Failed to load the component config for instance "JSON Syntax Error"
6590.148 W QMetaObject::connectSlotsByName: No matching signal for on_RunningState_changed(bool)
6590.150 W QMetaObject::connectSlotsByName: No matching signal for on_RunningState_changed(bool)
6590.152 W QMetaObject::connectSlotsByName: No matching signal for on_RunningState_changed(bool)
6590.154 W QMetaObject::connectSlotsByName: No matching signal for on_RunningState_changed(bool)
6590.156 W QMetaObject::connectSlotsByName: No matching signal for on_RunningState_changed(bool)
6590.174 D Task "LaunchTask(0x7f4a4c016a10)" starting for the first time
6590.174 D Task "TextPrint(0x2f88f10)" starting for the first time
6590.174 D Task "TextPrint(0x2f88f10)" succeeded
6590.174 D Task "TextPrint(0x2b9c8b0)" starting for the first time
6590.174 D Task "TextPrint(0x2b9c8b0)" succeeded
6590.174 D Task "CheckJava(0x187b810)" starting for the first time
6590.174 D Task "CheckJava(0x187b810)" succeeded
6590.174 D Task "ClaimAccount(0x7f4a4c016fa0)" starting for the first time
6590.174 D Writing account list to "accounts.json"
6590.174 D Building JSON data structure.
6590.174 D Building account array.
6590.174 D Writing account list to file.
6590.174 D Saved account list to "accounts.json"
6590.175 D Task "ClaimAccount(0x7f4a4c016fa0)" succeeded
6590.175 D Task "Update(0x7f4a4c01d860)" starting for the first time
6590.175 D Task "MinecraftUpdate(0x2f9b080)" starting for the first time
6590.175 C Couldn't parse "/home/coderbot/.local/share/multimc/instances/JSON Syntax Error/mmc-pack.json" : "unterminated object"
6590.175 W Ignoring overriden order
6590.175 C Failed to load the component config for instance "JSON Syntax Error"
6590.175 D Task "FoldersTask(0x2f9ac90)" starting for the first time
6590.175 D Task "FoldersTask(0x2f9ac90)" succeeded
6590.175 D Task "LibrariesTask(0x2f9ece0)" starting for the first time
6590.175 D "JSON Syntax Error" : downloading libraries
6590.175 C Task "LibrariesTask(0x2f9ece0)" failed: "Null jar is specified in the metadata, aborting."
6590.175 C Task "MinecraftUpdate(0x2f9b080)" failed: "Null jar is specified in the metadata, aborting."
6590.175 C Task "Update(0x7f4a4c01d860)" failed: "Instance update failed because: Null jar is specified in the metadata, aborting.
"
6590.175 D Writing account list to "accounts.json"
6590.175 D Building JSON data structure.
6590.175 D Building account array.
6590.175 D Writing account list to file.
6590.175 D Saved account list to "accounts.json"
6590.181 C Task "LaunchTask(0x7f4a4c016a10)" failed: "Instance update failed because: Null jar is specified in the metadata, aborting.
"
6590.181 C Task "LaunchController(0x3016120)" failed: "Instance update failed because: Null jar is specified in the metadata, aborting.
"
6590.181 D Task "NetJob(Libraries for instance JSON Syntax Error)" starting for the first time
6590.186 D Task "NetJob(Libraries for instance JSON Syntax Error)" succeeded
Additional Info:
This error message as a result of a JSON syntax error has been observed here as well, however, this issue is a superset of the other issue. An empty file is just a type of JSON syntax error, after all. Still, I think that there should be a clear error message either way.
Looks like this got buried, but it definitely seems worth fixing. Labelled.
Just got this error and had to readd the mmc-pack.json (that I luckly had a backup ig) which showed up as empty for no actual reason, I was playing the pack yesterday fine, and today when i went to open it, I suddenly got that error saying "Instance update failed because: Null jar is specified in the metadata, aborting..."