{"record":{"id":"b7e7275a614c85af","repo":"zed-industries/zed","slug":"failed-to-download-remote-server-release","errorCode":null,"errorMessage":"failed to download remote server release: {:?}","messagePattern":"failed to download remote server release: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/auto_update/src/auto_update.rs","lineNumber":969,"sourceCode":"\n    pub fn should_show_update_notification(&self, cx: &App) -> Task<Result<bool>> {\n        let kvp = KeyValueStore::global(cx);\n        cx.background_spawn(async move {\n            Ok(kvp.read_kvp(SHOULD_SHOW_UPDATE_NOTIFICATION_KEY)?.is_some())\n        })\n    }\n}\n\nasync fn download_remote_server_binary(\n    target_path: &PathBuf,\n    release: ReleaseAsset,\n    client: Arc<HttpClientWithUrl>,\n) -> Result<()> {\n    let temp = tempfile::Builder::new().tempfile_in(remote_servers_dir())?;\n    let mut temp_file = File::create(&temp).await?;\n\n    let mut response = client.get(&release.url, Default::default(), true).await?;\n    anyhow::ensure!(\n        response.status().is_success(),\n        \"failed to download remote server release: {:?}\",\n        response.status()\n    );\n    smol::io::copy(response.body_mut(), &mut temp_file).await?;\n    smol::fs::rename(&temp, &target_path).await?;\n\n    Ok(())\n}\n\nasync fn cleanup_remote_server_cache(\n    platform_dir: &Path,\n    keep_path: &Path,\n    limit: usize,\n) -> Result<()> {\n    if limit == 0 {\n        return Ok(());\n    }","sourceCodeStart":951,"sourceCodeEnd":987,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/auto_update/src/auto_update.rs#L951-L987","documentation":"The updater downloads the remote-server release asset to a temp file and requires HTTP success; a non-2xx status aborts with the status code embedded in the message. This is the remote-server (headless/collab) variant of the download step, distinct from the app-update download.","triggerScenarios":"client.get(&release.url) returns a non-success status while fetching the remote server tarball - typically an expired or rotated asset URL, CDN 403, rate limiting, or a proxy blocking the large file.","commonSituations":"A release asset URL going stale between metadata fetch and download; nightly assets rotated mid-session; corporate proxies rejecting binary downloads; insufficient disk space in the remote servers cache dir.","solutions":["Retry - a fresh check re-fetches release metadata and a current asset URL.","If it repeats, verify the asset URL opens (curl -I) from the same machine.","Check disk space and permissions in the remote servers cache directory.","Rule out proxies/antivirus intercepting large downloads."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if let Ok(head) = client.head(&release.url).await {\n    if !head.status().is_success() {\n        // re-fetch release metadata for a fresh asset URL before downloading\n    }\n}","typeGuard":null,"tryCatchPattern":"on \"failed to download remote server release\", re-run the release lookup (fresh URL) and retry the download once before reporting.","preventionTips":["Re-resolve asset URLs immediately before use","Avoid caching release metadata across long sessions","Exclude the download host from proxy interception"],"tags":["network","http","download","remote-server","auto-update"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}