block/buzz · error
invalid --channel UUID: {e}
Error message
invalid --channel UUID: {e} What it means
reconcile_channels() passes the --channel argument to uuid::Uuid::parse_str and it failed. The channel selector must be a canonical UUID (hyphenated 36-char form, e.g. 6f9c0d34-…, or the unhyphenated 32-hex form). Passing a channel name ('general'), a Nostr event id (64-hex), a slug, or a mistyped UUID triggers this; the uuid crate's parse error is appended as {e}.
Source
Thrown at crates/buzz-admin/src/main.rs:514
}
None => {
let k = Keys::generate();
eprintln!(
"Warning: no relay key provided — using ephemeral key {}",
k.public_key().to_hex()
);
eprintln!("Events signed with this key won't be verifiable after this run.");
eprintln!("Pass --relay-key or set BUZZ_RELAY_PRIVATE_KEY for production use.");
k
}
};
let tenant = resolve_admin_tenant(&db).await?;
let target_channel = channel_arg
.as_deref()
.map(uuid::Uuid::parse_str)
.transpose()
.map_err(|e| anyhow::anyhow!("invalid --channel UUID: {e}"))?;
let channels = if let Some(target) = target_channel {
vec![db
.get_channel(tenant.community(), target)
.await
.map_err(|_| {
anyhow::anyhow!("channel {target} not found in community {}", tenant.host())
})?]
} else {
db.list_channels(tenant.community(), None).await?
};
if channels.is_empty() {
println!("No channels in database.");
return Ok(());
}
let mut reconciled = 0u32;
let mut skipped = 0u32;
View on GitHub (pinned to f956e6fe06)
Solutions
- Get the channel's UUID first: `buzz-admin` channel listing / `buzz channels list` output, or `SELECT id, name FROM channels;` in the community's database.
- Pass the hyphenated UUID exactly: `--channel 6f9c0d34-1b2e-4c7a-9d3f-2a1b3c4d5e6f` — verify it is 36 chars with 4 hyphens.
- If your id has no hyphens (32 hex chars), that form is accepted too; anything else (names, event ids) is not.
Example fix
# before buzz-admin reconcile-channels --channel general # error: invalid --channel UUID: ... # after buzz-admin reconcile-channels --channel 6f9c0d34-1b2e-4c7a-9d3f-2a1b3c4d5e6f
Defensive patterns
Strategy: validation
Validate before calling
// JS/TS wrapper before shelling out
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
if (!UUID_RE.test(channelArg)) throw new Error(`--channel must be a UUID, got: ${channelArg}`); Type guard
function isChannelUuid(v: string): boolean {
return /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(v);
} Prevention
- Always resolve channel names to UUIDs via `buzz channels list` instead of trusting user-supplied names.
- Copy UUIDs with hyphens intact; 36 chars / 4 hyphens is the quick eyeball check.
When it happens
Trigger: `buzz-admin reconcile-channels --channel general` (name instead of UUID), `--channel <64-hex nostr event id>`, a UUID with an extra character, or one copied with smart-quotes/whitespace from a chat message.
Common situations: Operators assume the CLI takes channel names because the UI shows names; copying the wrong identifier out of a deep link or event JSON; locale-mangled dashes (en-dash instead of hyphen) from formatted docs.
Related errors
- --channel requires --relay-key or BUZZ_RELAY_PRIVATE_KEY
- invalid relay key: {e}
- --host must not be empty
- missing or invalid h tag
- BUZZ_RELAY_PRIVATE_KEY is required for add-member/remove-mem
AI-assisted analysis of block/buzz@f956e6fe06 (2026-08-16).
Data as JSON: /api/errors/74eda9fff16a163c.
Report an issue: GitHub.