jdx/mise · error
URL must use s3:// scheme, got
Error message
URL must use s3:// scheme, got: {} What it means
S3Url::parse validates that a supplied artifact URL uses the s3:// scheme before extracting bucket and key. Any other scheme (https://, file://, a typo like s4://) is rejected with this error so the S3 backend never receives a URL it cannot address.
Solutions
- Rewrite the URL to use the s3:// scheme: s3://bucket/path/to/object (region can be a query param)
- Use the correct backend/config field for https-based endpoints if that is what you have
- Check for typos in the scheme (s3://, not s4:// or 3s://)
Example fix
// before MISE_S3_URL=https://my-bucket.s3.us-west-2.amazonaws.com/tool.tar.gz // after MISE_S3_URL=s3://my-bucket/tool.tar.gz?region=us-west-2
Defensive patterns
Strategy: validation
Validate before calling
// validate S3 backend URL before configuring
function isS3Url(s) { return /^s3:\/\/[^/]+\/.+/.test(s); } Prevention
- Always write S3 backend locations as s3://bucket/key
- Keep https endpoints in the endpoint/region config, not the s3:// URL field
- Double-check scheme spelling when copying URLs
When it happens
Trigger: Configuring an S3 backend URL in mise settings/mirror config with a non-s3 scheme, e.g. an https endpoint URL pasted where s3://bucket/key is expected.
Common situations: Copying an https S3 console or presigned URL into S3 backend config; omitting the scheme entirely so the parser infers the wrong scheme; mixing up HTTP-endpoint config with s3:// URL config.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- S3 URL must include bucket name
- remote cache URL must use HTTPS
- a provided source resolves to a path
- additional asset ' ' is not an archive
- agent ' ' `start_calendar_interval. ` must be between and
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/3d97609ad659d2c4.
Report an issue: GitHub.
Appendix: source
Thrown at src/backend/s3.rs:77
use std::path::{Path, PathBuf};
use std::sync::Arc;
use tokio::sync::OnceCell;
use url::Url;
/// Parsed S3 URL components
#[derive(Debug, Clone)]
struct S3Url {
bucket: String,
key: String,
}
impl S3Url {
/// Parse an S3 URL like "s3://bucket/path/to/object?region=us-west-2"
fn parse(url_str: &str) -> Result<Self> {
let url = Url::parse(url_str).map_err(|e| eyre!("Invalid S3 URL: {e}"))?;
if url.scheme() != "s3" {
bail!("URL must use s3:// scheme, got: {}", url.scheme());
}
let bucket = url
.host_str()
.ok_or_else(|| eyre!("S3 URL must include bucket name"))?
.to_string();
if bucket.is_empty() {
bail!("S3 URL must include bucket name");
}
let key = url.path().trim_start_matches('/').to_string();
Ok(Self { bucket, key })
}
}
/// S3 backend for downloading tools from Amazon S3 or S3-compatible storageView on GitHub (pinned to 533346cc37)