Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install new FTB modpacks #3304

Closed
Leo40Git opened this issue Aug 21, 2020 · 15 comments
Closed

Can't install new FTB modpacks #3304

Leo40Git opened this issue Aug 21, 2020 · 15 comments

Comments

@Leo40Git
Copy link
Contributor

Leo40Git commented Aug 21, 2020

System Information

MultiMC version: 0.6.12-develop-1462

Operating System: Windows 10 20H2 (build 19042)

Summary of the issue or suggestion:

image
I feel like this image explains it better than I could.

What should happen:

The modpack files should be downloaded into the correct place.

Steps to reproduce the issue:

  1. Create a new instance.

  2. Select the new "FTB" source option.

  3. Select a modpack. The pictured error was achieved by using "FTB Presents Stoneblock 2", but I don't doubt this bug affects other modpacks as well.

  4. Press "OK". The "downloading mods" progress bar will appear as normal, but the pictured error message (or a similar message) will pop up after the downloads are done.

Suspected cause:

Seems like URLs with escaped characters aren't handled properly.
Apparently URLs are being escaped twice - %XX turns into %25XX.

Logs/Screenshots:

MultiMC-0.log: https://paste.ee/p/9PzMS

@Averymon
Copy link

I am getting the same issues, for stoneblock 2 and sky factory 3
multimc
multimc 2

@jamierocks
Copy link
Contributor

Looking into this, its due to weird encoding with some URLs.

https://dist.modpacks.ch/modpacks/0/2/config/brandon3055/ResourceCache/Cache%25232134442667.png in the JSON, but the proper one is https://dist.modpacks.ch/modpacks/0/2/config/brandon3055/ResourceCache/Cache%232134442667.png (note %2531 in the API, %31 being the proper URL).

@Leo40Git
Copy link
Contributor Author

Does modpacks.ch have an issue tracker?

@ThexXTURBOXx
Copy link

ThexXTURBOXx commented Aug 27, 2020

TL;DR:
https://modpack-api.ch.tools/ could be a workaround until the official API gets an fix.
OR:
MultiMC "un-escapes" the URL Strings once to get the corresponding correct URL.
Both of them are just workarounds, not real fixes!!!

After looking into the source code of the new FTB Launcher, I noticed that there is another endpoint, which is only used in "Dev Mode":
https://modpack-api.ch.tools/
It offers slightly different information, but the links there are working, because sometimes the files are saved with their hash as file name and then they get renamed when downloading the files.
Corresponding files for reference here:
https://github.com/CreeperHost/modpacklauncher/blob/master/src/main/java/net/creeperhost/creeperlauncher/minecraft/modloader/forge/ForgeInstallerModLoader.java#L28
https://github.com/CreeperHost/modpacklauncher/blob/master/src/main/java/net/creeperhost/creeperlauncher/util/DownloadUtils.java#L16
https://github.com/CreeperHost/modpacklauncher/blob/master/src/main/java/net/creeperhost/creeperlauncher/Constants.java#L24

The %25 corresponds to the literal '%' character in ASCII btw. It seems like, the API escapes an escaped string again, because the file name is something like Cache-#2714365, which is saved as the escaped string Cache-%232714365. But then when getting the String, it gets escaped once again, so the '%' becomes a %25, which then leads to the %2523.

@credomane
Copy link

Found this bug report thanks to @jamierocks. My search before making my ticket wasn't good enough it seems.

One thing I would like to add is that the FTBApp just ignores any failed downloads. After digging around the FTBApp's webpack files I confirmed this (Maybe I'm not cool kid enough but why are they webpacked inside an electron app anyways?). Then double confirmed it by checking for the existence of the files that fail to download in MultiMC and they were missing as expected from the FTBApp install. To further prove FTPApp ignores failed downloads if I disabled my Ethernet card when a pack is 50% downloaded the download will "hang" for about thirty seconds and then surprise the pack is magically installed successfully with 50% of the files flat out missing.

Naturally the pack won't run properly in that case but if the failed downloads are a small handful of config files? You might not ever know they are missing.

I'm not saying MultiMC needs to start ignoring failed download but that we need to report this to FTB and get them to fix their app which will in turn make them fix this problem with modpacks.ch.

@peterix
Copy link
Member

peterix commented Sep 10, 2020

Sounds to me like the FTB platform has a serious bug and should fix it.

@Leo40Git
Copy link
Contributor Author

How... did they mess up their own platform that badly?
Who ignores download errors when downloading is one of the main features of your launcher??

@credomane
Copy link

credomane commented Sep 11, 2020

How... did they mess up their own platform that badly?
Who ignores download errors when downloading is one of the main features of your launcher??

After more digging it looks like there is a download failed dialog and the failures aren't being ignored entirely if the log files are anything to go by. For whatever reason the failures are noticed and logged but the fail condition doesn't seem to be getting triggered in the end.

[edit]
I blame it on the weird way their app is structured. I thought things felt weird looking at the installed files but after finding the repo page and starting a bug report things were confirmed. You have an installer version(why?), app version and UI version all independent of each other....My guess? Their is some missing/bad communication between the UI and app resulting in the "successful" installs.

@MonfGeiger
Copy link

First off, im experiencing this same problem when I try downloading stoneblock 2 from the FTB tab via dev channel multimc

Now to be fair, I dont want to have to waste the time to make an ftb forum account unless I absolutely have to if their discord isn't responding as....fast as it can, but are the FTB launcher devs even aware of this problem at all? I stuck with MultiMC because I consider it the least shitty/chunky launcher compared to ATLauncher or the technic launcher. For their new API to be having this problem already........methinks they needed to let this API of theirs cook for a while longer before they full on released it

hell, the only reply concerning this API issue/modpac issue I had on their discord support channel was from a rando that said "lel use the ftb launcher, get rid of MultiMC" or something along the lines.....im a bit sauced right now, forgive the loose mouth + dumb (Crown Royal + Coca Cola)

@jamierocks
Copy link
Contributor

They know, @Rushmead say that he was going to get this fixed at some point. Perhaps he's forgotten, maybe it's still something to get done.

@MonfGeiger
Copy link

one of them in the mean time recommended I try to use the ftbinstall utility to install this modpack, but I don't have much experience with it. Like what does it consider the default install directory, or will it only work if I manage to hook it into a launcher client or whatever else im missing, c'mon

Also, when did rushmead say he knows, did he say it a few days ago, weeks ago, months ago, just so I know if he did indeed forgot because other stuff piling on (I can understand in that regard)

@jamierocks
Copy link
Contributor

Like what does it consider the default install directory,

Being the authour of that library, I'll chime in for this one - it installs to the working directory.


Anyhow, the first correspondence to @Rushmead I can quickly find is on the 11th September.

jamierocks added a commit to jamierocks/MultiMC5 that referenced this issue Oct 11, 2020
This is a temporary measure, to match FTB's own installer, to allow
packs to download while FTB work on fixing the data from their API.
@credomane
Copy link

Would it be possible to "fix" the url instead of ignoring the error like FTBApp? So far, in my experience, every single file that fails to download is because the URL in the pack.json is, for some reason, double URL encoded.

I don't know if the MultiMC downloader has a way to do this or not? So say a download fails with 404 then URL decode and retry with the new url. If it fails with 404 again either fail the pack download or go FTBApp style ignoring the failure.

This patch makes it works same as FTBApp but there are some modpacks that currently can not be installed properly with FTBApp (or multimc) because of this problem.

@jamierocks
Copy link
Contributor

I tried a bunch of setups trying to decode the URL, none that I tried ended up working.

The patch is only meant to be a stop-gap while FTB fix their data, after which I'll submit a patch to revert the change.

@peterix
Copy link
Member

peterix commented Oct 12, 2020

As long as FTB works that way, trying to 'fix' the packs would just make us potentially incompatible with FTB servers. So, no.

jamierocks added a commit to jamierocks/MultiMC5 that referenced this issue Jun 3, 2021
This effectively reverts the changes made in [1] to resolve MultiMCGH-3304.

[1] 05ffcf7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants