[GH-ISSUE #3413] Server Disconnect when Server Resource Pack has no valid pack metadata #961

Closed
opened 2026-11-02 15:43:11 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Uncompletet on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3413

Joining Loka (lokamc.com) prompts for a server resource pack. After the download is queued, Horizon disconnects with: The resource pack reload failed. Please try rejoining. The same pack loads fine in vanilla Minecraft.

Cause

The pack's pack.mcmeta is stored as a zip entry named pack.mcmeta/, so it looks like a directory (due to the / at the end) . Its contents are valid:

{"pack":{"description":"Official Loka Resource Pack","max_format":97,"min_format":75,"pack_format":75}}

To see the entry:

python3 -m zipfile -l LokaPack.zip | grep -i "pack.mcmeta"

The zip also uses blank local file headers.

Pack details

Terminal output

[22:22:11] [download-queue/INFO]: Horizon: returning cached file since actual hash matches requested
[22:22:11] [Render thread/WARN]: Horizon: invalid pack metadata in a server pack, ignoring all
[22:22:11] [Render thread/INFO]: Horizon: disconnected: The resource pack reload failed. Please try rejoining.

Environment

  • CachyOS Wayland
Python Script that reads the contents of the pack.mcmeta/ entry
import zipfile, zlib, struct

src = "LokaPack.zip"
with zipfile.ZipFile(src) as zf, open(src, "rb") as f:
    zi = zf.getinfo("pack.mcmeta/")
    f.seek(zi.header_offset)
    n, e = struct.unpack("<HH", f.read(30)[26:30])
    f.seek(zi.header_offset + 30 + n + e)
    raw = f.read(zi.compress_size)
    print((raw if zi.compress_type == 0 else zlib.decompress(raw, -15)).decode())

Possible fix location

The warning is logged here when packs::server_pack returns None for a downloaded pack:
github.com/horizon-rust/horizon@f93c28a230/crates/horizon-client/src/game/server_packs.rs (L414)

I haven't read packs::server_pack, but if it looks up pack.mcmeta by its exact name, it wouldn't find the pack.mcmeta/ entry. Falling back to that name might cover this pack. I've only tested Loka, but other servers shipping similarly built zips may hit the same thing.

Originally created by @Uncompletet on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/3413 Joining Loka (lokamc.com) prompts for a server resource pack. After the download is queued, Horizon disconnects with: `The resource pack reload failed. Please try rejoining.` The same pack loads fine in vanilla Minecraft. **Cause** The pack's `pack.mcmeta` is stored as a zip entry named `pack.mcmeta/`, so it looks like a directory (due to the `/` at the end) . Its contents are valid: ```json {"pack":{"description":"Official Loka Resource Pack","max_format":97,"min_format":75,"pack_format":75}} ``` To see the entry: ``` python3 -m zipfile -l LokaPack.zip | grep -i "pack.mcmeta" ``` The zip also uses blank local file headers. **Pack details** - URL: https://f002.backblazeb2.com/file/ResourcePack/LokaPack.zip - SHA-1: c86c2902a14d24b44eb145157b075658abff086b **Terminal output** ``` [22:22:11] [download-queue/INFO]: Horizon: returning cached file since actual hash matches requested [22:22:11] [Render thread/WARN]: Horizon: invalid pack metadata in a server pack, ignoring all [22:22:11] [Render thread/INFO]: Horizon: disconnected: The resource pack reload failed. Please try rejoining. ``` **Environment** - CachyOS Wayland <details> <summary> Python Script that reads the contents of the pack.mcmeta/ entry</summary> ```python import zipfile, zlib, struct src = "LokaPack.zip" with zipfile.ZipFile(src) as zf, open(src, "rb") as f: zi = zf.getinfo("pack.mcmeta/") f.seek(zi.header_offset) n, e = struct.unpack("<HH", f.read(30)[26:30]) f.seek(zi.header_offset + 30 + n + e) raw = f.read(zi.compress_size) print((raw if zi.compress_type == 0 else zlib.decompress(raw, -15)).decode()) ``` </details> **Possible fix location** The warning is logged here when `packs::server_pack` returns `None` for a downloaded pack: https://github.com/horizon-rust/horizon/blob/f93c28a230379b670afe042737aae3bdbb808296/crates/horizon-client/src/game/server_packs.rs#L414 I haven't read `packs::server_pack`, but if it looks up `pack.mcmeta` by its exact name, it wouldn't find the `pack.mcmeta/` entry. Falling back to that name might cover this pack. I've only tested Loka, but other servers shipping similarly built zips may hit the same thing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#961
No description provided.