[GH-ISSUE #573] [multiplayer] crash joining a server: registries.json not found next to the resources #176

Closed
opened 2026-11-02 15:37:01 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Oct 16, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/573

Joining a server crashes the game right after the world starts loading (macOS, Apple M4 Max, latest release). Log:

[17:12:16] Horizon: resources loaded in 1.3s; 35723 block states, 1658 items, 67 biomes; 15 worker threads
[17:12:18] Horizon renderer: Apple M4 Max (Metal, IntegratedGpu)
[17:12:22] Horizon: registries.json not found next to the resources; run the data generator reports (horizon-prepare)
[17:12:22] Horizon crashed: registries.json not found next to the resources; run the data generator reports (horizon-prepare)

Cause: game/remote.rs join_server needs the data generator's registries.json (Builtin::find in horizon-protocol/src/registry.rs), which prepare never puts next to the resources. It only finds it through the dev fallback <resources>/../../datagen/out/reports/registries.json, i.e. the prepare scratch dir run.local/datagen. That file is missing when the datagen step didn't run in this install (it is skipped when items.json already exists) or the scratch dir was removed/elsewhere.

Fix:

  1. prepare copies reports/registries.json (and commands.json, used by lan/commands.rs) into the resources dir, and reruns the data generator when it's missing;
  2. the client shows an error screen ("Resources are incomplete, repair them in the launcher") instead of crashing.

Reported by reillygod on Discord (#horizon-chat, 2026-10-16), joining satelitesatelitesatelite's server.

🤖 Generated with Claude Code

Originally created by @ludovic111 on GitHub (Oct 16, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/573 Joining a server crashes the game right after the world starts loading (macOS, Apple M4 Max, latest release). Log: ``` [17:12:16] Horizon: resources loaded in 1.3s; 35723 block states, 1658 items, 67 biomes; 15 worker threads [17:12:18] Horizon renderer: Apple M4 Max (Metal, IntegratedGpu) [17:12:22] Horizon: registries.json not found next to the resources; run the data generator reports (horizon-prepare) [17:12:22] Horizon crashed: registries.json not found next to the resources; run the data generator reports (horizon-prepare) ``` Cause: `game/remote.rs` `join_server` needs the data generator's `registries.json` (`Builtin::find` in horizon-protocol/src/registry.rs), which prepare never puts next to the resources. It only finds it through the dev fallback `<resources>/../../datagen/out/reports/registries.json`, i.e. the prepare scratch dir `run.local/datagen`. That file is missing when the datagen step didn't run in this install (it is skipped when items.json already exists) or the scratch dir was removed/elsewhere. Fix: 1. prepare copies `reports/registries.json` (and `commands.json`, used by lan/commands.rs) into the resources dir, and reruns the data generator when it's missing; 2. the client shows an error screen ("Resources are incomplete, repair them in the launcher") instead of crashing. Reported by **reillygod** on Discord (#horizon-chat, 2026-10-16), joining satelitesatelitesatelite's server. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bsakaguchi 2026-11-02 15:37:01 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Online5277 commented on GitHub (Oct 16, 2026):

just wanna say that the crash happened when he was joining my custom server which I am hosting through exe.dev and using playit.gg as a tunnel. since the server architecture is not complete yet I had to provide the server resources and my registries.json

<!-- gh-comment-id:6226394142 --> @Online5277 commented on GitHub (Oct 16, 2026): just wanna say that the crash happened when he was joining my custom server which I am hosting through exe.dev and using playit.gg as a tunnel. since the server architecture is not complete yet I had to provide the server resources and my registries.json
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#176
No description provided.