astrid-runtime/astrid · error

no GitHub release found for version {version} in {org}/{repo

Error message

no GitHub release found for version {version} in {org}/{repo}

What it means

When a specific version is requested, resolve_github_ref walks candidate tags; if all candidates return 404 from the GitHub releases API, it concludes no release matches the requested version and bails with this error.

Source

Thrown at crates/astrid-cli/src/commands/capsule/install_github.rs:83

                continue;
            }
            if !response.status().is_success() {
                bail!(
                    "GitHub API error querying release tag {candidate} for {org}/{repo}: HTTP {}",
                    response.status()
                );
            }
            let json = response
                .json::<serde_json::Value>()
                .await
                .with_context(|| format!("invalid GitHub API response for tag {candidate}"))?;
            return Ok(json
                .get("tag_name")
                .and_then(serde_json::Value::as_str)
                .unwrap_or(&candidate)
                .to_string());
        }
        bail!("no GitHub release found for version {version} in {org}/{repo}");
    }

    tracing::debug!(%org, %repo, "no version/tag pin — resolving latest release");
    let api_url = format!("https://api.github.com/repos/{org}/{repo}/releases/latest");
    let response = client
        .get(&api_url)
        .send()
        .await
        .context("failed to reach GitHub API for latest release")?;
    if !response.status().is_success() {
        bail!(
            "GitHub API returned {} for {org}/{repo} latest release",
            response.status()
        );
    }
    let json: serde_json::Value = response
        .json()
        .await

View on GitHub (pinned to affd8760f4)

Solutions

  1. List the repo's releases (`gh release list -R org/repo`) and pin an existing version.
  2. Check whether the repo actually creates GitHub Releases rather than only git tags; if it only tags, use a tag/branch ref instead of a version.
  3. Fix typos in the version string, and check v-prefix conventions (1.2.3 vs v1.2.3).
  4. If the release should exist, verify it is not a draft and that you have access to it.

Example fix

// before
astrid capsule install github:org/repo@0.9.1   # release never published
// after
gh release list -R org/repo   # find real version
astrid capsule install github:org/repo@0.9.0
Defensive patterns

Strategy: validation

Validate before calling

// check the release exists before pinning it
gh release view 1.2.3 -R org/repo >/dev/null 2>&1 || echo "release missing"

Prevention

When it happens

Trigger: install_from_github or resolve_capsule_to_file passes version X to resolve_github_ref, and every candidate tag (e.g. "1.2.3", "v1.2.3") yields HTTP 404 on repos/{org}/{repo}/releases/tags/{candidate}.

Common situations: Requesting a version that was never released; the repo publishes tags but not GitHub releases (tag exists, release does not); typo in the version string; the release was deleted or converted to draft.

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


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/55919400ae21d48e. Report an issue: GitHub.