siyuan-note/siyuan · error
Failed to install marketplace package [%s]: %s
Error message
Failed to install marketplace package [%s]: %s
What it means
Thrown by installBazaarPackage (the online install path) when bazaar.InstallPackage fails during download/extract/place of a marketplace package. The error is wrapped using the localized template Conf.Language(46) (e.g. 'Failed to install marketplace package [<name>]: <cause>'), so the inner error carries the real reason.
Source
Thrown at kernel/model/bazaar.go:518
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, 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, 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 251596fc0d)
Solutions
- Unwrap the error (or read the log) to get the underlying cause from bazaar.InstallPackage.
- Fix network connectivity / proxy to reach the bazaar OSS server and retry.
- Confirm the data directory is writable and has space; clear any partial install at installPath.
- Verify repoURL/repoHash are valid for the package (re-fetch from the bazaar listing).
Defensive patterns
Strategy: try-catch
Try / catch
err := model.InstallBazaarPackage(pkgType, repoURL, repoHash, packageName, themeOptions)
if err != nil {
// err wraps the localized template; unwrap to inspect the underlying cause
if inner := errors.Unwrap(err); inner != nil {
// log inner for network/IO diagnosis
}
} Prevention
- Ensure network/proxy access to the bazaar OSS server before installing.
- Confirm the data directory is writable and has free space.
- Pass repoURL/repoHash exactly as returned by the bazaar listing; re-fetch if stale.
- Unwrap the error to distinguish network, archive, and IO causes.
When it happens
Trigger: Calling InstallBazaarPackage or UpdateBazaarPackage (which delegates to it) and the underlying download or extraction fails: network error fetching the package from the bazaar OSS, corrupt archive, disk write failure at installPath, or an invalid repoURL/repoHash.
Common situations: No or flaky internet connection to the bazaar CDN, a removed/private upstream repo, a full/permission-denied data directory, or a corrupt downloaded archive. The wrapping hides the cause behind the localized string, so inspect errors.Unwrap.
Related errors
- bazaar is offline
- get bazaar package failed, please check your network
- marketplace package install path already exists
- invalid marketplace package type
- marketplace package manifest not found or invalid
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/7eee18e292d86100.
Report an issue: GitHub.