facebook/flow · warning
failed to clear spinner line
Error message
failed to clear spinner line
What it means
When the server tells the client to hold (PleaseHold) or otherwise returns a retryable state, the client clears the spinner line on stderr before returning; if print_clear_line fails, it panics with this message. Like other spinner panics, it indicates stderr became unwritable mid-command.
Source
Thrown at rust_port/crates/flow_command_utils/src/lib.rs:2959
bincode::config::legacy()
.with_limit::<{ flow_commands_connect::command_connect_simple::MAX_FRAME_BYTES }>(),
)
});
let response = match response {
Ok(r) => r,
Err(bincode::error::DecodeError::Io { inner, .. })
if matches!(
inner.kind(),
std::io::ErrorKind::BrokenPipe
| std::io::ErrorKind::ConnectionReset
| std::io::ErrorKind::UnexpectedEof
) =>
{
if show_progress && flow_utils_tty::spinner_used() {
let stderr = std::io::stderr();
let mut stderr = stderr.lock();
flow_utils_tty::print_clear_line(&mut stderr)
.expect("failed to clear spinner line");
}
return Err(());
}
Err(e) => {
if show_progress && flow_utils_tty::spinner_used() {
let stderr = std::io::stderr();
let mut stderr = stderr.lock();
flow_utils_tty::print_clear_line(&mut stderr)
.expect("failed to clear spinner line");
}
panic!("Unknown exception reading from the server: {}", e)
}
};
match response {
MonitorToClientMessage::PleaseHold(server_status, watcher_status) => {
let status_string = {
if server_status::is_free(&server_status) {
// Let's ignore messages from the server that it is free.View on GitHub (pinned to 5c86586199)
Solutions
- Keep stderr attached and open for the whole flow command; avoid early-exiting pipe consumers.
- Run without a TTY/spinner (redirect output, or disable progress) so the clear-line path is skipped.
- Free disk space / fix permissions on the stderr target file.
Example fix
// before flow status | grep -m1 ready # grep exits, pipe closes // after flow status > out.log 2>&1; grep -m1 ready out.log
Defensive patterns
Strategy: fallback
Validate before calling
[ -t 2 ] || [ -w /dev/stderr ] || echo 'stderr unusable; run without progress output'
Try / catch
flow status > status.log 2>&1 || { cat status.log; exit 1; } Prevention
- Keep stderr open for the entire command lifetime.
- Prefer file redirection over pipes for long flow commands.
- Disable spinners in non-interactive environments.
When it happens
Trigger: During a server command with show_progress enabled and a spinner in use, the PleaseHold/Err(()) branch calls flow_utils_tty::print_clear_line on locked stderr and the write fails (closed pipe, unwritable target).
Common situations: Long `flow check`/IDE-status commands whose stderr pipe is closed by a supervisor, or output redirected to a file that became unwritable (disk full).
Related errors
- failed to flush spinner status
- failed to flush spinner status
- failed to clear spinner line
- failed to clear spinner line
- failed to write spinner status
AI-assisted analysis of facebook/flow@5c86586199 (2026-09-08).
Data as JSON: /api/errors/d89ec523ae3e8426.
Report an issue: GitHub.