siyuan-note/siyuan · error

Conf.Language(46)

Error message

Conf.Language(46)

What it means

installBazaarPackage downloads and installs a marketplace package from its repo URL via bazaar.InstallPackage. On failure the raw error is wrapped with Conf.Language(46) — a localized template (roughly 'failed to install package [%s]: %s') — using fmt.Errorf, so the user-visible message embeds the package name and underlying cause. This error is a wrapper; inspect the embedded cause for the real failure (network, git clone, extraction, or checksum).

Source

Thrown at kernel/model/bazaar.go:527

func GetBazaarPackageREADME(ctx context.Context, repoURL, repoHash, pkgType string) (ret string) {
	ret = bazaar.GetBazaarPackageREADME(ctx, repoURL, repoHash, pkgType)
	return
}

// installBazaarPackage 下载并安装集市包
func installBazaarPackage(pkgType, repoURL, repoHash, repoRef, packageName string) (meta installMeta, err error) {
	installPath, jsonFileName, err := getPackageInstallPath(pkgType, packageName)
	if err != nil {
		return
	}

	installedPkg, parseErr := bazaar.ParsePackageJSON(filepath.Join(installPath, jsonFileName))
	meta.update = parseErr == nil && installedPkg != nil && installedPkg.Name == packageName

	err = bazaar.InstallPackage(repoURL, repoHash, repoRef, installPath, Conf.System.ID, pkgType, packageName, meta.update)
	if err != nil {
		err = fmt.Errorf(Conf.Language(46), packageName, err)
	}
	return
}

// finishInstall 集市包安装后的处理(刷新外观、推送插件重载等);批量更新时同类型只执行一次
//
//   - themeOptions:仅在新安装主题(meta.update 为 false)时写入外观;批量覆盖更新不会用到
//   - applyNewAppearance:控制新安装图标是否自动应用;本地安装不自动应用
func finishInstall(pkgType string, items []batchInstallItem, themeOptions *ThemeInstallOptions, applyNewAppearance bool) {
	if 1 > len(items) {
		return
	}

	switch pkgType {
	case "plugins":
		reloadPluginSet := hashset.New()
		for _, item := range items {
			if !item.meta.update {

View on GitHub (pinned to 8641553a1f)

Solutions

  1. Read the wrapped inner error to identify the root cause (network vs repo vs disk)
  2. Check network/proxy connectivity to the marketplace repo host and retry
  3. Verify the package still exists upstream and that the pinned hash/ref is valid
  4. Check disk space and write permissions in the SiYuan workspace data directory
  5. Retry the update/install; transient network failures during batch updates are common

Example fix

// caller: unwrap to log the real cause
if err := model.InstallBazaarPackage(repoURL, repoHash, "plugins", name); err != nil {
	log.Printf("install %s failed: %v", name, err) // err contains localized msg + inner cause
}
Defensive patterns

Strategy: retry

Validate before calling

// probe connectivity before batch install
const online = await fetch("https://github.com", {method: "HEAD"}).then(r => r.ok).catch(() => false);
if (!online) alert("marketplace unreachable: check network/proxy before installing");

Try / catch

try {
  await model.InstallBazaarPackage(repoURL, repoHash, pkgType, name);
} catch (err) {
  // err is the localized Conf.Language(46) wrapper; log it fully, then inspect the inner cause
  console.error(err);
  if (isNetworkError(err)) await retryWithBackoff(() => install(name));
}

Prevention

When it happens

Trigger: installBazaarPackage/InstallBazaarPackage/updatePackages flow where bazaar.InstallPackage returns any error: network failure reaching the marketplace/GitHub, repo or hash not found, download/extraction failure, or disk write failure in data/<pkgType>/<name>.

Common situations: Corporate proxy or firewall blocking GitHub; marketplace repo renamed or deleted upstream; offline mode; pinned repo hash no longer exists after upstream force-push; full disk or permission issues under the workspace data directory.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


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