{"record":{"id":"30afb8f3cb20110e","repo":"JosefNemec/Playnite","slug":"update-file-integrity-check-failed","errorCode":null,"errorMessage":"Update file integrity check failed.","messagePattern":"Update file integrity check failed\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"source/Playnite/App/Updater.cs","lineNumber":165,"sourceCode":"                {\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\n\r\n        public UpdateManifest DownloadManifest()\r\n        {\r\n            var dataString = string.Empty;\r\n\r","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/JosefNemec/Playnite/blob/5911f4e964e628aa7a69c2030ab35101afa63067/source/Playnite/App/Updater.cs#L147-L183","documentation":"Thrown by the updater after the downloaded package fails VerifyUpdateFile, which compares the manifest's Checksum against the downloaded file. A mismatch means the bytes on disk do not match the published checksum, so the updater refuses to install a corrupt or tampered package.","triggerScenarios":"DownloadUpdatePackage completes the download but VerifyUpdateFile(updateManifest.Checksum, updaterPath) returns false because the computed hash differs from the manifest's Checksum.","commonSituations":"A truncated download (connection dropped mid-transfer), AV modifying the file, a partially-written file from a crashed prior download, a CDN/​cache serving wrong bytes, or a genuinely tampered/​mismatched manifest on the server.","solutions":["Delete the cached updater file and re-run the update check to force a clean download.","Disable AV real-time scanning temporarily if it is altering the downloaded file.","Verify network stability to avoid truncated downloads; retry on a stable connection.","If persistent, manually download the update from the official source and verify its checksum."],"exampleFix":"// before\nawait updater.DownloadUpdatePackage(progressHandler);\n\n// after\nstring updaterPath = GetUpdaterPath();\nfor (int i = 0; i < 3; i++)\n{\n    if (File.Exists(updaterPath)) File.Delete(updaterPath);\n    try { await updater.DownloadUpdatePackage(progressHandler); break; }\n    catch (Exception e) { logger.Warn(e, $\"integrity/attempt {i}\"); }\n}","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"for (int i = 0; i < 3; i++)\n{\n    if (File.Exists(updaterPath)) File.Delete(updaterPath);\n    try { await updater.DownloadUpdatePackage(progressHandler); break; }\n    catch (Exception e) { logger.Warn(e, $\"integrity/attempt {i}\"); if (i == 2) throw; }\n}","preventionTips":["Delete a cached/corrupt updater file before re-downloading.","Disable AV scanning on the updater path if it alters downloads.","Retry on a stable connection to avoid truncated files."],"tags":["updater","integrity","checksum","playnite"],"backgroundTag":null,"analyzedSha":"5911f4e964e628aa7a69c2030ab35101afa63067","analyzedAt":"2026-08-13T17:38:25.713Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}