siyuan-note/siyuan · warning
errUpdatePackageUnavailable
errUpdatePackageUnavailable
Error message
update package is unavailable
What it means
errUpdatePackageUnavailable is the internal sentinel error meaning the update installer package cannot be obtained: either the current platform has no matching install package name, or the download URLs/checksum lookup failed. checkDownloadInstallPkg and getUpdatePkg wrap it, and the auto-update path downgrades to pushing a 'new version available' notification instead of installing.
Source
Thrown at kernel/model/updater.go:59
return ""
}
downloadPkgURLs, checksum, err := getUpdatePkg()
if err != nil {
return ""
}
pkg := path.Base(downloadPkgURLs[0])
pkgPath := filepath.Join(util.TempDir, "install", pkg)
localChecksum, _ := sha256Hash(pkgPath)
if checksum != localChecksum {
return ""
}
return pkgPath
}
var checkDownloadInstallPkgLock = sync.Mutex{}
var errUpdatePackageUnavailable = errors.New("update package is unavailable")
func checkDownloadInstallPkg(notifyPackageUnavailable bool) {
defer logging.Recover()
if skipNewVerInstallPkg() {
return
}
if !checkDownloadInstallPkgLock.TryLock() {
return
}
defer checkDownloadInstallPkgLock.Unlock()
downloadPkgURLs, checksum, err := getUpdatePkg()
if err != nil {
if notifyPackageUnavailable && errors.Is(err, errUpdatePackageUnavailable) {
if release, releaseErr := getUpdateRelease(false); nil == releaseErr && !isVersionUpToDate(release.Version) {
pushNewVersionNotification(release)View on GitHub (pinned to 8641553a1f)
Solutions
- Verify the platform/packaging is one with official installers; update manually from the release page if no auto package exists for your build
- Check network/proxy access to the update CDN and retry; transient failures resolve on the next check
- If a new version just shipped, wait for the package to be published and re-run the update check
- Handle errors.Is(err, errUpdatePackageUnavailable) by falling back to pushNewVersionNotification so users still learn about the new version
Example fix
// before
pkgName := currentInstallPackageName(release.Version)
err = fmt.Errorf("package lookup failed: %v", err)
// after
pkgName := currentInstallPackageName(release.Version)
if "" == pkgName {
err = fmt.Errorf("%w for the current platform", errUpdatePackageUnavailable)
return
} Defensive patterns
Strategy: fallback
Validate before calling
release, err := getUpdateRelease(false)
if err == nil && currentInstallPackageName(release.Version) == "" {
// no package for this platform; skip auto-install
} Try / catch
if _, err := getUpdatePkg(); errors.Is(err, errUpdatePackageUnavailable) {
pushNewVersionNotification(release) // degrade to notification
return
} Prevention
- Check platform/packaging support before enabling auto-update
- Handle transient CDN failures with a retry/backoff
- Fall back to a 'new version available' notification when the package is missing
When it happens
Trigger: checkDownloadInstallPkg running when the release feed has no package matching the current OS/arch (currentInstallPackageName returns ""), or getUpdatePkg failing to resolve/verify download URLs and checksum for the update package.
Common situations: Running on an unsupported platform or packaging (e.g. self-built binary, Linux distro package) where no official installer exists; CDN/network failure making package URLs unreachable; a newly released version whose package metadata is not yet published.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- get bazaar package failed: %s
- marketplace package update not found
- invalid download URL: %s
- download failed (tried main and master): %v
- download failed:
AI-assisted analysis of siyuan-note/siyuan@8641553a1f (2026-09-11).
Data as JSON: /api/errors/f42ab9b61ef9c1b6.
Report an issue: GitHub.