siyuan-note/siyuan · error

unsupported schema version or mismatched appearance ID

Error message

unsupported schema version or mismatched appearance ID

What it means

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.

Solutions

  1. Set the manifest.json "id" field exactly equal to the appearance directory name under plugins/<plugin>/boot-appearance/.
  2. Update the manifest "schemaVersion" to the version expected by the installed SiYuan kernel (see bootAppearanceSchemaVersion in kernel/model/boot_appearance.go).
  3. Re-download or reinstall the boot appearance package from the bazaar so it matches the current kernel schema.
  4. If you are the plugin author, bump and re-release the appearance targeting the new schema version.

Example fix

// before: manifest.json
{ "id": "my-boot-1", "schemaVersion": 1, ... }
// after (directory is my-boot, kernel expects schemaVersion 2)
{ "id": "my-boot", "schemaVersion": 2, ... }
Defensive patterns

Strategy: validation

Validate before calling

const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
if (manifest.id !== appearanceDirName) throw new Error(`manifest id ${manifest.id} != directory ${appearanceDirName}`);
// confirm schemaVersion against the kernel's bootAppearanceSchemaVersion before shipping

Type guard

function isCurrentSchema(m) { return typeof m.schemaVersion === 'number' && m.schemaVersion === EXPECTED_SCHEMA_VERSION && typeof m.id === 'string' && m.id.length > 0; }

Try / catch

try { const app = await getBootAppearanceByID(id); } catch (e) { if (String(e).includes('unsupported schema version')) { /* resync/reinstall the appearance package */ } else throw e; }

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/e54a6f9560eeaf3e. Report an issue: GitHub.

Appendix: source

Thrown at kernel/model/boot_appearance.go:399

	if err = validateBootAppearancePackage(pluginDir, appearanceDir); err != nil {
		return
	}
	manifestPath, _, resolveErr := validateBootAppearanceResource(pluginDir, appearanceDir, bootAppearanceManifestName, "manifest")
	if resolveErr != nil {
		err = resolveErr
		return
	}
	data, readErr := filelock.ReadFile(manifestPath)
	if readErr != nil {
		err = readErr
		return
	}
	manifest := &bootAppearanceManifest{}
	if err = gulu.JSON.UnmarshalJSON(data, manifest); err != nil {
		return
	}
	if manifest.SchemaVersion != bootAppearanceSchemaVersion || manifest.ID != appearanceID {
		err = errors.New("unsupported schema version or mismatched appearance ID")
		return
	}
	if err = validateBootAppearanceDisplayName(manifest.DisplayName); err != nil {
		return
	}
	frontends, frontendErr := normalizeBootAppearanceFrontends(manifest.Frontends, pkg.Frontends)
	if frontendErr != nil {
		err = frontendErr
		return
	}
	if err = validateOptionalBootAppearanceColor(manifest.BackgroundColor); err != nil {
		return
	}
	if len(manifest.Layers) > maxBootAppearanceLayers {
		err = fmt.Errorf("too many layers: %d", len(manifest.Layers))
		return
	}

View on GitHub (pinned to 9f775e8a12)