siyuan-note/siyuan · error
marketplace package update not found
Error message
marketplace package update not found
What it means
UpdateBazaarPackage computes the list of outdated packages and searches it for one whose installed name matches packageName; if none matches, it returns this error. The package is either up to date, not installed, or the marketplace data lists no newer version for it.
Solutions
- Confirm the package name and that it is installed (GetInstalledPackages)
- Refresh the marketplace index (bazaars URL/cache) and retry
- Check GetUpdatedPackages output first; if empty, the package is current — skip the update
Example fix
// before
if err := model.UpdateBazaarPackage("plugins", name, frontend); err != nil { return err }
// after: treat not-found as already up to date
if err := model.UpdateBazaarPackage("plugins", name, frontend); err != nil {
if strings.Contains(err.Error(), "not found") { return nil // already latest }
return err
} Defensive patterns
Strategy: validation
Validate before calling
updates := model.GetUpdatedPackages(pkgType, frontend)
found := false
for _, u := range updates {
if u.Installed != nil && u.Installed.Name == name { found = true }
}
if !found { return nil } // nothing to update; skip Prevention
- Only call update for packages listed as outdated
- Refresh the marketplace index before batch updates
- Compare names case-exactly as returned by the index
When it happens
Trigger: Calling the update API for a package that is already at the latest marketplace version; updating a package that is not installed at all; getUpdatedPackages returned an empty set because the marketplace index is stale or unreachable and fell back to cached data.
Common situations: Frontend shows an 'outdated' badge from stale cache while the index already has the new version (or vice versa); typo in package name; concurrent update already applied the new version.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
- installed package not found
- marketplace package update is not allowed
- 0
- AI editor action not found
- attribute view group
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/f6b4bf00a738da1b.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/model/bazaar.go:683
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,
updated.Available.RepoRef, 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")
}
func UninstallPackage(pkgType, packageName string) error {
installPath, err := getPackageUninstallPath(pkgType, packageName)
if err != nil {View on GitHub (pinned to 9f775e8a12)