{"record":{"id":"e9784ca2fcfc0b56","repo":"siyuan-note/siyuan","slug":"marketplace-package-update-is-not-allowed","errorCode":null,"errorMessage":"marketplace package update is not allowed","messagePattern":"marketplace package update is not allowed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/bazaar.go","lineNumber":669,"sourceCode":"\tfinishInstall(pkgType, []batchInstallItem{{name: pkg.Name, meta: installMeta{update: result.Updated}}}, nil, false)\n\treturn result, nil\n}\n\n// UpdateBazaarPackage 使用在线集市数据更新本地集市包\nfunc UpdateBazaarPackage(pkgType, packageName, frontend string) error {\n\tif _, _, err := getPackageInstallPath(pkgType, packageName); err != nil {\n\t\treturn err\n\t}\n\tupdatedPackages, err := getUpdatedPackages(pkgType, frontend)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor _, updated := range updatedPackages {\n\t\tif updated.Installed == nil || updated.Available == nil || updated.Installed.Name != packageName {\n\t\t\tcontinue\n\t\t}\n\t\tif updated.Available.DisallowUpdate {\n\t\t\treturn errors.New(\"marketplace package update is not allowed\")\n\t\t}\n\t\treturn InstallBazaarPackage(pkgType, updated.Available.RepoURL, updated.Available.RepoHash, packageName, nil)\n\t}\n\treturn errors.New(\"marketplace package update not found\")\n}\n\nfunc getPackageUninstallPath(pkgType, packageName string) (installPath string, err error) {\n\tinstalledInfos, basePath, _, err := GetInstalledPackageInfos(pkgType)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tfor _, info := range installedInfos {\n\t\tif info.Pkg.Name == packageName {\n\t\t\treturn filepath.Join(basePath, info.DirName), nil\n\t\t}\n\t}\n\treturn \"\", errors.New(\"installed package not found\")\n}","sourceCodeStart":651,"sourceCodeEnd":687,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/bazaar.go#L651-L687","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Inspect the update entry's DisallowUpdate flag before calling UpdateBazaarPackage.\nupdated, err := model.GetUpdatedPackages(pkgType, frontend)\nif err != nil {\n    return err\n}\nfor _, u := range updated {\n    if u.Installed != nil && u.Installed.Name == packageName && u.Available != nil {\n        if u.Available.DisallowUpdate {\n            return fmt.Errorf(\"update blocked; requires newer SiYuan or different frontend\")\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"err := model.UpdateBazaarPackage(pkgType, packageName, frontend)\nif err != nil {\n    if err.Error() == \"marketplace package update is not allowed\" {\n        // update disallowed: upgrade SiYuan or switch frontend, then retry\n    }\n}","preventionTips":["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."],"tags":["bazaar","package-management","version-compat","update","disallowed"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}