siyuan-note/siyuan · warning
bazaar is offline
Error message
bazaar is offline
What it means
getBazaarPackages checks whether the marketplace (stage/bazaar) endpoints are reachable and returned a valid index via getStageAndBazaar. When the result reports Offline (or the stage index is missing and there is no more specific stage error), the package list cannot be built and this error is returned together with an empty package list. It is an availability error for the SiYuan marketplace CDN, not a bug in the caller.
Solutions
- Check network connectivity and retry after the CDN is reachable again
- Configure a working system/proxy setting in SiYuan (Settings - About - Network) or environment HTTP(S)_PROXY variables
- Whitelist the SiYuan marketplace hosts (bazaar, stage CDN, liuyun.io/ld246 endpoints) in your firewall
- Retry later if it is a CDN-side outage; previously installed plugins/themes keep working offline
Example fix
// client-side handling: treat empty packages + offline error as non-fatal
if (msg.includes("bazaar is offline")) {
showOfflineBanner();
return []; // keep cached/installed packages
} Defensive patterns
Strategy: fallback
Validate before calling
// probe connectivity before listing the marketplace
try { await fetch("https://bazaar.si-yuan.com", {method: "HEAD"}) } catch { showOfflineMode(); } Try / catch
try { const pkgs = await fetchPost("/api/bazaar/getBazaarPackage", params) } catch (e) { if (String(e.msg).includes("bazaar is offline")) { useCachedPackages(); } } Prevention
- Check network/proxy settings when the marketplace fails to load
- Whitelist bazaar CDN hosts in corporate firewalls
- Design UI to degrade to already-installed packages on offline errors
- Retry with backoff instead of hammering the endpoint
When it happens
Trigger: Calling GetBazaarPackages / GetBazaarPackagesMap (kernel APIs /api/bazaar/getBazaarPackage, marketplace UI load) when the network is down, a proxy/firewall blocks bazaar endpoints, the CDN is temporarily unavailable, or showError-mode probes failed.
Common situations: Offline or restricted network environments; corporate proxies blocking https://bazaar and stage CDN hosts; users in regions where the CDN is unreachable; transient CDN outage.
Related errors
- bazaar hash not available
- Conf.Language(46)
- Failed to install marketplace package
- get bazaar package failed, please check your network
- get bazaar package failed
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/13e225075ea2c54b.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/bazaar/bazaar.go:44
"github.com/88250/go-humanize"
"github.com/araddon/dateparse"
"github.com/siyuan-note/siyuan/kernel/util"
)
// GetBazaarPackages 返回指定类型的在线集市包列表(plugins 和 themes 类型需要传递 frontend 参数)。
func GetBazaarPackages(pkgType string, frontend string) (packages []*Package) {
packages, _ = getBazaarPackages(pkgType, frontend, true)
return
}
func getBazaarPackages(pkgType, frontend string, showError bool) (packages []*Package, err error) {
result := getStageAndBazaar(pkgType, showError)
if !result.Online || nil != result.StageErr || nil == result.StageIndex {
if nil != result.StageErr {
err = result.StageErr
} else {
err = errors.New("bazaar is offline")
}
return make([]*Package, 0), err
}
packages = buildBazaarPackages(result.StageIndex, result.BazaarStats, result.BazaarRatings,
result.RatingAvailable, pkgType, frontend)
return
}
// buildBazaarPackages 仅以 Stage 索引中的仓库构建在线集市包,统计索引只用于补充元数据。
func buildBazaarPackages(stageIndex *StageIndex, bazaarStats map[string]*bazaarStats,
bazaarRatings map[string]*PackageRating, ratingsAvailable bool, pkgType, frontend string) (packages []*Package) {
packages = make([]*Package, 0, len(stageIndex.Repos))
for _, repo := range stageIndex.Repos {
pkg := buildBazaarPackageWithMetadata(repo, bazaarStats, bazaarRatings,
ratingsAvailable, pkgType, frontend)
if nil == pkg {
continueView on GitHub (pinned to 9f775e8a12)