{"record":{"id":"75cb6d2fc90c5c94","repo":"siyuan-note/siyuan","slug":"version-is-up-to-date","errorCode":null,"errorMessage":"version is up to date","messagePattern":"version is up to date","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"kernel/model/updater.go","lineNumber":113,"sourceCode":"\t\t\tsuccess = true\n\t\t\tbreak\n\t\t}\n\t}\n\tif success {\n\t\tutil.PushUpdateMsg(\"update-pkg-ready\", Conf.Language(62), 15*1000)\n\t} else {\n\t\tutil.PushUpdateMsg(\"update-pkg-downloading\", Conf.Language(104), 7000)\n\t}\n}\n\nfunc getUpdatePkg() (downloadPkgURLs []string, checksum string, err error) {\n\trelease, err := getUpdateRelease(false)\n\tif err != nil {\n\t\treturn\n\t}\n\n\tif isVersionUpToDate(release.Version) {\n\t\terr = fmt.Errorf(\"version is up to date\")\n\t\treturn\n\t}\n\n\tpkgName := currentInstallPackageName(release.Version)\n\tif \"\" == pkgName {\n\t\terr = fmt.Errorf(\"%w for the current platform\", errUpdatePackageUnavailable)\n\t\treturn\n\t}\n\tpkg := release.Packages[pkgName]\n\tif nil == pkg || 0 == len(pkg.URLs) {\n\t\terr = fmt.Errorf(\"%w: [%s]\", errUpdatePackageUnavailable, pkgName)\n\t\treturn\n\t}\n\tif \"\" == pkg.Checksum {\n\t\terr = fmt.Errorf(\"%w: [%s] checksum is unavailable\", errUpdatePackageUnavailable, pkgName)\n\t\treturn\n\t}\n\tdownloadPkgURLs = append(downloadPkgURLs, pkg.URLs...)","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/updater.go#L95-L131","documentation":"Returned by getUpdatePkg() when isVersionUpToDate(release.Version) is true, meaning semver.Compare(\"v\"+releaseVersion, \"v\"+currentVersion) <= 0. Despite being returned as an error, this is not a failure: it signals that the newest available release is not newer than the running build, so there is no package to download. Callers (getNewVerInstallPkgPath, checkDownloadInstallPkg) treat any error as 'nothing to do' and return early.","triggerScenarios":"CheckUpdate or the background checkDownloadInstallPkg runs after the user already upgraded manually. A cached release list still points at the current version. The user is on a beta/alpha build newer than the latest stable release.","commonSituations":"Running a pre-release build while on the stable channel (the stable release is older). Just-installed version where the next background check finds nothing newer. Fork/custom builds where util.Ver is set ahead of upstream releases.","solutions":["Treat this as an informational 'no update' result, not an error — log at debug/info level, do not alert.","If surfacing to UI, show 'you are on the latest version' rather than an error toast.","If you are on a beta/alpha build, switch the channel to match (Settings - About - Update channel) so the comparator sees the right release stream."],"exampleFix":"// before\n_, _, err := getUpdatePkg()\nif err != nil {\n    log.Error(err) // noisy: logs 'version is up to date' as an error\n}\n\n// after\n_, _, err := getUpdatePkg()\nif err != nil && !errors.Is(err, errVersionUpToDate) {\n    log.Error(err)\n}","handlingStrategy":"try-catch","validationCode":"// Pre-check before calling getUpdatePkg to avoid the 'up to date' error path.\nrelease, err := getUpdateRelease(false)\nif err == nil && isVersionUpToDate(release.Version) {\n    util.PushUpdateMsg(\"update-notify\", Conf.Language(10), 3000) // already latest\n    return\n}","typeGuard":null,"tryCatchPattern":"// Distinguish 'up to date' from real errors when you must call getUpdatePkg.\n_, _, err := getUpdatePkg()\nif err != nil {\n    if strings.Contains(err.Error(), \"version is up to date\") {\n        // informational; not a failure\n        return nil\n    }\n    return err\n}","preventionTips":["Do not surface this as an error in UI — it means the user is current.","Use isVersionUpToDate directly when you only need the comparison.","Log at info/debug, never at error level."],"tags":["update","version","semver","informational"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}