BloopAI/vibe-kanban · warning

Invalid spinner template

Error message

Invalid spinner template

What it means

indicatif's ProgressStyle::template parses the template string and returns a Result; it errors on invalid template syntax. Here the template is a hardcoded literal "{spinner:.green} {msg}", so the expect only panics if the template were malformed or an installed indicatif version rejects the keys.

Source

Thrown at crates/review/src/main.rs:94

    }

    let email: String = input.interact_text().expect("Failed to read email");

    // Save email for next time
    config.email = Some(email.clone());
    if let Err(e) = config.save() {
        debug!("Failed to save config: {}", e);
    }

    email
}

fn create_spinner(message: &str) -> ProgressBar {
    let spinner = ProgressBar::new_spinner();
    spinner.set_style(
        ProgressStyle::default_spinner()
            .template("{spinner:.green} {msg}")
            .expect("Invalid spinner template"),
    );
    spinner.set_message(message.to_string());
    spinner.enable_steady_tick(Duration::from_millis(100));
    spinner
}

#[tokio::main]
async fn main() -> Result<()> {
    // Install rustls crypto provider before any TLS operations
    rustls::crypto::aws_lc_rs::default_provider()
        .install_default()
        .expect("Failed to install rustls crypto provider");

    let args = Args::parse();

    // Initialize tracing
    let filter = if args.verbose {
        EnvFilter::new("debug")

View on GitHub (pinned to 4deb7eca8f)

Solutions

  1. Pin/upgrade indicatif to a version where the template syntax is supported and verify with a test
  2. Replace expect with a fallback: use the error to log a warning and set an empty/default style
  3. Prefer the compile-time-checked template! macro from indicatif so malformed templates fail at build time

Example fix

// before
ProgressStyle::default_spinner().template("{spinner:.green} {msg}").expect("Invalid spinner template")
// after
ProgressStyle::with_template("{spinner:.green} {msg}")
    .unwrap_or_else(|_| ProgressStyle::default_spinner())
Defensive patterns

Strategy: fallback

Validate before calling

fn template_ok(t: &str) -> bool { indicatif::ProgressStyle::with_template(t).is_ok() }

Try / catch

let style = ProgressStyle::with_template("{spinner:.green} {msg}")
    .unwrap_or_else(|_| ProgressStyle::default_spinner());

Prevention

When it happens

Trigger: `create_spinner` is called during `run` and ProgressStyle::default_spinner().template(...) returns Err because the template string is invalid for the current indicatif version (e.g. after an upgrade renamed/removed the {spinner} or {msg} key or changed escape syntax).

Common situations: Upgrading indicatif to a version with breaking template syntax changes; someone editing the hardcoded template and introducing a typo like an unclosed brace or bad style spec.

Related errors


AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29). Data as JSON: /api/errors/da902fafc3b482d4. Report an issue: GitHub.