sxyazi/yazi · error
Unknown error
Error message
Unknown error
What it means
The fallback branch of `Dds::exec`: when the response reports `ok == false` but carries an empty `error` string, the client cannot surface a remote message and bails with the generic `Unknown error`. It indicates a malformed or opaque failure response from the Yazi DDS endpoint.
Source
Thrown at yazi-cli/src/dds/exec.rs:34
let req = cmd.body(*yazi_boot::ID)?;
let resp = Self::ask("dds-exec", receiver, &req, "dds-exec-result").await?;
#[derive(Deserialize)]
struct Body {
ok: bool,
#[serde(default)]
value: Data,
#[serde(default)]
error: String,
}
let body = Body::deserialize(&resp)?;
if body.ok {
Ok(body.value)
} else if !body.error.is_empty() {
bail!("{}", body.error)
} else {
bail!("Unknown error")
}
}
/// Send one custom message and wait for a matching custom reply.
async fn ask(kind: &str, receiver: Id, body: &str, reply_kind: &str) -> Result<Data> {
Ember::validate(kind)?;
Ember::validate(reply_kind)?;
let payload = try_format!(
"{}\n{kind},{receiver},{ID},{body}\n",
Payload::new(EmberHi::borrowed([reply_kind])),
)?;
let (mut lines, mut writer) = Stream::connect().await?;
writer.write_all(payload.as_bytes()).await?;
writer.flush().await?;
drop(writer);
View on GitHub (pinned to 5f901b886b)
Solutions
- Restart both `yazi` and all `ya` processes so versions and schemas match.
- Check `YAZI_LOG=debug` output on the Yazi side to find the original failure that produced an empty error.
- File an issue if a specific message reliably yields `ok:false` with an empty error — that is a server-side bug.
Defensive patterns
Strategy: retry
Try / catch
match result {
Err(e) if e.to_string() == "Unknown error" => {
// opaque failure: check YAZI_LOG=debug output on the yazi side, then retry once
retry_once();
}
other => other,
} Prevention
- Keep `ya` and `yazi` on identical builds so error payloads deserialize correctly.
- Run with YAZI_LOG=debug on the yazi side to capture the original failure.
- Report reproducible empty-error responses upstream as a yazi bug.
When it happens
Trigger: The Yazi side sets `ok: false` without populating `body.error` — e.g. a panic/aborted handler or an older/newer build whose Body schema differs so the error field fails to populate.
Common situations: Version mismatch between `ya` and `yazi` causing deserialization to silently drop the error field; a Yazi bug that returns an empty error payload.
Related errors
- Expected custom payload of kind `{reply_kind}`
- {}
- Connection closed before receiving reply
- Incompatible version (Ya {}, Yazi {}). Restart all `ya` and
- No receiver found. Check if any receivers are running.
AI-assisted analysis of sxyazi/yazi@5f901b886b (2026-09-02).
Data as JSON: /api/errors/c76cc5a5e454cf5a.
Report an issue: GitHub.