Skip to content

[Bug]: Desktop updater failures log no underlying error #13977

Closed

Description

@TonybynMp4

Before submitting

  • 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

  1. On a .deb install, start an update and dismiss the pkexec password prompt. Or have the download fail (offline, 404).
  2. 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.

Activity

  1. juliusmarminge commented on Sep 27, 2026

    @juliusmarminge
    Member

    Triage

    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.

  2. added
    bugSomething is broken or behaving incorrectly.
    via-triageFiled through npx t3 triage
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions