libnyanpasu/clash-nyanpasu · warning
updater is not exist
Error message
updater is not exist
What it means
inspect_updater looks up a registered background updater task in the global UpdaterManager by numeric id. If no updater with that id is currently registered, the Option becomes this anyhow error. It is a lookup miss on a transient in-memory registry.
Solutions
- Refresh the list of active updaters and use a current id.
- Treat not-found as 'update finished or unknown' in the UI.
- Re-trigger the update/download to obtain a fresh updater id.
- Do not persist updater ids across app restarts.
Example fix
// before
let updater = manager.inspect_updater(stale_id).ok_or(anyhow!("updater is not exist"))?;
// after
match manager.inspect_updater(id) {
Some(u) => Ok(u),
None => Ok(UpdaterSummary::finished_or_unknown(id)),
} Defensive patterns
Strategy: fallback
Validate before calling
const knownIds = await listUpdaters(); // only poll ids in this set
Try / catch
try {
const summary = await invoke('inspect_updater', { updaterId: id });
} catch (e) {
if (String(e).includes('updater is not exist')) {
stopPolling(id); markUpdateFinishedOrUnknown(id);
} else throw e;
} Prevention
- Stop polling when a download completes
- Do not persist updater ids across restarts
- Refresh the updater list before inspecting
When it happens
Trigger: Calling inspect_updater with an id never registered, after the updater finished and was removed, or after an app restart (ids are not persisted).
Common situations: Frontend polls progress for a download that already completed or failed and was evicted; stale id cached in UI state across restarts.
Understand the failure class
Background: Record Not Found Errors: "not found", RecordNotFound, and "was not found" — what they mean and how to fix them — this error's family across 28 libraries.
Related errors
AI-assisted analysis of libnyanpasu/clash-nyanpasu@f7dbce2997 (2026-09-08).
Data as JSON: /api/errors/cfd010b3e770c45a.
Report an issue: GitHub.
Appendix: source
Thrown at backend/tauri/src/ipc.rs:670
client: State<'_, NyanpasuClient>,
core_type: nyanpasu::ClashCore,
) -> Result<usize> {
let event_id = (updater::UpdaterManager::global()
.write()
.await
.update_core(&core_type, client.inner().clone())
.await)?;
Ok(event_id)
}
#[tauri::command]
#[specta::specta]
pub async fn inspect_updater(updater_id: usize) -> Result<updater::UpdaterSummary> {
let updater = (updater::UpdaterManager::global()
.read()
.await
.inspect_updater(updater_id)
.ok_or(anyhow::anyhow!("updater is not exist")))?;
Ok(updater)
}
#[tauri::command]
#[specta::specta]
pub async fn clash_api_get_proxy_delay(
client: State<'_, NyanpasuClient>,
name: String,
provider: Option<String>,
url: Option<String>,
) -> Result<clash::api::DelayRes> {
Ok(client.proxy_delay(name, provider, url).await?)
}
#[tauri::command]
#[specta::specta]
pub async fn clash_api_get_configs(
client: State<'_, NyanpasuClient>,View on GitHub (pinned to f7dbce2997)