{"record":{"id":"e0db287092d57198","repo":"siyuan-note/siyuan","slug":"errbootappearancenotfound","errorCode":"ErrBootAppearanceNotFound","errorMessage":"boot appearance not found","messagePattern":"boot appearance not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/boot_appearance.go","lineNumber":58,"sourceCode":"const (\n\tbootAppearanceSchemaVersion = 1\n\tbootAppearanceDirName       = \"boot-appearances\"\n\tbootAppearanceConfigName    = \"boot-appearance.json\"\n\tbootAppearanceManifestName  = \"boot.json\"\n\n\tmaxBootAppearanceManifestSize = 200 * 1024\n\tmaxBootAppearanceStyleSize    = 200 * 1024\n\tmaxBootAppearanceImageSize    = 5 * 1024 * 1024\n\tmaxBootAppearanceVideoSize    = 20 * 1024 * 1024\n\tmaxBootAppearanceTotalSize    = 50 * 1024 * 1024\n\tmaxBootAppearanceLayers       = 8\n\tmaxBootAppearanceEntries      = 256\n\tmaxBootAppearancePathDepth    = 16\n\tmaxBootAppearancePathLength   = 512\n)\n\nvar (\n\tErrBootAppearanceNotFound       = errors.New(\"boot appearance not found\")\n\tErrBootAppearanceAssetForbidden = errors.New(\"boot appearance asset forbidden\")\n\n\tbootAppearanceIDPattern    = regexp.MustCompile(`^[a-z0-9]+(?:-[a-z0-9]+)*$`)\n\tbootAppearanceColorPattern = regexp.MustCompile(`^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$`)\n\tbootAppearanceConfLock     sync.RWMutex\n)\n\n// BootAppearanceSelection 表示当前工作空间选择的启动页外观。\ntype BootAppearanceSelection struct {\n\tSchemaVersion int    `json:\"schemaVersion\"`\n\tProvider      string `json:\"provider\"`\n\tAppearance    string `json:\"appearance\"`\n}\n\n// BootAppearance 描述已经校验且可安全交给启动页渲染的外观。\ntype BootAppearance struct {\n\tEnabled         bool                      `json:\"enabled\"`\n\tProvider        string                    `json:\"provider,omitempty\"`","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/8641553a1f07374001902d3ce773285db1292b2d/kernel/model/boot_appearance.go#L40-L76","documentation":"The requested boot appearance (splash-screen appearance from a bazaar provider package) cannot be found or is invalid. SetBootAppearance, ResolveBootAppearanceAsset, getBootAppearanceByID, and validateBootAppearancePackage all funnel to this sentinel. It is returned both when the provider package name or appearance id fails format validation (bazaar.IsValidPackageName / isValidBootAppearanceID) and when the appearance entry cannot actually be resolved on disk.","triggerScenarios":"Calling SetBootAppearance with a provider that is not a valid bazaar package name or an appearanceID not matching ^[a-z0-9]+(-[a-z0-9]+)*$; requesting an appearance id that is not registered in the provider package (getBootAppearanceByID fails, boot_appearance.go:225-229); resolving assets for an appearance whose package has been uninstalled or whose manifest no longer lists it.","commonSituations":"Configuration persisted from a previous install points at a since-uninstalled or renamed appearance package; typo in the package name or appearance id; API scripts passing arbitrary strings for provider/appearanceID.","solutions":["Verify the provider package is installed and the appearance id exists in its manifest (e.g. list available boot appearances before selecting).","Fix format errors: provider must be a valid bazaar package name and appearanceID must match the lowercase kebab-case pattern.","Reset the selection to default by calling SetBootAppearance(\"\", \"\") and choose again.","If stale config persists across upgrades, clear the stored boot appearance selection file so loadBootAppearanceSelection falls back to the default."],"exampleFix":"// before\n_, err := model.SetBootAppearance(\"MyTheme\", \"Dark Splash\")\n// after\n_, err := model.SetBootAppearance(\"my-theme\", \"dark-splash\")","handlingStrategy":"try-catch","validationCode":"const idOk = /^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(appearanceID)\nconst providerOk = provider.length > 0 // plus bazaar package-name rules","typeGuard":null,"tryCatchPattern":"sel, err := model.SetBootAppearance(provider, id)\nif errors.Is(err, model.ErrBootAppearanceNotFound) {\n    sel = model.DefaultBootAppearanceSelection() // fall back\n}","preventionTips":["List installed appearances before selecting; never hardcode ids","Handle uninstall/upgrade flows by resetting the persisted selection","Validate ids against the kebab-case pattern before calling the API"],"tags":["boot-appearance","not-found","bazaar"],"backgroundTag":"resource-not-found","analyzedSha":"8641553a1f07374001902d3ce773285db1292b2d","analyzedAt":"2026-09-11T16:08:28.414Z","contentChangedAt":"2026-09-11T16:08:28.414Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}