{"record":{"id":"f0298bb1f3adbc1c","repo":"libnyanpasu/clash-nyanpasu","slug":"no-matches-found-for-core-type","errorCode":null,"errorMessage":"no matches found for core type: {:?}","messagePattern":"no matches found for core type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/tauri/src/core/updater/mod.rs","lineNumber":231,"sourceCode":"            let mut mirror = self.mirror.write();\n            *mirror = Some((\n                fastest_mirror.to_string(),\n                chrono::Utc::now().timestamp() as u64,\n            ));\n        }\n        Ok(())\n    }\n\n    pub async fn update_core(\n        &mut self,\n        core_type: &ClashCore,\n        nyanpasu: crate::client::NyanpasuClient,\n    ) -> Result<usize> {\n        self.mirror_speed_test().await?;\n        let (artifact, tag) = self\n            .manifest_version\n            .get_matches(core_type)\n            .ok_or(anyhow!(\"no matches found for core type: {:?}\", core_type))?;\n        let mirror = self.get_mirror().unwrap();\n        let updater = Arc::new(\n            instance::UpdaterBuilder::new()\n                .set_client(self.client.clone())\n                .set_nyanpasu_client(nyanpasu)\n                .set_core_type(*core_type)\n                .set_mirror(mirror)\n                .set_artifact(artifact)\n                .set_tag(tag)\n                .build()\n                .await?,\n        );\n        let updater_ref = updater.clone();\n        let updater_id = updater.get_updater_id();\n        self.instances.insert(updater_id, updater);\n        tokio::spawn(async move {\n            updater_ref.start().await;\n        });","sourceCodeStart":213,"sourceCodeEnd":249,"githubUrl":"https://github.com/libnyanpasu/clash-nyanpasu/blob/f7dbce2997c633e484f54788035e770b3ee99773/backend/tauri/src/core/updater/mod.rs#L213-L249","documentation":"update_core asks manifest_version.get_matches(core_type) for the release artifact matching the requested core type. If the downloaded version manifest has no entry for that core type (mihomo/clash-rs/clash), the Option is None and this error is thrown. It means the manifest is reachable but does not cover the requested core.","triggerScenarios":"Calling update_core with a CoreType whose key is absent from the fetched manifest/version.json - e.g. requesting a core the upstream manifest no longer ships, or a freshly added core type before the manifest includes it.","commonSituations":"App version older/newer than the manifest schema, upstream renamed or dropped a core artifact, custom core type passed programmatically, or a cached/partial manifest.","solutions":["Verify the requested core type is spelled/supported and present in the upstream manifest/version.json","Refresh or clear the cached manifest so get_matches sees the current release list","Update the app - the manifest schema may have changed relative to your build"],"exampleFix":"// before\nlet (artifact, tag) = self.manifest_version.get_matches(core_type).ok_or(anyhow!(\"no matches found for core type: {:?}\", core_type))?;\n// after\nlet Some((artifact, tag)) = self.manifest_version.get_matches(core_type) else {\n    anyhow::bail!(\"core type {:?} not found in manifest; available: {:?}\", core_type, self.manifest_version.available_core_types());\n};","handlingStrategy":"validation","validationCode":"// check the core type exists in the manifest before updating\nlet manifest = updater.manifest_version.clone();\nif manifest.get_matches(&core_type).is_none() {\n    eprintln!(\"core type {:?} not present in version manifest; skipping update\", core_type);\n}","typeGuard":"fn core_supported(manifest: &ManifestVersion, core_type: &CoreType) -> bool {\n    manifest.get_matches(core_type).is_some()\n}","tryCatchPattern":"match updater.update_core(core_type, nyanpasu).await {\n    Ok(n) => n,\n    Err(e) if e.to_string().contains(\"no matches found for core type\") => /* report unsupported core; refresh manifest or update app */,\n    Err(e) => return Err(e),\n}","preventionTips":["Confirm the requested core type exists in the upstream version.json before updating","Keep the app build in sync with the manifest schema version","Clear stale cached manifests so available matches reflect current releases"],"tags":["updater","manifest","core","rust"],"backgroundTag":"resource-not-found","analyzedSha":"f7dbce2997c633e484f54788035e770b3ee99773","analyzedAt":"2026-09-08T01:24:59.197Z","contentChangedAt":"2026-09-08T01:24:59.197Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}