siyuan-note/siyuan · error
marketplace package update is not allowed
Error message
marketplace package update is not allowed
What it means
Thrown by UpdateBazaarPackage when the matched available package has DisallowUpdate == true. The bazaar sets DisallowUpdate when the package's MinAppVersion exceeds the running app version, or when the plugin/theme is flagged backend/frontend-incompatible (bazaar.go:95-108). So this error means the update is blocked because the newer version would be incompatible.
Source
Thrown at kernel/model/bazaar.go:669
finishInstall(pkgType, []batchInstallItem{{name: pkg.Name, meta: installMeta{update: result.Updated}}}, nil, false)
return result, nil
}
// UpdateBazaarPackage 使用在线集市数据更新本地集市包
func UpdateBazaarPackage(pkgType, packageName, frontend string) error {
if _, _, err := getPackageInstallPath(pkgType, packageName); err != nil {
return err
}
updatedPackages, err := getUpdatedPackages(pkgType, frontend)
if err != nil {
return err
}
for _, updated := range updatedPackages {
if updated.Installed == nil || updated.Available == nil || updated.Installed.Name != packageName {
continue
}
if updated.Available.DisallowUpdate {
return errors.New("marketplace package update is not allowed")
}
return InstallBazaarPackage(pkgType, updated.Available.RepoURL, updated.Available.RepoHash, packageName, nil)
}
return errors.New("marketplace package update not found")
}
func getPackageUninstallPath(pkgType, packageName string) (installPath string, err error) {
installedInfos, basePath, _, err := GetInstalledPackageInfos(pkgType)
if err != nil {
return "", err
}
for _, info := range installedInfos {
if info.Pkg.Name == packageName {
return filepath.Join(basePath, info.DirName), nil
}
}
return "", errors.New("installed package not found")
}View on GitHub (pinned to 251596fc0d)
Solutions
- Update SiYuan to a version >= the package's latest MinAppVersion, then retry the update.
- If the incompatibility is frontend-specific, switch to the supported frontend (e.g. desktop vs mobile).
- Stay on the currently installed version until the app is upgraded.
Defensive patterns
Strategy: validation
Validate before calling
// Inspect the update entry's DisallowUpdate flag before calling UpdateBazaarPackage.
updated, err := model.GetUpdatedPackages(pkgType, frontend)
if err != nil {
return err
}
for _, u := range updated {
if u.Installed != nil && u.Installed.Name == packageName && u.Available != nil {
if u.Available.DisallowUpdate {
return fmt.Errorf("update blocked; requires newer SiYuan or different frontend")
}
}
} Try / catch
err := model.UpdateBazaarPackage(pkgType, packageName, frontend)
if err != nil {
if err.Error() == "marketplace package update is not allowed" {
// update disallowed: upgrade SiYuan or switch frontend, then retry
}
} Prevention
- Refresh the available-packages list and check DisallowUpdate before offering an update in the UI.
- Keep SiYuan current so DisallowUpdate (set for below-min-version or frontend incompatibility) does not block updates.
- Hide or disable the update action when DisallowUpdate is true rather than letting the call fail.
When it happens
Trigger: Calling UpdateBazaarPackage for a package whose latest online version requires a newer SiYuan, or whose latest version is incompatible with the current frontend. The package is installed and found in the update list, but updating is disallowed.
Common situations: An update to a plugin/theme was published that drops support for older SiYuan or for the user's frontend; the user clicks update and is blocked. Resolving requires raising the app version or switching frontend.
Related errors
- ErrLocalBazaarPackageIncompatible
- marketplace package update not found
- invalid package name
- invalid package type
- ErrLocalBazaarPackageExists
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/e9784ca2fcfc0b56.
Report an issue: GitHub.