siyuan-note/siyuan · error

checksum manifest response is empty

Error message

checksum manifest response is empty

What it means

When downloading SHA256SUMS.txt via httpclient.NewCloudRequest30s(), the code validates that both the response wrapper and the underlying http.Response are non-nil before reading the body. If either is nil — the client returned no usable HTTP response despite no transport error — this error is thrown rather than panicking on a nil pointer later.

Solutions

  1. Retry the update check — this is usually transient; the result is cached on success
  2. Upgrade SiYuan / the siyuan-note/httpclient dependency if it reproduces, since a nil response with nil error indicates a client-layer bug
  3. Bypass suspicious proxies/VPN that may abort responses mid-handshake
  4. Manually download the installer and verify SHA-256 against SHA256SUMS.txt as a workaround
Defensive patterns

Strategy: retry

Validate before calling

resp, err := client.Get(url)
if err == nil && (resp == nil || resp.Response == nil) {
    // client-layer anomaly: treat as transport failure and retry
}

Try / catch

checksum, err := getGitHubManifestChecksum(ctx, release, pkg)
if err != nil {
    logging.LogWarnf("manifest fetch failed: %s", err)
    // retry once, then continue without checksum
}

Prevention

When it happens

Trigger: GET of manifestAsset.BrowserDownloadURL returning err==nil but a nil response or nil response.Response — an edge case of the HTTP client layer (aborted/already-consumed response, misconfigured transport).

Common situations: HTTP client internal failures that neither set an error nor a response; bugs or version quirks in the httpclient library; extremely unusual proxy behavior terminating the exchange without a status line.

Related errors


AI-assisted analysis of siyuan-note/siyuan@9f775e8a12 (2026-09-19). Data as JSON: /api/errors/0d3486ab49a54ab3. Report an issue: GitHub.

Appendix: source

Thrown at kernel/model/updater_release.go:388

	if "" != manifestDigest {
		manifestCacheKey = manifestAsset.BrowserDownloadURL + "#" + manifestDigest
	}
	if "" != manifestCacheKey {
		cached, ok := githubManifestCache.Load(manifestCacheKey)
		if ok {
			if checksum := parseChecksumManifest(cached.(string), pkgName); "" != checksum {
				return checksum, nil
			}
			return "", errors.New("package checksum is unavailable")
		}
	}

	response, err := httpclient.NewCloudRequest30s().SetContext(ctx).Get(manifestAsset.BrowserDownloadURL)
	if err != nil {
		return "", err
	}
	if nil == response || nil == response.Response {
		return "", errors.New("checksum manifest response is empty")
	}
	defer response.Body.Close()
	if 200 != response.StatusCode {
		return "", fmt.Errorf("get checksum manifest failed: %d", response.StatusCode)
	}
	data, err := io.ReadAll(io.LimitReader(response.Body, maxChecksumManifestSize+1))
	if err != nil {
		return "", err
	}
	if maxChecksumManifestSize < int64(len(data)) {
		return "", errors.New("checksum manifest is too large")
	}
	if "" != manifestDigest {
		actualDigest := fmt.Sprintf("%x", sha256.Sum256(data))
		if manifestDigest != actualDigest {
			return "", errors.New("checksum manifest digest mismatch")
		}
	}

View on GitHub (pinned to 9f775e8a12)