Before submitting#
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.
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.