{"record":{"id":"e54a6f9560eeaf3e","repo":"siyuan-note/siyuan","slug":"unsupported-schema-version-or-mismatched-appearanc","errorCode":null,"errorMessage":"unsupported schema version or mismatched appearance ID","messagePattern":"unsupported schema version or mismatched appearance ID","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/boot_appearance.go","lineNumber":399,"sourceCode":"\tif err = validateBootAppearancePackage(pluginDir, appearanceDir); err != nil {\n\t\treturn\n\t}\n\tmanifestPath, _, resolveErr := validateBootAppearanceResource(pluginDir, appearanceDir, bootAppearanceManifestName, \"manifest\")\n\tif resolveErr != nil {\n\t\terr = resolveErr\n\t\treturn\n\t}\n\tdata, readErr := filelock.ReadFile(manifestPath)\n\tif readErr != nil {\n\t\terr = readErr\n\t\treturn\n\t}\n\tmanifest := &bootAppearanceManifest{}\n\tif err = gulu.JSON.UnmarshalJSON(data, manifest); err != nil {\n\t\treturn\n\t}\n\tif manifest.SchemaVersion != bootAppearanceSchemaVersion || manifest.ID != appearanceID {\n\t\terr = errors.New(\"unsupported schema version or mismatched appearance ID\")\n\t\treturn\n\t}\n\tif err = validateBootAppearanceDisplayName(manifest.DisplayName); err != nil {\n\t\treturn\n\t}\n\tfrontends, frontendErr := normalizeBootAppearanceFrontends(manifest.Frontends, pkg.Frontends)\n\tif frontendErr != nil {\n\t\terr = frontendErr\n\t\treturn\n\t}\n\tif err = validateOptionalBootAppearanceColor(manifest.BackgroundColor); err != nil {\n\t\treturn\n\t}\n\tif len(manifest.Layers) > maxBootAppearanceLayers {\n\t\terr = fmt.Errorf(\"too many layers: %d\", len(manifest.Layers))\n\t\treturn\n\t}\n","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/9f775e8a12daef8255556097396f9b2739078892/kernel/model/boot_appearance.go#L381-L417","documentation":"loadBootAppearance validates a boot appearance manifest after parsing it from manifest.json. This error is thrown when the manifest's SchemaVersion does not equal the kernel's expected bootAppearanceSchemaVersion, or when the manifest's ID field does not match the appearance directory/ID being loaded. It guards against loading appearances authored for an older or newer manifest format or misplaced under the wrong ID directory.","triggerScenarios":"GetBootAppearances or getBootAppearanceByID loading an appearance whose manifest.json contains a schemaVersion different from the current kernel constant, or whose manifest id field differs from the directory name passed as appearanceID.","commonSituations":"A plugin ships a manifest written for a previous SiYuan version after the schema changed; the manifest id was edited or the appearance folder was renamed without updating manifest.json; a hand-copied appearance directory reuses another ID; a partially updated plugin has stale manifests.","solutions":["Set the manifest.json \"id\" field exactly equal to the appearance directory name under plugins/<plugin>/boot-appearance/.","Update the manifest \"schemaVersion\" to the version expected by the installed SiYuan kernel (see bootAppearanceSchemaVersion in kernel/model/boot_appearance.go).","Re-download or reinstall the boot appearance package from the bazaar so it matches the current kernel schema.","If you are the plugin author, bump and re-release the appearance targeting the new schema version."],"exampleFix":"// before: manifest.json\n{ \"id\": \"my-boot-1\", \"schemaVersion\": 1, ... }\n// after (directory is my-boot, kernel expects schemaVersion 2)\n{ \"id\": \"my-boot\", \"schemaVersion\": 2, ... }","handlingStrategy":"validation","validationCode":"const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));\nif (manifest.id !== appearanceDirName) throw new Error(`manifest id ${manifest.id} != directory ${appearanceDirName}`);\n// confirm schemaVersion against the kernel's bootAppearanceSchemaVersion before shipping","typeGuard":"function isCurrentSchema(m) { return typeof m.schemaVersion === 'number' && m.schemaVersion === EXPECTED_SCHEMA_VERSION && typeof m.id === 'string' && m.id.length > 0; }","tryCatchPattern":"try { const app = await getBootAppearanceByID(id); } catch (e) { if (String(e).includes('unsupported schema version')) { /* resync/reinstall the appearance package */ } else throw e; }","preventionTips":["Keep manifest id identical to the appearance directory name","Track the kernel's bootAppearanceSchemaVersion and bump your manifest when the kernel updates","Test appearances against the SiYuan version you ship for"],"tags":["boot-appearance","manifest","schema-version","validation"],"backgroundTag":"schema-validation-failed","analyzedSha":"9f775e8a12daef8255556097396f9b2739078892","analyzedAt":"2026-09-19T03:17:15.984Z","contentChangedAt":"2026-09-19T03:17:15.984Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}