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

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

Open
ChristopherHaws opened this issue Jan 3, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@ChristopherHaws
Copy link

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)

@Ampflower
Copy link

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.

@ChristopherHaws
Copy link
Author

@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.

@Ampflower
Copy link

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.

@ChristopherHaws
Copy link
Author

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.

@comp500
Copy link
Member

comp500 commented Jan 15, 2023

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 comp500 added the enhancement New feature or request label Jan 15, 2023
@comp500
Copy link
Member

comp500 commented Jan 15, 2023

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.

@fuzzyweapon
Copy link

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.

@masonbesmer
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants