zed-industries/zed · error
failed to list theme assets
Error message
failed to list theme assets
What it means
load_bundled_themes panics when the asset registry cannot list the bundled 'themes/' assets. Since themes are embedded in the binary, failure means a corrupted build or asset-store initialization problem, not user configuration.
Source
Thrown at crates/theme_settings/src/theme_settings.rs:222
pub fn reload_theme(cx: &mut App) {
let theme = configured_theme(cx);
GlobalTheme::update_theme(cx, theme);
cx.refresh_windows();
}
/// Reloads the current icon theme from settings.
pub fn reload_icon_theme(cx: &mut App) {
let icon_theme = configured_icon_theme(cx);
GlobalTheme::update_icon_theme(cx, icon_theme);
cx.refresh_windows();
}
/// Loads the themes bundled with the Zed binary into the registry.
pub fn load_bundled_themes(registry: &ThemeRegistry) {
let theme_paths = registry
.assets()
.list("themes/")
.expect("failed to list theme assets")
.into_iter()
.filter(|path| path.ends_with(".json"));
for path in theme_paths {
let Some(theme) = registry.assets().load(&path).log_err().flatten() else {
continue;
};
let Some(theme_family) = serde_json::from_slice(&theme)
.with_context(|| format!("failed to parse theme at path \"{path}\""))
.log_err()
else {
continue;
};
let refined = refine_theme_family(theme_family);
registry.insert_theme_families([refined]);
}View on GitHub (pinned to f4178619ac)
Solutions
- Check the asset embed/build packaging includes themes/
- Log the underlying asset error and continue with an empty theme set
- Verify ThemeRegistry asset store initialization order
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/theme_settings/src/theme_settings.rs:222 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20).
Data as JSON: /api/errors/e2f2a5478a1ccfd4.
Report an issue: GitHub.