siyuan-note/siyuan · error
GitHub releases are empty
Error message
GitHub releases are empty
What it means
Returned by fetchGitHubReleases(ctx) when the GitHub API responds 200 but the decoded releases slice is empty. The endpoint (api.github.com/repos/siyuan-note/siyuan/releases?per_page=100) returned zero releases. For an actively maintained repo this is anomalous and usually indicates a transient API anomaly or an unexpected response shape.
Source
Thrown at kernel/model/updater_release.go:252
func fetchGitHubReleases(ctx context.Context) ([]*githubRelease, error) {
releases := []*githubRelease{}
request := httpclient.NewCloudRequest30s().
SetContext(ctx).
SetHeader("Accept", "application/vnd.github+json").
SetHeader("X-GitHub-Api-Version", "2022-11-28").
SetSuccessResult(&releases)
response, err := request.Get(githubReleasesURL)
if err != nil {
logging.LogErrorf("get GitHub releases failed: %s", err)
return nil, err
}
if 200 != response.StatusCode {
err = fmt.Errorf("get GitHub releases failed: %d", response.StatusCode)
logging.LogError(err.Error())
return nil, err
}
if 0 == len(releases) {
return nil, errors.New("GitHub releases are empty")
}
githubReleasesLock.Lock()
cachedGitHubReleases = releases
githubReleasesCacheTime = time.Now().Unix()
githubReleasesLock.Unlock()
return releases, nil
}
func selectGitHubRelease(releases []*githubRelease, channel string) *githubRelease {
var selected *githubRelease
for _, release := range releases {
if nil == release || release.Draft || !isReleaseAllowed(channel, release.TagName) {
continue
}
if nil == selected || 0 < semver.Compare(normalizeReleaseVersion(release.TagName), normalizeReleaseVersion(selected.TagName)) {
selected = release
}View on GitHub (pinned to 251596fc0d)
Solutions
- Retry with force=true after a short wait to bypass cache and refetch.
- Switch to the stable channel which uses the independent rhy cloud endpoint.
- If persistent, manually verify the GitHub releases page is populated and check for proxy interception.
Defensive patterns
Strategy: retry
Try / catch
// Retry once with a force refresh; fall back to stable channel.
releases, err := getGitHubReleases(ctx, true)
if err != nil {
logging.LogWarnf("github releases unavailable (%s); using stable channel", err)
return getStableUpdateRelease(true)
} Prevention
- Fall back to the stable rhy endpoint when the GitHub API misbehaves.
- Don't treat an empty list as 'no updates' — it's an anomaly worth retrying.
- Log the raw response for diagnosis when this recurs.
When it happens
Trigger: GitHub API returned a 200 with an empty array (rare). The response was 200 but the JSON shape changed, so the SetSuccessResult(&releases) decode populated nothing without error. A proxy or interceptor returned an empty 200 body.
Common situations: Transient GitHub API glitch. A corporate proxy returning an empty 200 for the API call. A future deprecation of the v3 releases shape without a matching schema in githubRelease structs.
Related errors
- get GitHub releases failed: %d
- stable release version is invalid
- checksum manifest response is empty
- get checksum manifest failed: %d
- checksum manifest is too large
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/18ad91023a6547ab.
Report an issue: GitHub.