siyuan-note/siyuan · error

displayName.default is required

Error message

displayName.default is required

What it means

Thrown by validateBootAppearanceDisplayName when the manifest's displayName map has no non-blank "default" entry. The default name is mandatory so the UI can always show something regardless of locale. Loading the package is rejected.

Source

Thrown at kernel/model/boot_appearance.go:679

	for _, part := range strings.Split(relative, string(os.PathSeparator)) {
		if part == "." || part == "" {
			continue
		}
		current = filepath.Join(current, part)
		info, lstatErr := os.Lstat(current)
		if lstatErr != nil {
			return lstatErr
		}
		if info.Mode()&os.ModeSymlink != 0 {
			return ErrBootAppearanceAssetForbidden
		}
	}
	return nil
}

func validateBootAppearanceDisplayName(displayName map[string]string) error {
	if strings.TrimSpace(displayName["default"]) == "" {
		return errors.New("displayName.default is required")
	}
	for lang, value := range displayName {
		if strings.TrimSpace(lang) == "" || strings.TrimSpace(value) == "" || len(lang) > 32 || len(value) > 128 ||
			strings.ContainsAny(value, "\x00\r\n") {
			return errors.New("invalid display name")
		}
	}
	return nil
}

func normalizeBootAppearanceFrontends(manifestFrontends, pluginFrontends []string) ([]string, error) {
	candidates := manifestFrontends
	if len(candidates) == 0 {
		candidates = pluginFrontends
	}
	frontends := []string{}
	seen := map[string]bool{}
	for _, frontend := range candidates {

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Add "default" to displayName with a non-empty name in the manifest.
  2. Trim whitespace: a default of only spaces also fails the check.
  3. Keep localized entries in addition to, not instead of, "default".

Example fix

// before
"displayName": {"zh_CN": "启动画面"}
// after
"displayName": {"default": "Boot Splash", "zh_CN": "启动画面"}
Defensive patterns

Strategy: validation

Validate before calling

function hasDefaultName(m) { return m.displayName && typeof m.displayName.default === "string" && m.displayName.default.trim() !== ""; }

Try / catch

try { await installBootAppearance(pkg); } catch (e) { if (String(e).includes("displayName.default is required")) { /* add default name to manifest */ } else throw e; }

Prevention

When it happens

Trigger: A manifest with displayName containing only language-specific keys (e.g. only "zh_CN") or an empty/whitespace "default" value, read during loadBootAppearance.

Common situations: Authors localizing every string but forgetting the required "default" key, or leaving "default": "" as a placeholder.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11). Data as JSON: /api/errors/68dfc4c633ab8208. Report an issue: GitHub.