packwiz-installer icon indicating copy to clipboard operation
packwiz-installer copied to clipboard

Handle "This mod is excluded from the CurseForge API and must be downloaded manually."

Open ChristopherHaws opened this issue 2 years ago • 9 comments

My modpack includes an optional mod that is hosted on curseforge and is set to disallow automatic downloads which results in an exception. It would be great if the packwiz installer would gracefully handle this exception, parse it for the links, and show a message and buttons to the user. The message could say something along the lines of: This mod is excluded from the CurseForge API and must be downloaded manually. with buttons for Open Download Page, Copy File Path, and Open Mods Directory.

java.lang.Exception: This mod is excluded from the CurseForge API and must be downloaded manually.
Please go to https://www.curseforge.com/minecraft/mc-mods/better-tips/files/4012378 and save this file to D:\games\Minecraft\PrismLauncher\instances\CraftersMC\.minecraft\mods\BetterTags-1.19.2-Fabric-v1.1.jar
	at link.infra.packwiz.installer.metadata.curseforge.CurseForgeSourcerKt.resolveCfMetadata(SourceFile:137)
	at link.infra.packwiz.installer.UpdateManager.validateAndResolve(SourceFile:449)
	at link.infra.packwiz.installer.UpdateManager.processIndex(SourceFile:360)
	at link.infra.packwiz.installer.UpdateManager.start(SourceFile:174)
	at link.infra.packwiz.installer.UpdateManager.<init>(SourceFile:43)
	at link.infra.packwiz.installer.Main.startup(SourceFile:109)
	at link.infra.packwiz.installer.Main.<init>(SourceFile:150)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
	at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
	at link.infra.packwiz.installer.bootstrap.LoadJAR.start(LoadJAR.java:51)
	at link.infra.packwiz.installer.bootstrap.Main.<init>(Main.java:91)
	at link.infra.packwiz.installer.bootstrap.Main.main(Main.java:46)

ChristopherHaws avatar Jan 03 '23 06:01 ChristopherHaws

It does seem notable that the prompt for this is also unskippable, as Structory, It Takes a Pillage and alike would not let the user continue with ignoring the errors.

Ampflower avatar Jan 04 '23 05:01 Ampflower

@KJP12 True. If the mod is marked as optional it should let the user skip, but if the mod is marked as required, it should disallow skipping.

ChristopherHaws avatar Jan 04 '23 19:01 ChristopherHaws

Yeah. I think the only potential work around for this would be to have the end user manually install the mods that has 3rd party launchers disabled, similar to how the main Packwiz program does it for making full modpacks.

Ampflower avatar Jan 05 '23 00:01 Ampflower

Yup, that is why I am recommending adding buttons which will aid the user to download the file manually and put it in the correct location. Another option would be to allow the user to click and drag the jar file into the packwiz window and let packwiz put it in the right spot.

ChristopherHaws avatar Jan 05 '23 01:01 ChristopherHaws

I actually have a WIP webview program that can be used to automate this process, allowing packwiz-installer to handle the download but still showing the CurseForge ads. I'm not sure why I didn't push this to GitHub yet, I should have time in the next few weeks to do so.

comp500 avatar Jan 15 '23 02:01 comp500

The webview will be an optional download fwiw (particularly since I can't necessarily guarantee it'll be available for the platform you are running packwiz-installer on), I do intend to also implement a fallback with similar UI to what OP suggests.

comp500 avatar Jan 15 '23 02:01 comp500

This issue is exactly what I'm dealing with right now. Is there a reason we just aren't rendering the urls in the error text? At the very least that would bump up the usability here while waiting on webview and this other UI. Forgive me, I'm not entirely familiar with the gui side of the tech stack.

fuzzyweapon avatar Feb 23 '23 22:02 fuzzyweapon

The webview will be an optional download fwiw (particularly since I can't necessarily guarantee it'll be available for the platform you are running packwiz-installer on), I do intend to also implement a fallback with similar UI to what OP suggests.

Are there any updates on this yet? I am trying to set up a server on linux using the minecraft docker but if it prompts for manual downloads/uploads I don't think it would be worth it.

masonbesmer avatar Oct 10 '23 22:10 masonbesmer

The webview will be an optional download fwiw (particularly since I can't necessarily guarantee it'll be available for the platform you are running packwiz-installer on), I do intend to also implement a fallback with similar UI to what OP suggests.

Are there any updates on this yet? I am trying to set up a server on linux using the minecraft docker but if it prompts for manual downloads/uploads I don't think it would be worth it.

@comp500

masonbesmer avatar Oct 15 '23 13:10 masonbesmer