DioxusLabs/dioxus · error · anyhow::Error
Error connecting to template repository. Try cloning the tem
Error message
Error connecting to template repository. Try cloning the template manually or add `dioxus` to a `cargo new` project.
What it means
Connectivity guard in check_connectivity (called from create): after retrying a GitHub probe with sleeps (and printing waiting warnings across up to 5 attempts), the connection to the template repository still could not be established, so fetching templates cannot continue. This fires when network access to github.com/dioxuslabs is unavailable, and the message offers manual cloning as the workaround.
Source
Thrown at packages/cli/src/cli/create.rs:280
if res.is_ok() {
return Ok(());
}
tokio::time::sleep(std::time::Duration::from_millis(2000)).await;
},
_ = tokio::time::sleep(std::time::Duration::from_millis(if x == 1 { 500 } else { 2000 })) => {}
}
if x == 0 {
eprintln!(
"{GLOW_STYLE}warning{GLOW_STYLE:#}: Waiting for {LINK_STYLE}https://github.com/dioxuslabs{LINK_STYLE:#}..."
)
} else {
eprintln!(
"{GLOW_STYLE}warning{GLOW_STYLE:#}: ({x}/5) Taking a while, maybe your internet is down?"
);
}
}
bail!(
"Error connecting to template repository. Try cloning the template manually or add `dioxus` to a `cargo new` project."
)
}
// todo: re-enable these tests with better parallelization
//
// #[cfg(test)]
// pub(crate) mod tests {
// use escargot::{CargoBuild, CargoRun};
// use std::sync::LazyLock;
// use std::fs::{create_dir_all, read_to_string};
// use std::path::{Path, PathBuf};
// use std::process::Command;
// use tempfile::tempdir;
// use toml::Value;
// static BINARY: LazyLock<CargoRun> = LazyLock::new(|| {
// CargoBuild::new()View on GitHub (pinned to 24f6a829df)
Solutions
- The template repository is unreachable. Check the network, clone the template manually, or add dioxus to a cargo new project.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at packages/cli/src/cli/create.rs:280 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/d3a747a6af7d38d8.
Report an issue: GitHub.