siyuan-note/siyuan · error
Conf.Language(376)
Error message
Conf.Language(376)
What it means
checkAssetDownloadAccess enforces that on-demand asset downloading is only available to a signed-in user with sync enabled and an active subscription. When sync is off, no user is logged in, or the provider is SiYuan without a subscription, it returns localized message 376: "The asset has not been downloaded and cannot be retrieved right now".
Source
Thrown at kernel/model/asset_download.go:100
// validateAssetDownloadSourceScope 在公布新的账号身份前保留未完成的资源与历史恢复来源。
func validateAssetDownloadSourceScope(scope string) error {
exists, err := assetDownloadStateExists()
if err != nil || !exists {
return err
}
if Conf.Repo == nil || len(Conf.Repo.Key) == 0 {
return errors.New(Conf.Language(377))
}
stored, err := dejavu.ReadAssetDownloadScope(assetDownloadStatePath(), Conf.Repo.Key)
if err != nil || stored == scope {
return err
}
return requireCompleteAssetDownloads()
}
func checkAssetDownloadAccess() error {
if Conf.Sync == nil || !Conf.Sync.Enabled || Conf.GetUser() == nil {
return errors.New(Conf.Language(376))
}
switch Conf.Sync.Provider {
case conf.ProviderSiYuan:
if !IsSubscriber() {
return errors.New(Conf.Language(376))
}
case conf.ProviderS3, conf.ProviderWebDAV, conf.ProviderLocal:
if !IsPaidUser() {
return errors.New(Conf.Language(376))
}
}
return nil
}
func dataRelativeAssetPath(absPath string) (string, error) {
if !filepath.IsAbs(absPath) {
return "", fmt.Errorf("asset path must be absolute")
}View on GitHub (pinned to 8641553a1f)
Solutions
- Enable sync in Settings - About/Cloud and log into the cloud account
- Renew the SiYuan subscription (or switch the sync provider to S3/WebDAV/local, which only require a paid one-time unlock)
- Download the missing asset via full sync ("Download all" asset download mode) instead of on-demand fetch
- Retry the operation once the account/subscription is active
Example fix
// before: sync disabled, on-demand asset fetch fails with 376
curl -X POST http://127.0.0.1:6806/api/asset/ensureAssetLocal -d '{...}'
// after: enable sync and login first
curl -X POST http://127.0.0.1:6806/api/sync/setSyncEnable -d '{"enabled":true}'
curl -X POST http://127.0.0.1:6806/api/asset/ensureAssetLocal -d '{...}' Defensive patterns
Strategy: try-catch
Validate before calling
const user = await fetchPost('/api/setting/getCloudUser');
const canFetch = user.data && user.data.user && user.data.user.isSubscribe; Try / catch
try { await ensureAssetLocal(asset); } catch (e) { if (isLang376(e)) { await performSync(); /* or prompt subscription renewal */ } else throw e; } Prevention
- Keep sync enabled and stay logged in before fetching cloud-only assets
- Maintain an active SiYuan subscription when using the SiYuan cloud provider
- Prefer full sync over on-demand asset fetch when account state is uncertain
- Check subscription status in the UI before bulk asset operations
When it happens
Trigger: EnsureAssetLocal/EnsureAssetPrefixLocal fetching a not-yet-downloaded asset, ensureAllSyncAssets, SetSyncAssetDownloadMode, or openRepoFileWithAssets, while Conf.Sync is disabled/nil, Conf.GetUser() is nil, or Provider is SiYuan and IsSubscriber() is false.
Common situations: Clicking a link to a cloud-only asset after logging out or after the subscription expired; sync disabled in settings while opening documents referencing un-synced assets; free account using the SiYuan cloud provider.
Related errors
- Conf.Language(377)
- load tree failed: %s
- attribute view not found
- Query asset failed [%s]
- Account authentication failed, please login again
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/cc29431096adcfb3.
Report an issue: GitHub.