siyuan-note/siyuan · error
marketplace package update not found
Error message
marketplace package update not found
What it means
Thrown by UpdateBazaarPackage when no entry in the fetched updatedPackages list matches the requested packageName (where updated.Installed != nil && updated.Available != nil && updated.Installed.Name == packageName). The package is either not installed or has no available update entry, so there is nothing to update.
Source
Thrown at kernel/model/bazaar.go:673
// 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")
}
func UninstallPackage(pkgType, packageName string) error {
installPath, err := getPackageUninstallPath(pkgType, packageName)
if err != nil {View on GitHub (pinned to 251596fc0d)
Solutions
- Confirm the package is currently installed (list installed packages) and that its name matches the online listing.
- Refresh the bazaar update list (re-fetch available packages) before retrying.
- If the package is local-only (not in the online bazaar), update it via local install instead of UpdateBazaarPackage.
Example fix
// before
err := model.UpdateBazaarPackage(pkgType, name, frontend) // name not in updates
// after
updated, _ := model.GetUpdatedPackages(pkgType, frontend)
found := false
for _, u := range updated { if u.Installed != nil && u.Installed.Name == name { found = true; break } }
if !found { /* nothing to update; handle gracefully */ } Defensive patterns
Strategy: validation
Validate before calling
// Ensure an update actually exists for this package before calling UpdateBazaarPackage.
updated, err := model.GetUpdatedPackages(pkgType, frontend)
if err != nil {
return err
}
found := false
for _, u := range updated {
if u.Installed != nil && u.Available != nil && u.Installed.Name == packageName {
found = true
break
}
}
if !found {
return // no update available; do not call UpdateBazaarPackage
} Try / catch
err := model.UpdateBazaarPackage(pkgType, packageName, frontend)
if err != nil {
if err.Error() == "marketplace package update not found" {
// package not installed or not in available list; refresh and re-check
}
} Prevention
- Refresh the installed and available/update lists before offering an update action.
- Use local install for packages not present in the online bazaar.
- Ensure the package name matches between installed and available entries (directory vs manifest name).
When it happens
Trigger: Calling UpdateBazaarPackage for a package name that is not installed, or whose installed entry lacks a matching available update (e.g. the bazaar listing did not return it, or the installed name differs from the available name). Reached after getPackageInstallPath and getUpdatedPackages succeed but the loop finds no match.
Common situations: Update requested for a package that was already uninstalled, for a name with a directory/manifest mismatch, or while offline such that the available list is empty/stale. Also if the package was installed locally and never published to the online bazaar.
Related errors
- installed package not found
- marketplace package update is not allowed
- invalid package name
- invalid package type
- ErrLocalBazaarPackageExists
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/f6b4bf00a738da1b.
Report an issue: GitHub.