{"record":{"id":"489fe9593f5e3211","repo":"siyuan-note/siyuan","slug":"account-authentication-failed-please-login-again","errorCode":null,"errorMessage":"Account authentication failed, please login again","messagePattern":"Account authentication failed, please login again","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kernel/model/assets.go","lineNumber":1378,"sourceCode":"\t\t\tutil.PushUpdateMsg(msgId, msg, 3000)\n\t\t}\n\n\t\trequestResult := gulu.Ret.NewResult()\n\t\trequest := httpclient.NewCloudFileRequest2m()\n\t\tresp, reqErr := request.\n\t\t\tSetSuccessResult(requestResult).\n\t\t\tSetFile(\"file[]\", absAsset).\n\t\t\tSetCookies(&http.Cookie{Name: \"symphony\", Value: uploadToken}).\n\t\t\tSetHeader(\"meta-type\", metaType).\n\t\t\tSetHeader(\"biz-type\", bizType).\n\t\t\tPost(util.GetCloudServer() + \"/apis/siyuan/upload?ver=\" + util.Ver)\n\t\tif nil != reqErr {\n\t\t\tlogging.LogErrorf(\"upload assets failed: %s\", reqErr)\n\t\t\treturn count, ErrFailedToConnectCloudServer\n\t\t}\n\n\t\tif 401 == resp.StatusCode {\n\t\t\terr = errors.New(Conf.Language(31))\n\t\t\treturn\n\t\t}\n\n\t\tif 0 != requestResult.Code {\n\t\t\tlogging.LogErrorf(\"upload assets failed: %s\", requestResult.Msg)\n\t\t\terr = fmt.Errorf(Conf.Language(94), requestResult.Msg)\n\t\t\treturn\n\t\t}\n\n\t\tabsAsset = filepath.ToSlash(absAsset)\n\t\trelAsset := absAsset[strings.Index(absAsset, \"assets/\"):]\n\t\tcompletedUploadAssets = append(completedUploadAssets, relAsset)\n\t\tlogging.LogInfof(\"uploaded asset [%s]\", relAsset)\n\t\tcount++\n\t}\n\n\tif !ignorePushMsg {\n\t\tutil.PushClearMsg(msgId)","sourceCodeStart":1360,"sourceCodeEnd":1396,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/afa823b6b4e4f183511e0bc0a3be93caa94c7c97/kernel/model/assets.go#L1360-L1396","documentation":"UploadAssets2Cloud received HTTP 401 from the cloud server: the symphony session cookie (the upload token) is no longer accepted. The localized message (Conf.Language(31)) asks the user to log in again, and the upload batch aborts immediately.","triggerScenarios":"Uploading assets to cloud storage while the account token expired or was revoked - password changed, logged in on another device, subscription lapsed, or the token was invalidated server-side.","commonSituations":"Long-running sessions that outlive the token; account or subscription changes made after login; system clock far off; proxies stripping cookies.","solutions":["Open Settings - Account, log out and back in, then retry the upload","Verify the account and subscription status are active","Check that the system clock is correct","Disable proxies that strip or rewrite cookies for the cloud domain"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"On an error equal to the re-login message, stop the batch, prompt re-login, refresh the token, and retry once from the first un-uploaded asset - never loop on 401 with the same token.","preventionTips":["Check account login state before starting bulk uploads","Re-login after changing account password or subscription","Keep system time synchronized"],"tags":["cloud","auth","upload","token","i18n"],"backgroundTag":"cloud-session-expired","analyzedSha":"afa823b6b4e4f183511e0bc0a3be93caa94c7c97","analyzedAt":"2026-08-18T17:04:10.865Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}