{"record":{"id":"3ded80cd89b93152","repo":"siyuan-note/siyuan","slug":"package-checksum-is-unavailable","errorCode":null,"errorMessage":"package checksum is unavailable","messagePattern":"package checksum is unavailable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kernel/model/updater_release.go","lineNumber":379,"sourceCode":"}\n\nfunc getGitHubManifestChecksum(ctx context.Context, release *githubRelease, pkgName string) (string, error) {\n\tmanifestAsset := findGitHubReleaseAsset(release, \"SHA256SUMS.txt\")\n\tif nil == manifestAsset || \"uploaded\" != manifestAsset.State || \"\" == manifestAsset.BrowserDownloadURL {\n\t\treturn \"\", errors.New(\"checksum manifest is unavailable\")\n\t}\n\tmanifestDigest := normalizeSHA256(manifestAsset.Digest)\n\tmanifestCacheKey := \"\"\n\tif \"\" != manifestDigest {\n\t\tmanifestCacheKey = manifestAsset.BrowserDownloadURL + \"#\" + manifestDigest\n\t}\n\tif \"\" != manifestCacheKey {\n\t\tcached, ok := githubManifestCache.Load(manifestCacheKey)\n\t\tif ok {\n\t\t\tif checksum := parseChecksumManifest(cached.(string), pkgName); \"\" != checksum {\n\t\t\t\treturn checksum, nil\n\t\t\t}\n\t\t\treturn \"\", errors.New(\"package checksum is unavailable\")\n\t\t}\n\t}\n\n\tresponse, err := httpclient.NewCloudRequest30s().SetContext(ctx).Get(manifestAsset.BrowserDownloadURL)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tif nil == response || nil == response.Response {\n\t\treturn \"\", errors.New(\"checksum manifest response is empty\")\n\t}\n\tdefer response.Body.Close()\n\tif 200 != response.StatusCode {\n\t\treturn \"\", fmt.Errorf(\"get checksum manifest failed: %d\", response.StatusCode)\n\t}\n\tdata, err := io.ReadAll(io.LimitReader(response.Body, maxChecksumManifestSize+1))\n\tif err != nil {\n\t\treturn \"\", err\n\t}","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/siyuan-note/siyuan/blob/251596fc0de2f9528c00c224252fd073a99973f4/kernel/model/updater_release.go#L361-L397","documentation":"Returned by getGitHubManifestChecksum from the cache branch (line 379): the SHA256SUMS.txt manifest was previously downloaded and cached in githubManifestCache under manifestCacheKey, but parseChecksumManifest(cached, pkgName) returned an empty string — meaning no line in the cached manifest names the requested package. The cache holds a manifest that doesn't cover this pkgName.","triggerScenarios":"A release ships a SHA256SUMS.txt that lists only some platforms (e.g. omits win-arm64). The cached manifest is for a release where the pkgName was absent. pkgName was computed for a platform/arch the manifest author didn't include.","commonSituations":"Running an arm64 build when the manifest only lists amd64 assets. A release that omitted a particular platform's entry. Manifest generated by a release script with a platform gap.","solutions":["Check the release's SHA256SUMS.txt on GitHub to confirm whether your pkgName is listed.","Switch to the stable channel if your platform is covered by the cloud JSON checksums.","If the omission is a release bug, report it; otherwise update manually from the GitHub release page."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// If the cached manifest doesn't list the package, bypass cache and refetch.\nchecksum, err := getGitHubManifestChecksum(ctx, release, pkgName)\nif err != nil && strings.Contains(err.Error(), \"package checksum is unavailable\") {\n    githubManifestCache.Delete(manifestCacheKey) // invalidate stale cache\n    checksum, err = getGitHubManifestChecksum(ctx, release, pkgName)\n}","preventionTips":["Invalidate the manifest cache entry when it doesn't cover the package, so a corrected manifest can be fetched.","Fall back to the stable channel checksums if the GitHub manifest omits your platform.","Confirm the pkgName matches the manifest's filename convention."],"tags":["update","checksum","manifest","cache","platform"],"backgroundTag":null,"analyzedSha":"251596fc0de2f9528c00c224252fd073a99973f4","analyzedAt":"2026-08-12T21:18:37.123Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}