siyuan-note/siyuan · warning
: [ ] checksum is unavailable
Error message
%w: [%s] checksum is unavailable
What it means
getUpdatePkg wraps errUpdatePackageUnavailable with '%w: [pkgName] checksum is unavailable' when the release entry for the package exists and has URLs, but its Checksum field is empty. The updater refuses to download without a checksum because it verifies integrity after download.
Solutions
- Wait and retry the update check until the release publisher attaches checksums
- Download the package manually and verify its SHA-256 yourself
- If you operate the release pipeline, ensure every package entry includes its checksum
- Use errors.Is(err, errUpdatePackageUnavailable) to fall back to a manual-update notification
Defensive patterns
Strategy: fallback
Validate before calling
const pkg = release.packages[pkgName]; const hasChecksum = !!pkg && !!pkg.checksum; if (!hasChecksum) requireManualVerification()
Type guard
func isChecksumMissing(err error) bool { return errors.Is(err, errUpdatePackageUnavailable) } Try / catch
if errors.Is(err, errUpdatePackageUnavailable) {
pushManualDownloadNotification(release) // 提示自行校验 SHA-256
return
} Prevention
- Ensure the release pipeline attaches a checksum for every package
- If operating a mirror, preserve checksum metadata
- Fall back to manual download with user-side SHA-256 verification
When it happens
Trigger: An update check reaches the download step while the release metadata's checksum for your platform's package is missing (publish pipeline didn't attach it, or metadata format changed).
Common situations: A newly published release where checksum entries were not uploaded yet; a manually edited/malformed release metadata file; custom update mirrors that strip checksum fields.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- verify checksum failed, download install package
- errUpdatePackageUnavailable
- update package URL or checksum is empty
- version is up to date
- 346
AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19).
Data as JSON: /api/errors/1c5c2c5d6bddad22.
Report an issue: GitHub.
Appendix: source
Thrown at kernel/model/updater.go:128
}
if isVersionUpToDate(release.Version) {
err = fmt.Errorf("version is up to date")
return
}
pkgName := currentInstallPackageName(release.Version)
if "" == pkgName {
err = fmt.Errorf("%w for the current platform", errUpdatePackageUnavailable)
return
}
pkg := release.Packages[pkgName]
if nil == pkg || 0 == len(pkg.URLs) {
err = fmt.Errorf("%w: [%s]", errUpdatePackageUnavailable, pkgName)
return
}
if "" == pkg.Checksum {
err = fmt.Errorf("%w: [%s] checksum is unavailable", errUpdatePackageUnavailable, pkgName)
return
}
downloadPkgURLs = append(downloadPkgURLs, pkg.URLs...)
checksum = pkg.Checksum
return
}
func downloadInstallPkg(pkgURL, checksum string) (err error) {
if "" == pkgURL || "" == checksum {
err = errors.New("update package URL or checksum is empty")
return
}
pkg := path.Base(pkgURL)
savePath := filepath.Join(util.TempDir, "install", pkg)
if gulu.File.IsExist(savePath) {
localChecksum, _ := sha256Hash(savePath)
if localChecksum == checksum {View on GitHub (pinned to 9f775e8a12)