{"record":{"id":"99034c0c952b59c5","repo":"JosefNemec/Playnite","slug":"failed-to-download-update-file","errorCode":null,"errorMessage":"Failed to download update file.","messagePattern":"Failed to download update file\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"source/Playnite/App/Updater.cs","lineNumber":160,"sourceCode":"            }\r\n\r\n            if (File.Exists(updaterPath))\r\n            {\r\n                if (VerifyUpdateFile(updateManifest.Checksum, updaterPath))\r\n                {\r\n                    logger.Info(\"Update already downloaded skipping download.\");\r\n                    return;\r\n                }\r\n            }\r\n\r\n            try\r\n            {\r\n                await downloader.DownloadFileAsync(updateManifest.PackageUrls, updaterPath, progressHandler);\r\n            }\r\n            catch (Exception e)\r\n            {\r\n                logger.Error(e, \"Failed to download update file.\");\r\n                throw new Exception(\"Failed to download update file.\");\r\n            }\r\n\r\n            if (!VerifyUpdateFile(updateManifest.Checksum, updaterPath))\r\n            {\r\n                throw new Exception($\"Update file integrity check failed.\");\r\n            }\r\n        }\r\n\r\n        public void InstallUpdate(ApplicationMode mode)\r\n        {\r\n            var portable = PlayniteSettings.IsPortable ? \"/PORTABLE\" : \"\";\r\n            var fullscreen = mode == ApplicationMode.Fullscreen ? \"/FULLSCREEN\" : \"\";\r\n            logger.Info(\"Installing new update to {0}, in {1} mode\".Format(PlaynitePaths.ProgramPath, portable));\r\n            playniteApp.QuitAndStart(\r\n                updaterPath,\r\n                @\"/SILENT /NOCANCEL /DIR=\"\"{0}\"\" /UPDATE {1} {2}\".Format(PlaynitePaths.ProgramPath, portable, fullscreen),\r\n                !FileSystem.CanWriteToFolder(PlaynitePaths.ProgramPath));\r\n        }\r","sourceCodeStart":142,"sourceCodeEnd":178,"githubUrl":"https://github.com/JosefNemec/Playnite/blob/5911f4e964e628aa7a69c2030ab35101afa63067/source/Playnite/App/Updater.cs#L142-L178","documentation":"Thrown by the updater after a network exception escapes downloader.DownloadFileAsync while fetching the update package. The underlying exception is logged, then re-wrapped in a generic Exception so callers get a stable error type regardless of transport. It indicates the update payload could not be retrieved from any of the configured PackageUrls.","triggerScenarios":"DownloadUpdatePackage calls DownloadFileAsync(updateManifest.PackageUrls, updaterPath, progress); a network/HTTP/IO exception is raised (offline, DNS failure, 404, proxy block, disk write error to updaterPath).","commonSituations":"No internet connection; a corporate proxy/firewall blocks the update host; the update server returns an error for a listed URL; antivirus scans/quarantines the in-progress download; insufficient disk space or permissions on the updater path.","solutions":["Confirm network connectivity and that the update host is reachable from the machine.","Retry the update check later (transient server/network issues).","Disable/​configure proxy or firewall rules blocking the update domain.","Ensure the updater download directory is writable and has free space.","Temporarily disable AV real-time scanning for the updater path if it interferes."],"exampleFix":"// before\nawait updater.DownloadUpdatePackage(progressHandler);\n\n// after\nint attempts = 0;\nwhile (true)\n{\n    try { await updater.DownloadUpdatePackage(progressHandler); break; }\n    catch (Exception e) when (++attempts < 3) { logger.Warn(e, \"retry update download\"); await Task.Delay(2000); }\n}","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"int attempts = 0;\nwhile (true)\n{\n    try { await updater.DownloadUpdatePackage(progressHandler); break; }\n    catch (Exception e) when (++attempts < 3) { logger.Warn(e, \"retry download\"); await Task.Delay(2000); }\n}","preventionTips":["Retry transient download failures with back-off.","Confirm network/proxy reachability before invoking the updater.","Surface a clear 'update unavailable' state instead of crashing."],"tags":["network","updater","download","playnite"],"backgroundTag":null,"analyzedSha":"5911f4e964e628aa7a69c2030ab35101afa63067","analyzedAt":"2026-08-13T17:38:25.713Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}