{"record":{"id":"cfd010b3e770c45a","repo":"libnyanpasu/clash-nyanpasu","slug":"updater-is-not-exist","errorCode":null,"errorMessage":"updater is not exist","messagePattern":"updater is not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"backend/tauri/src/ipc.rs","lineNumber":670,"sourceCode":"    client: State<'_, NyanpasuClient>,\n    core_type: nyanpasu::ClashCore,\n) -> Result<usize> {\n    let event_id = (updater::UpdaterManager::global()\n        .write()\n        .await\n        .update_core(&core_type, client.inner().clone())\n        .await)?;\n    Ok(event_id)\n}\n\n#[tauri::command]\n#[specta::specta]\npub async fn inspect_updater(updater_id: usize) -> Result<updater::UpdaterSummary> {\n    let updater = (updater::UpdaterManager::global()\n        .read()\n        .await\n        .inspect_updater(updater_id)\n        .ok_or(anyhow::anyhow!(\"updater is not exist\")))?;\n    Ok(updater)\n}\n\n#[tauri::command]\n#[specta::specta]\npub async fn clash_api_get_proxy_delay(\n    client: State<'_, NyanpasuClient>,\n    name: String,\n    provider: Option<String>,\n    url: Option<String>,\n) -> Result<clash::api::DelayRes> {\n    Ok(client.proxy_delay(name, provider, url).await?)\n}\n\n#[tauri::command]\n#[specta::specta]\npub async fn clash_api_get_configs(\n    client: State<'_, NyanpasuClient>,","sourceCodeStart":652,"sourceCodeEnd":688,"githubUrl":"https://github.com/libnyanpasu/clash-nyanpasu/blob/f7dbce2997c633e484f54788035e770b3ee99773/backend/tauri/src/ipc.rs#L652-L688","documentation":"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.","triggerScenarios":"Calling inspect_updater with an id never registered, after the updater finished and was removed, or after an app restart (ids are not persisted).","commonSituations":"Frontend polls progress for a download that already completed or failed and was evicted; stale id cached in UI state across restarts.","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."],"exampleFix":"// before\nlet updater = manager.inspect_updater(stale_id).ok_or(anyhow!(\"updater is not exist\"))?;\n// after\nmatch manager.inspect_updater(id) {\n  Some(u) => Ok(u),\n  None => Ok(UpdaterSummary::finished_or_unknown(id)),\n}","handlingStrategy":"fallback","validationCode":"const knownIds = await listUpdaters(); // only poll ids in this set","typeGuard":null,"tryCatchPattern":"try {\n  const summary = await invoke('inspect_updater', { updaterId: id });\n} catch (e) {\n  if (String(e).includes('updater is not exist')) {\n    stopPolling(id); markUpdateFinishedOrUnknown(id);\n  } else throw e;\n}","preventionTips":["Stop polling when a download completes","Do not persist updater ids across restarts","Refresh the updater list before inspecting"],"tags":["updater","lookup","not-found"],"backgroundTag":"record-not-found","analyzedSha":"f7dbce2997c633e484f54788035e770b3ee99773","analyzedAt":"2026-09-08T01:24:59.197Z","contentChangedAt":"2026-09-08T01:24:59.197Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}