siyuan-note/siyuan · error

checksum manifest is too large

Error message

checksum manifest is too large

What it means

Returned by getGitHubManifestChecksum when the downloaded manifest body exceeds maxChecksumManifestSize (1 MiB = 1024*1024 bytes). The read uses io.LimitReader(body, max+1) and rejects if len(data) > max. A legitimate SHA256SUMS.txt is a few kilobytes, so this trips only on a malformed, hijacked, or wrong-content response.

Source

Thrown at kernel/model/updater_release.go:399

	}

	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")
		}
	}
	manifest := string(data)
	if "" != manifestCacheKey {
		githubManifestCache.Store(manifestCacheKey, manifest)
	}
	checksum := parseChecksumManifest(manifest, pkgName)
	if "" == checksum {
		return "", errors.New("package checksum is unavailable")
	}
	return checksum, nil
}

View on GitHub (pinned to 251596fc0d)

Solutions

  1. Retry from a different network to rule out a captive portal/proxy.
  2. Switch to the stable channel to use cloud JSON checksums instead.
  3. Manually download the manifest URL in a browser to inspect what is actually being served.
Defensive patterns

Strategy: validation

Try / catch

// Treat oversized manifest as a hard integrity stop; do not parse it.
_, err := getGitHubManifestChecksum(ctx, release, pkgName)
if err != nil && strings.Contains(err.Error(), "too large") {
    logging.LogErrorf("manifest suspiciously large; possible MITM/proxy: %s", err)
    // do NOT retry from same network; switch source
    return getStablePackageChecksum(rhyResult, pkgName)
}

Prevention

When it happens

Trigger: The download URL served an HTML error page (large) instead of the text manifest. A proxy returned a large interstitial/captive-portal page. The asset was mis-uploaded as a large binary. MITM serving an oversized payload.

Common situations: Captive portal or proxy auth page intercepted the download. GitHub returned an HTML error page with a 200 (rare misconfiguration). Asset misnamed so a different large file was served.

Related errors


AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12). Data as JSON: /api/errors/7886aa605fe6544b. Report an issue: GitHub.