typst/typst · error
failed to download asset ({err})
Error message
failed to download asset ({err}) What it means
From download_binary in the self-updater: the matching release asset was found, but downloading its archive from the browser_download_url failed (network error, interrupted transfer, unavailable CDN). The at-fault input is the asset download URL.
Source
Thrown at crates/typst-cli/src/update.rs:177
/// corresponding asset for this target platform, returning the raw binary
/// data.
pub fn download_binary(
&self,
asset_name: &str,
downloader: &dyn Downloader,
) -> StrResult<Vec<u8>> {
let asset = self.assets.iter().find(|a| a.name.starts_with(asset_name)).ok_or(
eco_format!(
"could not find prebuilt binary `{asset_name}` for your platform"
),
)?;
let data = match downloader.download(&"release", &asset.browser_download_url) {
Ok(data) => data,
Err(err) if err.kind() == io::ErrorKind::NotFound => {
bail!("asset not found (searched for {})", asset.name);
}
Err(err) => bail!("failed to download asset ({err})"),
};
if asset_name.contains("windows") {
extract_binary_from_zip(&data, asset_name)
} else {
extract_binary_from_tar_xz(&data)
}
}
}
/// Extract the Typst binary from a ZIP archive.
fn extract_binary_from_zip(data: &[u8], asset_name: &str) -> StrResult<Vec<u8>> {
let mut archive = ZipArchive::new(Cursor::new(data))
.map_err(|err| eco_format!("failed to extract ZIP archive ({err})"))?;
let mut file =
archive.by_name(&format!("{asset_name}/typst.exe")).map_err(|err| {
eco_format!("failed to extract Typst binary from ZIP archive ({err})")View on GitHub (pinned to 35417aa769)
Solutions
- Retry the update after checking connectivity
- Download the asset manually from the GitHub release page and install it
- Try again later if GitHub's CDN is temporarily unavailable
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/typst-cli/src/update.rs:177 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of typst/typst@35417aa769 (2026-08-17).
Data as JSON: /api/errors/52d76c10804d86d6.
Report an issue: GitHub.