siyuan-note/siyuan · error

displayName.default is required

Error message

displayName.default is required

What it means

validateBootAppearanceDisplayName checks the manifest's localized display-name map. The map MUST contain a non-blank "default" entry, since it is the fallback shown for any language without an explicit translation. A missing or whitespace-only "default" key aborts loading with this error.

Solutions

  1. Add a `"default"` key to the manifest's displayName object with a non-empty human-readable name
  2. Ensure the default value is not just whitespace — trim before saving
  3. Repackage the appearance and reinstall

Example fix

// manifest.json before
"displayName": {"zh_CN": "我的启动画面"}
// after
"displayName": {"default": "My Boot Splash", "zh_CN": "我的启动画面"}
Defensive patterns

Strategy: validation

Validate before calling

function hasDefaultDisplayName(manifest) {
  return typeof manifest.displayName === "object" && manifest.displayName !== null &&
    String(manifest.displayName.default ?? "").trim() !== "";
}

Type guard

function isValidDisplayName(m) {
  return typeof m?.displayName?.default === "string" && m.displayName.default.trim().length > 0;
}

Try / catch

try {
  await loadManifest(pkgPath);
} catch (e) {
  if (String(e).includes("displayName.default is required")) {
    // prompt author to add displayName.default
  }
}

Prevention

When it happens

Trigger: Loading a boot appearance package whose manifest.json `displayName` object lacks a `default` key, or whose `displayName.default` is empty, whitespace-only, or absent entirely.

Common situations: Authors writing only language-specific names (e.g. only zh_CN) and forgetting the fallback; hand-writing a manifest from scratch; a generator emitting an empty displayName object.

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@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/68dfc4c633ab8208. Report an issue: GitHub.

Appendix: 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 9f775e8a12)