Skip to content

Conversation

@AlexTMjugador
Copy link
Member

@AlexTMjugador AlexTMjugador commented Oct 4, 2025

PR #4270 modified the internal fetch function used by the application to download version artifacts in a way that 4xx HTTP errors also caused an abnormal return, instead of just 5xx errors. That was a good change, but it had the unintended side effect of exposing our faulty logic elsewhere of trying to download non-native JAR library artifacts when only native artifacts are appropriate, at least according to the PrismLauncher source code I've read. Such a download always returned a 404 error, but because such error was considered successful, a dummy library file was still created and things worked seemingly fine.

These changes bring the Modrinth App behavior in this regard more in line with PrismLauncher's, avoiding downloading non-native artifacts for dependencies that have native artifacts available. (Reference: https://github.com/PrismLauncher/PrismLauncher/blob/8b5e91920dda7324ad3db98f56b209bba0f4e57d/launcher/minecraft/Library.cpp#L163)

I've tested these changes to work successfully with a variety old Minecraft versions, including Fabric 1.14, vanilla 1.8.9, vanilla 1.13.2, Forge 1.12.2, vanilla 1.19, and vanilla 1.2.5.

Fixes #4464.

PR #4270 modified the internal `fetch` function used by the application
to download version artifacts in a way that 4xx HTTP errors also caused
an abnormal return, instead of just 5xx errors. That was a good change,
but it had the unintended side effect of exposing our faulty logic
elsewhere of trying to download non-native JAR library artifacts when
only native artifacts are appropriate, at least according to the
PrismLauncher source code I've read. Such a download always returned a
404 error, but because such error was considered successful, a dummy
library file was still created and things worked seemingly fine.

These changes bring the Modrinth App behavior in this regard more in
line with PrismLauncher's, avoiding downloading non-native artifacts for
dependencies that have native artifacts available. (Reference:
https://github.com/PrismLauncher/PrismLauncher/blob/8b5e91920dda7324ad3db98f56b209bba0f4e57d/launcher/minecraft/Library.cpp#L163)

I've tested these changes to work successfully with a variety of old
vanilla and modded Minecraft versions.

Fixes #4464.
@AlexTMjugador AlexTMjugador requested review from a team and Gaming32 October 4, 2025 21:19
@AlexTMjugador AlexTMjugador added the app Relates to Modrinth App label Oct 4, 2025
Copy link
Contributor

@fetchfern fetchfern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AlexTMjugador AlexTMjugador added this pull request to the merge queue Oct 4, 2025
Merged via the queue into main with commit fd80f12 Oct 4, 2025
3 checks passed
@AlexTMjugador AlexTMjugador deleted the alex/old-mc-version-download-fix branch October 4, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Relates to Modrinth App

Development

Successfully merging this pull request may close these issues.

Modrinth fails to install any version up to 1.12.2

2 participants