epi052/feroxbuster · error

Failed while scanning

Error message

Failed while scanning: {e}

What it means

wrapped_main kicks off the actual directory scan via scan(live_targets, handles). If the scan task returns an Err at any point (scanner task panicked-and-propagated, channel closed, fatal I/O error), the error is wrapped in this message after cleaning up all handler tasks.

Solutions

  1. Read the full log output (increase verbosity with -v/-vv) to find the inner error
  2. Re-run the scan to rule out a transient failure
  3. Reduce concurrency (--threads/-t) if the failure correlates with resource exhaustion
  4. If reproducible, capture with RUST_BACKTRACE=1 and report upstream

Example fix

// before
feroxbuster -u https://target -t 200
// after
RUST_BACKTRACE=1 feroxbuster -u https://target -t 50 -vv
Defensive patterns

Strategy: retry

Try / catch

// shell
for i in 1 2 3; do feroxbuster -u https://target -vv && break; sleep 5; done

Prevention

When it happens

Trigger: Any fatal error escaping the scan() future - e.g. failure coordinating scan/term/file handler channels, or an unrecoverable error during ordered scanning of the live targets.

Common situations: Output file handler dying mid-scan, terminal handler channel failures, or unexpected internal errors during long-running scans against flaky targets.

Understand the failure class

Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.

Related errors


AI-assisted analysis of epi052/feroxbuster@1f595dab5c (2026-09-13). Data as JSON: /api/errors/83a6ab7375270aea. Report an issue: GitHub.

Appendix: source

Thrown at src/main.rs:587

        let result = test.connectivity(&targets).await;
        if let Err(err) = result {
            clean_up(handles, tasks).await?;
            bail!(fmt_err(&err.to_string()));
        }
        result?
    };

    if live_targets.is_empty() {
        clean_up(handles, tasks).await?;
        bail!(fmt_err("Could not find any live targets to scan"));
    }

    // kick off a scan against any targets determined to be responsive
    match scan(live_targets, handles.clone()).await {
        Ok(_) => {}
        Err(e) => {
            clean_up(handles, tasks).await?;
            bail!(fmt_err(&format!("Failed while scanning: {e}")));
        }
    }

    clean_up(handles, tasks).await?;

    log::trace!("exit: wrapped_main");
    Ok(())
}

/// Single cleanup function that handles all the necessary drops/finishes etc required to gracefully
/// shutdown the program
async fn clean_up(handles: Arc<Handles>, tasks: Tasks) -> Result<()> {
    log::trace!("enter: clean_up({handles:?}, {tasks:?})");

    let (tx, rx) = oneshot::channel::<bool>();
    handles.send_scan_command(JoinTasks(tx))?;
    rx.await?;

View on GitHub (pinned to 1f595dab5c)