siyuan-note/siyuan · error
Conf.Language(31) (localized cloud auth failure message)
Error message
Conf.Language(31) (localized cloud auth failure message)
What it means
During cloud asset upload (uploadAssets), if the cloud server responds with HTTP 401 Unauthorized, the function sets err to Conf.Language(31), the localized "cloud authentication failed" message, and returns. This means the stored cloud credentials/token are no longer accepted by the SiYuan cloud service.
Source
Thrown at kernel/model/assets.go:1487
util.PushUpdateMsg(msgId, msg, 3000)
}
requestResult := gulu.Ret.NewResult()
request := httpclient.NewCloudFileRequest2m()
resp, reqErr := request.
SetSuccessResult(requestResult).
SetFile("file[]", absAsset).
SetCookies(&http.Cookie{Name: "symphony", Value: uploadToken}).
SetHeader("meta-type", metaType).
SetHeader("biz-type", bizType).
Post(util.GetCloudServer() + "/apis/siyuan/upload?ver=" + util.Ver)
if nil != reqErr {
logging.LogErrorf("upload assets failed: %s", reqErr)
return count, ErrFailedToConnectCloudServer
}
if 401 == resp.StatusCode {
err = errors.New(Conf.Language(31))
return
}
if 0 != requestResult.Code {
logging.LogErrorf("upload assets failed: %s", requestResult.Msg)
err = fmt.Errorf(Conf.Language(94), requestResult.Msg)
return
}
absAsset = filepath.ToSlash(absAsset)
relAsset := absAsset[strings.Index(absAsset, "assets/"):]
completedUploadAssets = append(completedUploadAssets, relAsset)
logging.LogInfof("uploaded asset [%s]", relAsset)
count++
}
if !ignorePushMsg {
util.PushClearMsg(msgId)View on GitHub (pinned to 8641553a1f)
Solutions
- Open Settings - Account and re-login to SiYuan cloud to refresh the authentication token.
- Verify the subscription/account status on the cloud service (check expiry, password changes).
- If a proxy/VPN is intercepting requests, disable it so requests reach the real cloud endpoint.
- Check system clock correctness; a wrong clock can invalidate authentication.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await fetchPost('/api/asset/uploadCloud', {...});
} catch (e) {
if (isCloudAuthError(e)) {
// prompt re-login to SiYuan cloud (Settings - Account) before retrying
await promptRelogin();
}
} Prevention
- Keep your cloud subscription active and re-login after password changes
- Check the account panel's login state before bulk cloud uploads
- Avoid proxies/VPNs that alter cloud requests
- Keep the system clock accurate (NTP)
When it happens
Trigger: Uploading assets to SiYuan cloud (uploadAssets / sync-related asset upload) while the cloud API returns 401 — expired or revoked cloud session, wrong account, or a stale token after password change. The returned error message is then propagated to the client (surfaces as `err` to callers like the electron layer).
Common situations: Subscription expired; user changed cloud password on another device; token invalidated by server; clock skew making tokens appear expired; long-lived session cut off by server-side session cleanup.
Related errors
- Account authentication failed, please login again
- Upload failed: %s
- Conf.Language(94) (localized upload failure message with ser
- localized please-sign-in message (Conf.Language(31))
- Conf.Language(31)
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/561623fb52b0e8e0.
Report an issue: GitHub.