siyuan-note/siyuan · error

official marketplace package not found

Error message

official marketplace package not found

What it means

Even when the package is installed locally, validateBazaarPackageRatingRequest0 confirms it still exists as an official marketplace package via bazaar.HasBazaarPackage (cloud/index lookup). If the lookup succeeds but reports false, this error is returned: the package cannot be rated because it is no longer (or never was) an official marketplace offering.

Source

Thrown at kernel/model/bazaar_rating.go:246

		return "", err
	}
	installed := false
	for _, info := range installedInfos {
		if "" == info.Pkg.InvalidReason && packageName == info.Pkg.Name {
			installed = true
			break
		}
	}
	if !installed {
		return "", errors.New("marketplace package is not installed")
	}

	exists, err := bazaar.HasBazaarPackage(ctx, pkgType, packageName)
	if nil != err {
		return "", err
	}
	if !exists {
		return "", errors.New("official marketplace package not found")
	}
	return token, nil
}

func getBazaarRatingUserToken() (string, error) {
	user := Conf.GetUser()
	if nil == user || "" == user.UserToken {
		return "", errors.New(Conf.Language(31))
	}
	return user.UserToken, nil
}

func getInstalledOfficialBazaarPackageNames(ctx context.Context, pkgType string,
	packageNames []string) ([]string, error) {
	if !isValidBazaarPackageType(pkgType) {
		return nil, errors.New("invalid package type")
	}
	installedInfos, _, _, err := bazaarRatingInstalledPackageInfos(pkgType)

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Confirm the package still exists in the official marketplace (bazaar index) under this name
  2. If removed upstream, stop offering rating actions for it in the UI
  3. Refresh the bazaar index/cache and retry in case of staleness
  4. If the package is sideloaded, it cannot be rated — install the official version instead

Example fix

// before: assuming installed implies rateable
model.SetBazaarPackageRating(ctx, "plugins", pkgName, 5)
// after
exists, err := bazaar.HasBazaarPackage(ctx, "plugins", pkgName)
if err != nil || !exists {
    return errors.New("this package is not an official marketplace package and cannot be rated")
}
model.SetBazaarPackageRating(ctx, "plugins", pkgName, 5)
Defensive patterns

Strategy: fallback

Validate before calling

exists, err := bazaar.HasBazaarPackage(ctx, pkgType, packageName)
if err != nil || !exists { /* hide rating UI or show 'not an official package' */ }

Prevention

When it happens

Trigger: Calling GetBazaarPackageRating or SetBazaarPackageRating for an installed package that has been removed from the official marketplace index, or a locally sideloaded package with a name matching no marketplace entry.

Common situations: A marketplace package was pulled/renamed upstream while still installed locally; the package was installed manually (imported .sy.zip) rather than from the marketplace; marketplace index/cache is stale or the repo data hasn't synced; typo in the package name that coincidentally matches an installed local package.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11). Data as JSON: /api/errors/426a4d92f073caac. Report an issue: GitHub.