rtk-ai/rtk · error
no telemetry endpoint configured
Error message
no telemetry endpoint configured
What it means
`run_forget` sends a data-erasure request (GDPR-style deletion keyed by device_hash) to RTK's telemetry backend. The endpoint base URL comes from `telemetry::endpoint_url()`, which returns None when no telemetry endpoint is configured, so the erasure request cannot be sent and the command fails with this error.
Solutions
- Configure the telemetry endpoint (env var or config key consumed by telemetry::endpoint_url, e.g. RTK_TELEMETRY_ENDPOINT) and re-run the forget command.
- If telemetry is intentionally disabled and no data was ever sent, no remote erasure is needed — delete local usage data instead (e.g. remove rtk's SQLite tracking DB).
- Check with the RTK maintainers/docs for the correct endpoint value for your build.
Example fix
// before rtk telemetry forget <device_hash> // error: no telemetry endpoint configured // after export RTK_TELEMETRY_ENDPOINT=https://telemetry.rtk-ai.example rtk telemetry forget <device_hash>
Defensive patterns
Strategy: validation
Validate before calling
if std::env::var("RTK_TELEMETRY_ENDPOINT").is_err() {
eprintln!("no telemetry endpoint configured; erasure request cannot be sent");
std::process::exit(1);
} Try / catch
match rtk_telemetry_forget(&device_hash).err() {
Some(e) if e.to_string().contains("no telemetry endpoint configured") => {
eprintln!("set RTK_TELEMETRY_ENDPOINT or delete local tracking data instead");
}
_ => {}
} Prevention
- Set the telemetry endpoint env/config before running any telemetry subcommands.
- In CI, check that required env vars exist before invoking rtk telemetry commands.
- If telemetry is intentionally disabled, manage erasure by deleting the local SQLite tracking DB instead.
When it happens
Trigger: Running `rtk telemetry forget <device_hash>` (run_forget → send_erasure_request) while no telemetry endpoint URL is set in configuration or environment — e.g. a build without a compiled-in default endpoint and no user override.
Common situations: Self-compiled or forked RTK builds lacking the default telemetry endpoint; enterprise/offline installs where the endpoint is intentionally unset; config files that disable or omit telemetry settings.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- consent requires interactive terminal — cannot enable…
- ambiguous hash prefix
- Antigravity is project-scoped. Use: rtk init --agent…
- at least one of install_claude or install_opencode must be…
- bunx requires a command argument
AI-assisted analysis of rtk-ai/rtk@0924356b4c (2026-09-19).
Data as JSON: /api/errors/bd84623f1003b4f2.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/telemetry_cmd.rs:252
Ok(()) => {
println!("Erasure request sent to server.");
}
Err(e) => {
eprintln!("rtk: could not reach server: {}", e);
eprintln!(" To complete erasure, email contact@rtk-ai.app");
eprintln!(" with your device hash: {}", hash);
}
}
}
println!("Local telemetry data deleted. Telemetry disabled.");
Ok(())
}
fn send_erasure_request(device_hash: &str) -> Result<()> {
let url = match super::telemetry::endpoint_url() {
Some(u) => format!("{}/erasure", u),
None => anyhow::bail!("no telemetry endpoint configured"),
};
let payload = serde_json::json!({
"device_hash": device_hash,
"action": "erasure",
});
let mut req = ureq::post(&url).set("Content-Type", "application/json");
if let Some(token) = option_env!("RTK_TELEMETRY_TOKEN") {
req = req.set("X-RTK-Token", token);
}
req.timeout(std::time::Duration::from_secs(5))
.send_string(&payload.to_string())?;
Ok(())
}View on GitHub (pinned to 0924356b4c)