siyuan-note/siyuan · error

too many boot appearance entries

Error message

too many boot appearance entries

What it means

Thrown by validateBootAppearancePackage while walking a boot appearance package directory: the number of non-"." entries exceeds maxBootAppearanceEntries (256). It is a hard resource limit to keep packages bounded.

Source

Thrown at kernel/model/boot_appearance.go:531

	}
	info, err := os.Stat(appearanceDir)
	if err != nil || !info.IsDir() {
		return ErrBootAppearanceNotFound
	}
	var totalSize int64
	entryCount := 0
	err = filepath.WalkDir(appearanceDir, func(filePath string, entry os.DirEntry, walkErr error) error {
		if walkErr != nil {
			return walkErr
		}
		relativePath, relativeErr := filepath.Rel(appearanceDir, filePath)
		if relativeErr != nil {
			return ErrBootAppearanceAssetForbidden
		}
		if relativePath != "." {
			entryCount++
			if entryCount > maxBootAppearanceEntries {
				return errors.New("too many boot appearance entries")
			}
			if len(relativePath) > maxBootAppearancePathLength ||
				len(strings.Split(filepath.ToSlash(relativePath), "/")) > maxBootAppearancePathDepth {
				return errors.New("boot appearance path is too deep or long")
			}
		}
		if entry.Type()&os.ModeSymlink != 0 {
			return ErrBootAppearanceAssetForbidden
		}
		if entry.IsDir() {
			return nil
		}
		info, infoErr := entry.Info()
		if infoErr != nil || !info.Mode().IsRegular() {
			return ErrBootAppearanceAssetForbidden
		}
		totalSize += info.Size()
		if totalSize > maxBootAppearanceTotalSize {

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Reduce the package to 256 or fewer entries: delete unused layers, frames, or helper files.
  2. Consolidate image frames into fewer assets (sprite sheets, video) to cut the file count.
  3. Split into multiple smaller boot appearance packages if genuinely needed.
Defensive patterns

Strategy: validation

Validate before calling

const {execSync} = require("child_process");
const n = execSync(`find ${pkgDir} -type f | wc -l`).toString().trim();
if (parseInt(n, 10) > 256) throw new Error(`package has ${n} entries; max 256`);

Try / catch

try { await installBootAppearance(zipPath); } catch (e) { if (String(e).includes("too many boot appearance entries")) { /* repackage with fewer files */ } else throw e; }

Prevention

When it happens

Trigger: Installing or validating a boot appearance package whose extracted tree contains more than 256 files/directories; the check runs during package walk (called by package load/install paths).

Common situations: Packages bundling per-frame animation image sequences, unpacked icon sets, or tooling that emits one file per layer/frame.

Understand the failure class

Background: "File too large" / "file size exceeds limit" errors: why libraries cap file sizes and how to fix them — this error's family across 46 libraries.

Related errors


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