AprilNEA/OpenLogi · error
--name must be a nonempty synthetic device name
Error message
--name must be a nonempty synthetic device name
What it means
The synthetic device name given via `--name` must be nonempty after trimming whitespace. The name is stored in the fixture profile metadata, so an empty or whitespace-only name is rejected in `validate_args`.
Solutions
- Pass a real device name, e.g. `--name "MX Master 3S"`.
- Guard in shell: `NAME="${NAME:?--name is required}"` before invoking.
- If names come from a data file, validate the name column is non-blank before looping over contribute calls.
Example fix
// before
openlogi fixture contribute --id mx-master --name "$NAME" --output out/mx-master
// after
NAME="${NAME:?device name required}"
openlogi fixture contribute --id mx-master --name "$NAME" --output out/mx-master Defensive patterns
Strategy: validation
Validate before calling
[ -n "${NAME//[[:space:]]/}" ] || { echo "--name required" >&2; exit 1; } Prevention
- Quote and default-check name variables (${NAME:?msg}).
- Validate name columns before batch fixture generation.
- Trim user-supplied names and re-check emptiness after trimming.
When it happens
Trigger: Run contribute with `--name ""` or `--name " "`, typically from an unset or whitespace shell variable or a template left unfilled.
Common situations: Scripted fixture generation where the display-name variable was never set; batch renaming where some entries lost their name field.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- saved contribution profile does not match its resumable…
- --id must be a nonempty synthetic path component
- --id must be one synthetic path component without separators
- --output directory name must exactly equal --id
- --id and --name must match the in-progress contribution
AI-assisted analysis of AprilNEA/OpenLogi@e846e6f4b4 (2026-09-13).
Data as JSON: /api/errors/f105e40bf68b6f23.
Report an issue: GitHub.
Appendix: source
Thrown at crates/openlogi-cli/src/cmd/fixture/contribute.rs:456
bail!(
"the selected direct-capture target does not match the profile transport and slot; \
reconnect the same device and use the same --device selector"
)
}
}
fn validate_args(args: &ContributeArgs) -> Result<()> {
if args.id.trim().is_empty() || matches!(args.id.as_str(), "." | "..") {
bail!("--id must be a nonempty synthetic path component");
}
if Path::new(&args.id).file_name() != Some(OsStr::new(&args.id))
|| args.id.contains('/')
|| args.id.contains('\\')
{
bail!("--id must be one synthetic path component without separators");
}
if args.name.trim().is_empty() {
bail!("--name must be a nonempty synthetic device name");
}
if args.output.file_name() != Some(OsStr::new(&args.id)) {
bail!("--output directory name must exactly equal --id");
}
Ok(())
}
fn validate_state(args: &ContributeArgs, state: &ContributionState) -> Result<()> {
if state.version != STATE_VERSION {
bail!("unsupported contribution state version {}", state.version);
}
if state.fixture_id != args.id
|| state.profile_id != format!("{}-profile", args.id)
|| state.profile_name != args.name
{
bail!("--id and --name must match the in-progress contribution");
}
Ok(())View on GitHub (pinned to e846e6f4b4)