siyuan-note/siyuan · error
require upgrade SiYuan to use this plugin
Error message
require upgrade SiYuan to use this plugin [%s]
What it means
Inside SetPetalEnabled's updatePetal callback, if the caller asks to enable a plugin (enabled == true) whose metadata marks it as disallowInstall (the plugin requires a newer SiYuan kernel/frontend than the running version), the enable is rejected with this error. It prevents activating plugins whose declared minimum SiYuan version exceeds the running version.
Solutions
- Upgrade SiYuan to the version required by the plugin, then enable it.
- Keep the plugin disabled until the app is updated.
- Downgrade the plugin to a version compatible with the running SiYuan release.
- If the version requirement is wrong, fix the plugin's minimum-version metadata in its repository.
Example fix
// before
_, err := model.SetPetalEnabled("new-plugin", true) // fails: requires newer kernel
// after
if !util.Ver2Enough(currentVer, pluginMinVer) {
return fmt.Errorf("upgrade SiYuan to %s to enable this plugin", pluginMinVer)
}
_, err := model.SetPetalEnabled("new-plugin", true) Defensive patterns
Strategy: validation
Validate before calling
_, _, _, _, _, disallowInstall, _ := bazaar.ParseInstalledPlugin(name, "")
if enabled && disallowInstall {
return fmt.Errorf("upgrade SiYuan before enabling plugin %s", name)
} Try / catch
if _, err := model.SetPetalEnabled(name, true); err != nil {
if strings.HasPrefix(err.Error(), "require upgrade SiYuan") {
// show 'update required' dialog with download link
}
} Prevention
- Check the plugin's minimum-version metadata before enabling
- Keep SiYuan updated alongside marketplace plugins
- Downgrade plugins whose minimum version exceeds the running kernel
- Surface the version requirement in the plugin UI instead of failing silently
When it happens
Trigger: SetPetalEnabled(name, true) on a plugin whose plugin.json / marketplace metadata sets a minimum SiYuan version (front-end or back-end) higher than the running kernel version, so bazaar.ParseInstalledPlugin reports disallowInstall=true. Disabling still works; only enabling is blocked.
Common situations: SiYuan not yet upgraded after a plugin update raised its minimum version; plugin installed from a marketplace listing targeting a newer release channel; running an older kernel build against a newer plugin.
Related errors
- plugin [ ] not found
- cannot remove storage root
- config.actionEffects contains an empty action
- failed to export headers
- failed to read directory
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/adb8613651ff58c7.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/model/plugin.go:85
if !found {
err = fmt.Errorf("plugin [%s] not found", name)
logging.LogErrorf("%s", err)
return
}
ret, err = updatePetal(name, func(petal *Petal) error {
petal.Version = version
petal.DisplayName = displayName
petal.Enabled = enabled
petal.Incompatible = incompatible
petal.DisabledInPublish = disabledInPublish
petal.DisallowInstall = disallowInstall
petal.Kernel = KernelPetal{
Incompatible: kernelIncompatible,
}
if enabled && disallowInstall {
return fmt.Errorf("require upgrade SiYuan to use this plugin [%s]", name)
}
return nil
})
if err != nil {
logging.LogInfof("%s", err)
return
}
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 9f775e8a12)