From 1e20ff4b4abc1d250625a98fc7b085623f4f4ceb Mon Sep 17 00:00:00 2001 From: sharadpatel Date: Mon, 16 Nov 2026 09:30:43 +0800 Subject: [PATCH] fix(desktop): Windows updates wait out a signature check slowed by antivirus electron-updater kills its PowerShell Get-AuthenticodeSignature check after a hard-coded 20 s. On-access antivirus can hold the first check of a freshly downloaded installer for 51-56 s, so the update never becomes ready. Raise the limit to 120 s in the existing electron-updater patch. Refs #20345 Co-Authored-By: Claude Opus 5.5 --- patches/electron-updater@6.8.9.patch | 14 ++++++++++++++ pnpm-lock.yaml | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/patches/electron-updater@6.8.9.patch b/patches/electron-updater@6.8.9.patch index 1e343589cb509..1befdc6c2367a 100644 --- a/patches/electron-updater@6.8.9.patch +++ b/patches/electron-updater@6.8.9.patch @@ -133,3 +133,17 @@ index e768d24e7a957caf32a4b8ca6c68cb50eb5865ee..708a1fa7d740192944f04259cde6d6bf async getLatestTagName(cancellationToken) { const options = this.options; // do not use API for GitHub to avoid limit, only for custom host or GitHub Enterprise +diff --git a/out/windowsExecutableCodeSignatureVerifier.js b/out/windowsExecutableCodeSignatureVerifier.js +index c9a579eb3a7a21504ad89e663afc0f97399ac169..9f3c303c4e070312096e498012b31f8a80b972dd 100644 +--- a/out/windowsExecutableCodeSignatureVerifier.js ++++ b/out/windowsExecutableCodeSignatureVerifier.js +@@ -44,7 +44,8 @@ function verifySignature(publisherNames, unescapedTempUpdateFile, logger) { + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + const tempUpdateFile = unescapedTempUpdateFile.replace(/'/g, "''"); + logger.info(`Verifying signature ${tempUpdateFile}`); +- (0, child_process_1.execFile)(...preparePowerShellExec(`"Get-AuthenticodeSignature -LiteralPath '${tempUpdateFile}' | ConvertTo-Json -Compress"`, 20 * 1000), (error, stdout, stderr) => { ++ // On-access antivirus can hold the first check of a freshly written installer for ~55 s. ++ (0, child_process_1.execFile)(...preparePowerShellExec(`"Get-AuthenticodeSignature -LiteralPath '${tempUpdateFile}' | ConvertTo-Json -Compress"`, 120 * 1000), (error, stdout, stderr) => { + var _a; + try { + if (error != null || stderr) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15b8786867bf7..6bebbc2c07316 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,7 +379,7 @@ patchedDependencies: alchemy@2.0.0-beta.85: 07cc8c7e14b3b9af143ddd40a059f117c27e55139fbf20bd5dde2eb30509cedd app-builder-lib@26.16.1: 0fbe9ae51783f5768ebe197d12d1fdb7d477a08c92e5db2f6356bcce62613c53 dbus-next@0.10.2: cfff57561b0ee59b5addb3b2e6c6f20906e967507a530ab67e8db8108e520ba4 - electron-updater@6.8.9: 5e096d34a46fdbaa6d48a5803b2c0ed9c7c04f8ab43a30ebebbf726f8f28ed8e + electron-updater@6.8.9: d7d7b5d0b419553f8bca100a083f5c8ae65ac8e3f234e56ccd99a45a1198505f expo-audio@58.0.11: 93691f7f59edb30a3bb2c23b489e605e7ea35506b1212d4a2ebbd1fd79079483 expo-modules-core@58.0.30: f0b0fd100550ed76e5c25b4d13eb7c9ff62825f8f197c53edf7bf447c50c9fb7 expo-network@58.0.4: 159c2d760d1cd5102e95df51c20600111e7a72096ef0daea8215d50cae48bd98 @@ -469,7 +469,7 @@ importers: version: 8.2.0 electron-updater: specifier: 6.8.9 - version: 6.8.9(patch_hash=5e096d34a46fdbaa6d48a5803b2c0ed9c7c04f8ab43a30ebebbf726f8f28ed8e)(supports-color@8.1.1) + version: 6.8.9(patch_hash=d7d7b5d0b419553f8bca100a083f5c8ae65ac8e3f234e56ccd99a45a1198505f)(supports-color@8.1.1) electron-webauthn: specifier: 'catalog:' version: 1.3.1(typescript@6.0.3) @@ -19050,7 +19050,7 @@ snapshots: electron-to-chromium@1.5.430: {} - electron-updater@6.8.9(patch_hash=5e096d34a46fdbaa6d48a5803b2c0ed9c7c04f8ab43a30ebebbf726f8f28ed8e)(supports-color@8.1.1): + electron-updater@6.8.9(patch_hash=d7d7b5d0b419553f8bca100a083f5c8ae65ac8e3f234e56ccd99a45a1198505f)(supports-color@8.1.1): dependencies: builder-util-runtime: 9.7.0(supports-color@8.1.1) fs-extra: 10.1.0