DioxusLabs/dioxus · error · anyhow::Error

Unsupported architecture for WebView2 offline installer: {ar

Error message

Unsupported architecture for WebView2 offline installer: {arch}

What it means

download_webview2_offline_installer was asked for an architecture with no known WebView2 offline installer URL (only specific arches like x64 are mapped). Any other arch string falls through the URL match to this bail.

Source

Thrown at packages/cli/src/bundler/tools.rs:219

    }
    tracing::info!("Downloading WebView2 bootstrapper...");
    let data = download_bytes(WEBVIEW2_BOOTSTRAPPER_URL).await?;
    std::fs::create_dir_all(tools_dir)?;
    std::fs::write(&path, &data).context("Failed to write WebView2 bootstrapper")?;
    Ok(path)
}

async fn download_webview2_offline_installer(tools_dir: &Path, arch: &str) -> Result<PathBuf> {
    let name = format!("MicrosoftEdgeWebView2RuntimeInstaller_{arch}.exe");
    let path = tools_dir.join(&name);
    if path.exists() {
        return Ok(path);
    }
    let url = match arch {
        "x64" => WEBVIEW2_X64_INSTALLER_URL,
        "x86" => WEBVIEW2_X86_INSTALLER_URL,
        "arm64" => WEBVIEW2_ARM64_INSTALLER_URL,
        _ => bail!("Unsupported architecture for WebView2 offline installer: {arch}"),
    };
    tracing::info!("Downloading WebView2 offline installer for {arch}...");
    let data = download_bytes(url).await?;
    std::fs::create_dir_all(tools_dir)?;
    std::fs::write(&path, &data).context("Failed to write WebView2 offline installer")?;
    Ok(path)
}

enum HashAlgo {
    Sha1,
    Sha256,
}

async fn download_and_verify(url: &str, expected_hash: &str, algo: HashAlgo) -> Result<Vec<u8>> {
    let data = download_bytes(url).await?;

    let computed = match algo {
        HashAlgo::Sha1 => {

View on GitHub (pinned to 24f6a829df)

Solutions

  1. No WebView2 offline installer exists for this architecture. Use an architecture with a published installer (x64 or arm64).
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/cli/src/bundler/tools.rs:219 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/73c1b6120d59cb67. Report an issue: GitHub.