siyuan-note/siyuan · warning

require upgrade SiYuan to use this plugin [%s]

Error message

require upgrade SiYuan to use this plugin [%s]

What it means

Thrown by SetPetalEnabled() when the user tries to enable a plugin whose manifest declares a minimum SiYuan kernel version that is higher than the running kernel version. bazaar.ParseInstalledPlugin sets disallowInstall=true when the plugin's backend.kernel requirement is not met. The error is logged at Info level (not Error) because it is a version-compatibility notice, not a crash.

Source

Thrown at kernel/model/plugin.go:92

	ret = getPetalByName(name, petals)
	if nil == ret {
		ret = &Petal{
			Name: name,
		}
		petals = append(petals, ret)
	}
	ret.Version = version
	ret.DisplayName = displayName
	ret.Enabled = enabled
	ret.Incompatible = incompatible
	ret.DisabledInPublish = disabledInPublish
	ret.DisallowInstall = disallowInstall
	ret.Kernel = KernelPetal{
		Incompatible: kernelIncompatible,
	}

	if enabled && disallowInstall {
		err = fmt.Errorf("require upgrade SiYuan to use this plugin [%s]", name)
		logging.LogInfof("%s", err)
		return
	}

	savePetals(petals)

	loadCode(ret)

	// Hook kernel plugin lifecycle (callbacks avoid circular import with plugin package)
	if enabled {
		if OnKernelPluginStart != nil {
			OnKernelPluginStart(ret)
		}
	} else {
		if OnKernelPluginStop != nil {
			OnKernelPluginStop(ret)
		}
	}

View on GitHub (pinned to 251596fc0d)

Solutions

  1. Upgrade SiYuan to the kernel version required by the plugin (check the plugin's manifest for the minimum version).
  2. Downgrade/uninstall the plugin and install an older version compatible with the running kernel.
  3. Check the plugin's changelog or Bazaar page for version compatibility information.
  4. In the calling code, check the disallowInstall flag before attempting to enable and surface a user-friendly upgrade prompt.

Example fix

// before
petal, err := model.SetPetalEnabled(pluginName, true)
if err != nil {
    showError(err) // raw error shown to user
}

// after
// Show actionable message to the user
petal, err := model.SetPetalEnabled(pluginName, true)
if err != nil && strings.Contains(err.Error(), "require upgrade SiYuan") {
    showDialog("This plugin requires a newer SiYuan version. Please upgrade SiYuan to use it.")
    return
}
Defensive patterns

Strategy: validation

Validate before calling

found, _, _, _, _, disallowInstall, _ := bazaar.ParseInstalledPlugin(name, "")
if found && disallowInstall && enabled {
    return nil, fmt.Errorf("plugin [%s] requires a newer SiYuan version; please upgrade", name)
}

Type guard

func isPluginCompatible(name string) bool {
    _, _, _, _, _, disallowInstall, _ := bazaar.ParseInstalledPlugin(name, "")
    return !disallowInstall
}

Prevention

When it happens

Trigger: Calling SetPetalEnabled(name, true) where enabled=true and the parsed disallowInstall flag is true. This flag is set when the installed plugin manifest specifies a minimum kernel version (backend.min or similar) greater than the running kernel version.

Common situations: The user installed a plugin built for a newer SiYuan version but is running an older kernel. A plugin was auto-updated by the Bazaar to a version that dropped support for the user's SiYuan version. The user downgraded SiYuan but kept plugins that now require the newer version.

Related errors


AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12). Data as JSON: /api/errors/adb8613651ff58c7. Report an issue: GitHub.