{"record":{"id":"bc19bb3d849fa420","repo":"siyuan-note/siyuan","slug":"update-package-is-unavailable-s","errorCode":null,"errorMessage":"update package is unavailable: [%s]","messagePattern":"update package is unavailable: \\[(.+?)\\]","errorType":"exception","errorClass":"errUpdatePackageUnavailable","httpStatus":null,"severity":"error","filePath":"kernel/model/updater.go","lineNumber":124,"sourceCode":"func 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...)\n\tchecksum = pkg.Checksum\n\treturn\n}\n\nfunc downloadInstallPkg(pkgURL, checksum string) (err error) {\n\tif \"\" == pkgURL || \"\" == checksum {\n\t\terr = errors.New(\"update package URL or checksum is empty\")\n\t\treturn\n\t}\n\n\tpkg := path.Base(pkgURL)","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/updater.go#L106-L142","documentation":"Returned by getUpdatePkg() when release.Packages[pkgName] is nil or has an empty URLs slice. The release was found and the platform's package name resolved, but that package is absent from the release manifest — typically because the release was published moments ago and assets are still uploading, or the asset naming convention changed. Wrapped form of errUpdatePackageUnavailable.","triggerScenarios":"A GitHub release exists and matches the channel, the pkgName (e.g. siyuan-3.x.x-win.exe) is computed correctly, but the release's Packages map has no entry for it. On the stable path this means the cloud 'rhy' JSON omitted the checksum for that pkgName (getStablePackageChecksum returned \"\"), so no package entry was created. On the GitHub path the asset is missing, not yet 'uploaded', or has no download URL.","commonSituations":"Checking for an update within minutes of a release announcement before all upload mirrors finish. A release that intentionally omitted a platform (e.g. arm64 macOS delayed). Transient mirror/CDN propagation lag on b3log/liuyun for the stable channel.","solutions":["Retry after a short delay (minutes); asset uploads and mirror propagation complete shortly after publish.","Switch update channel to GitHub (beta/alpha) which reads assets directly from the GitHub release, bypassing the cloud JSON lag.","If the issue persists across hours, report the missing package name in the release; it may be a publish-pipeline failure."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Retry with backoff for transient asset-propagation gaps.\nvar urls []string\nvar checksum string\nfor attempt := 0; attempt < 3; attempt++ {\n    urls, checksum, err = getUpdatePkg()\n    if err == nil || !errors.Is(err, errUpdatePackageUnavailable) {\n        break\n    }\n    time.Sleep(time.Duration(attempt+1) * time.Minute)\n}","preventionTips":["Retry after a few minutes — asset uploads and mirror propagation lag behind the release announcement.","Offer a channel switch (stable <-> GitHub) so users can pick the source that has the asset.","Surface 'new version available, download not ready yet' rather than a hard error."],"tags":["update","package","release","cdn","timing"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}