clockworklabs/SpacetimeDB · info · anyhow::Error
Publishing aborted by user
Error message
Publishing aborted by user
What it means
The pre-publish check returned an auto-migration plan, but the server flagged `break_clients: true` — the plan's schema changes will break existing subscribed clients. Unless a force flag is set, the CLI asks 'The above changes will BREAK existing clients. Do you want to proceed?'; a non-`y` answer bails here before the publish request with the `BreakClients` policy token is ever sent.
Source
Thrown at crates/cli/src/subcommands/publish.rs:814
}
println!("{}", manual.reason);
println!("Proceeding with database clear due to --delete-data=on-conflict.");
builder = confirm_and_clear(name_or_identity, yes.delete_data, builder)?;
}
PrePublishResult::AutoMigrate(auto) => {
println!("{}", auto.migrate_plan);
// We only arrive here if you have not specified ClearMode::Always AND there was no
// conflict that required manual migration.
if auto.break_clients
&& !y_or_n(
force_break_clients || yes.break_clients,
"The above changes will BREAK existing clients. Do you want to proceed?",
)?
{
println!("Aborting");
// Early exit: return an error or a special signal. Here we bail out by returning Err.
anyhow::bail!("Publishing aborted by user");
}
builder = builder
.query(&[("token", auto.token)])
.query(&[("policy", "BreakClients")]);
}
}
}
Ok(builder)
}
async fn call_pre_publish(
client: &reqwest::Client,
database_host: &str,
domain: &String,
host_type: &str,
program_bytes: &[u8],
auth_header: &AuthHeader,View on GitHub (pinned to 524b4487d9)
Solutions
- Answer `y` at the prompt if breaking clients is acceptable right now
- Pass the break-clients force flag (`force_break_clients`, e.g. `--break-clients`) or `--yes` so non-interactive runs proceed
- If clients must keep working, revert the breaking schema change and republish a compatible version
- Coordinate the publish with a client update so subscribers reconnect against the new schema
Example fix
# before spacetime publish mydb # auto plan flags break_clients -> declined -> aborted # after spacetime publish mydb --break-clients --yes
Defensive patterns
Strategy: validation
Try / catch
// CI wrapper: detect the break-clients abort and either flag it or retry with the force flag
let out = run_cli("spacetime publish db");
if out.contains("Publishing aborted by user") && out.contains("BREAK existing clients") {
return Err("publish would break clients; coordinate a client release first");
} Prevention
- Decide break-clients policy per environment and encode it in the publish flag used by scripts
- Run the publish against a staging database first to see the migration plan and break_clients verdict
- Keep client bindings in lockstep with published schemas; publish compatible changes when subscribers are live
When it happens
Trigger: Publishing additive-but-client-visible schema changes (renamed/removed columns or tables encoded in client bindings) while existing clients are live; answering 'n' or hitting EOF at the prompt in a non-interactive run.
Common situations: Altering a table definition while a game client built against the old schema is deployed; CI publishing without the break-clients/yes flag so stdin EOF aborts; consciously testing whether a change is breaking by reading the printed plan.
Related errors
- Manual database migrations are not yet implemented
- Publish aborted by user.
- Aborting because publishing would require manual migration o
- Aborted.
- Aborted.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/31bd72b5d362ce24.
Report an issue: GitHub.