You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Desktop updater failures log no underlying error #13977
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/desktop
Steps to reproduce
On a .deb install, start an update and dismiss the pkexec password prompt. Or have the download fail (offline, 404).
Check the desktop log.
Expected behavior
The log records why the update failed.
Actual behavior
Every failure logs the same fixed message, e.g. "Electron updater failed to download the update on channel nightly.", plus errorTag and channel. The ElectronUpdater*Error types capture the thrown value in cause, but the handlers in DesktopUpdates.ts never log it. A cancelled pkexec, a sha512 mismatch and a 404 all look identical.
Impact
Minor bug or occasional failure
Version or commit
0.0.43-nightly.20260927.2344 (.deb)
Environment
Ubuntu 26.04.1 LTS
Possible fix
Add cause: describeReadinessCause(error.cause) to the three logUpdaterError calls. This matters more now that .deb updates can fail inside pkexec/dpkg.
The generic log line is real, and it is deliberate. The three ElectronUpdater*Error handlers in apps/desktop/src/updates/DesktopUpdates.ts log error.message plus errorTag and channel (and the install flags on quit-and-install). They do not log error.cause. DesktopUpdates.test.ts ("logs bounded updater failure context without exposing the cause") locks that in: an electron-updater failure whose message is a feed URL with userinfo and a query token must not show up in the log annotations. The same redaction applies to the on-screen update message ("keeps raw updater event failures out of update state").
cause: describeReadinessCause(error.cause) would undo that. describeReadinessCause copies message, so a 404 or checksum error that embeds the download URL would be written to the desktop log, and that test would fail. It is also the wrong helper for this path.
A dismissed pkexec prompt does not go through ElectronUpdaterQuitAndInstallError at all. electron-updater 6.8.9 DebUpdater.doInstall catches the install error, dispatchErrors it, and returns false. quitAndInstall does not throw, so the Effect.try wrapper never builds that tagged error. The failure arrives on the error event and is handled by handleUpdaterError, which logs Desktop updater install operation reported an error. with errorTag and operation only. spawnSyncLog throws Command <pkexec> exited with code <status> (cancel is typically 126). That text is dropped too.
Download and check failures are worse in a different way: electron-updater both emits error and rejects the promise, so you get the generic DesktopUpdaterReportedError line and the generic ElectronUpdater*Error line, still with no status, code, or exit status.
Worth fixing only with a bounded discriminator (error.code when it is a string such as ERR_UPDATER_*, or an exit status parsed from the command error), never the message or URL. The existing secret test should keep failing if a token in cause reaches the annotations.
Activity
juliusmarminge commentedon Sep 27, 2026
Triage
The generic log line is real, and it is deliberate. The three
ElectronUpdater*Errorhandlers inapps/desktop/src/updates/DesktopUpdates.tslogerror.messagepluserrorTagandchannel(and the install flags on quit-and-install). They do not logerror.cause.DesktopUpdates.test.ts("logs bounded updater failure context without exposing the cause") locks that in: an electron-updater failure whose message is a feed URL with userinfo and a query token must not show up in the log annotations. The same redaction applies to the on-screen update message ("keeps raw updater event failures out of update state").cause: describeReadinessCause(error.cause)would undo that.describeReadinessCausecopiesmessage, so a 404 or checksum error that embeds the download URL would be written to the desktop log, and that test would fail. It is also the wrong helper for this path.A dismissed
pkexecprompt does not go throughElectronUpdaterQuitAndInstallErrorat all. electron-updater 6.8.9DebUpdater.doInstallcatches the install error,dispatchErrors it, and returns false.quitAndInstalldoes not throw, so theEffect.trywrapper never builds that tagged error. The failure arrives on theerrorevent and is handled byhandleUpdaterError, which logsDesktop updater install operation reported an error.witherrorTagandoperationonly.spawnSyncLogthrowsCommand <pkexec> exited with code <status>(cancel is typically 126). That text is dropped too.Download and check failures are worse in a different way: electron-updater both emits
errorand rejects the promise, so you get the genericDesktopUpdaterReportedErrorline and the genericElectronUpdater*Errorline, still with no status, code, or exit status.Worth fixing only with a bounded discriminator (
error.codewhen it is a string such asERR_UPDATER_*, or an exit status parsed from the command error), never the message or URL. The existing secret test should keep failing if a token incausereaches the annotations.