jdx/mise · error

No lockfile URL found for

Error message

No lockfile URL found for {} on platform {} (--locked mode requires pre-resolved URLs)

What it means

In --locked mode the aqua backend installs only from URLs pre-resolved in the lockfile and refuses to hit the network/API to resolve fresh ones. If no lockfile entry provides a URL for the requested package version on the target platform, it throws instead of resolving online, keeping locked installs reproducible and offline.

Solutions

  1. Regenerate the lockfile so the URL gets resolved: run `mise install` (or the aqua lock update command) locally without --locked, commit the updated lockfile
  2. Verify the lockfile contains an entry for this package version AND platform (os/arch) you are installing on
  3. If you genuinely need resolution to happen, drop --locked for this step

Example fix

# before (CI, fails)
mise install --locked
# after: refresh lock locally first, then commit it
# $ mise install          # updates mise.lock with resolved URLs
# $ git add mise.lock && git commit -m "chore: update mise.lock"
mise install --locked
Defensive patterns

Strategy: fallback

Validate before calling

let lock_entry = lockfile.get_aqua_url(pkg_id, version, platform_key);
if ctx.locked && lock_entry.is_none() {
    return Err(anyhow!("{pkg_id}@{version} not locked for {platform_key}; run `mise install` to refresh the lockfile"));
}

Try / catch

match install_locked(pkg) {
    Err(e) if e.to_string().contains("No lockfile URL found") => {
        return Err(anyhow!("lockfile out of date; run `mise install` locally and commit mise.lock"));
    }
    r => r,
}

Prevention

When it happens

Trigger: Running install with --locked (or in an environment like CI where locked mode is enforced) for an aqua package version that is absent from aqua.lock / mise.lock, or whose lock entry lacks a URL for the current OS/arch (platform_key).

Common situations: Adding a new tool to mise.toml but not running `mise install` (or the lock-regeneration command) locally before CI; upgrading a package version without refreshing the lockfile; installing on a platform the lockfile entry never resolved for.

Understand the failure class

Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/bd2bbca29eb10c5c. Report an issue: GitHub.

Appendix: source

Thrown at src/backend/aqua.rs:531

                if url.contains(&prefixed_version) || filename.contains(&prefixed_version) {
                    prefixed_version
                } else if url.contains(&format!("v{}", tv.version))
                    || filename.contains(&format!("v{}", tv.version))
                {
                    format!("v{}", tv.version)
                } else {
                    tv.version.clone()
                }
            } else if url.contains(&format!("v{}", tv.version))
                || filename.contains(&format!("v{}", tv.version))
            {
                format!("v{}", tv.version)
            } else {
                tv.version.clone()
            };
            (url, existing_url_api.clone(), v, filename, None)
        } else if ctx.locked {
            bail!(
                "No lockfile URL found for {} on platform {} (--locked mode requires pre-resolved URLs)",
                self.id,
                platform_key
            );
        } else {
            let (url, url_api, v, digest) = if pkg.package_type() == AquaPackageType::Http {
                let (url, resolved_version) =
                    resolve_aqua_http_url(&pkg, &v, v_prefixed.as_deref(), os(), arch()).await?;
                (url, None, resolved_version, None)
            } else if let Some(v_prefixed) = v_prefixed {
                // Try v-prefixed version first because most aqua packages use v-prefixed versions
                match self.get_url(&pkg, v_prefixed.as_ref()).await {
                    // If the url is already checked, use it
                    Ok((url, url_api, true, digest)) => (url, url_api, v_prefixed, digest),
                    Ok((url_prefixed, url_api_prefixed, false, digest_prefixed)) => {
                        let (url, url_api, _, digest) = self.get_url(&pkg, &v).await?;
                        // If the v-prefixed URL is the same as the non-prefixed URL, use it
                        if url == url_prefixed {

View on GitHub (pinned to 533346cc37)