{"record":{"id":"5089a438bc7563ba","repo":"janhq/jan","slug":"no-endpoints-configured","errorCode":null,"errorMessage":"No endpoints configured","messagePattern":"No endpoints configured","errorType":"exception","errorClass":"UpdateError","httpStatus":null,"severity":"warning","filePath":"src-tauri/src/core/updater/custom_updater.rs","lineNumber":43,"sourceCode":"\n/// Timeout for HTTP requests\nconst REQUEST_TIMEOUT_SECS: u64 = 30;\n\n#[derive(Debug, Error)]\npub enum UpdateError {\n    #[error(\"HTTP request failed: {0}\")]\n    RequestFailed(#[from] reqwest::Error),\n\n    #[error(\"Failed to parse update response: {0}\")]\n    ParseError(String),\n\n    #[error(\"All endpoints failed\")]\n    AllEndpointsFailed,\n\n    #[error(\"Invalid response from server: {0}\")]\n    InvalidResponse(String),\n\n    #[error(\"No endpoints configured\")]\n    NoEndpointsConfigured,\n}\n\n/// Update information returned by the update check endpoint\n/// Compatible with Tauri's updater format\n#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct UpdateInfo {\n    pub version: String,\n    #[serde(default)]\n    pub notes: Option<String>,\n    #[serde(default)]\n    pub pub_date: Option<String>,\n    #[serde(default)]\n    pub platforms: Option<serde_json::Value>,\n    /// URL to download the update\n    #[serde(default)]\n    pub url: Option<String>,\n    /// Signature for verifying the update","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/janhq/jan/blob/fad3f12a147d138388a66f0d92a02b2675f65294/src-tauri/src/core/updater/custom_updater.rs#L25-L61","documentation":"The NoEndpointsConfigured variant of UpdateError is returned immediately when the endpoints list passed to check_for_updates is empty. This means the tauri.conf.json plugins.updater.endpoints array is missing, empty, or was not loaded. Unlike other variants, this is a configuration error, not a network error.","triggerScenarios":"tauri.conf.json has no plugins.updater.endpoints key. The endpoints array exists but is empty []. The config file failed to load and an empty default was used. The updater plugin was not included in the Tauri build features.","commonSituations":"Custom build of Jan that omitted the updater config. Misconfigured tauri.conf.json during development. Plugin disabled at compile time. Config file corrupted or replaced with one lacking the endpoints section.","solutions":["Add plugins.updater.endpoints to tauri.conf.json with at least one URL.","Verify the JSON structure matches the Tauri updater plugin schema.","Ensure the updater plugin is enabled in the Tauri features list.","Check that the config file is not corrupted."],"exampleFix":"// tauri.conf.json — before\n{\n  \"plugins\": {}\n}\n\n// after\n{\n  \"plugins\": {\n    \"updater\": {\n      \"endpoints\": [\n        \"https://apps.jan.ai/update-check\",\n        \"https://fallback.jan.ai/update\"\n      ]\n    }\n  }\n}","handlingStrategy":"validation","validationCode":"// At build/startup time, verify endpoints are configured\nfn verify_updater_config() -> Result<(), String> {\n    let config = tauri::Config::from_file(\"tauri.conf.json\")\n        .map_err(|e| format!(\"Cannot read config: {e}\"))?;\n    let endpoints = config.plugins\n        .get(\"updater\")\n        .and_then(|u| u.get(\"endpoints\"))\n        .and_then(|e| e.as_array());\n    match endpoints {\n        Some(arr) if !arr.is_empty() => Ok(()),\n        _ => Err(\"plugins.updater.endpoints is missing or empty\".into()),\n    }\n}","typeGuard":"function hasUpdaterEndpoints(config: unknown): boolean {\n  const endpoints = (config as any)?.plugins?.updater?.endpoints;\n  return Array.isArray(endpoints) && endpoints.length > 0;\n}","tryCatchPattern":"Err(UpdateError::NoEndpointsConfigured) => {\n    log::info!(\"No update endpoints configured; update checks are disabled.\");\n    // Non-fatal — silently skip\n}","preventionTips":["Add a build-time check that tauri.conf.json has a non-empty endpoints array.","Treat NoEndpointsConfigured as non-fatal — skip update checks silently.","Document the required config structure in the project README.","Validate the config in CI before releasing."],"tags":["updater","configuration","endpoints","tauri-conf"],"backgroundTag":null,"analyzedSha":"fad3f12a147d138388a66f0d92a02b2675f65294","analyzedAt":"2026-08-12T20:33:47.516Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}