Skip to content

AutoUpdater CheckForChanges issue #1039

@kamil-czarnecki

Description

@kamil-czarnecki
  • Version:
<TargetFramework>net10.0</TargetFramework>
<ElectronVersion>41.0.0</ElectronVersion>
<ElectronBuilderVersion>26.8.1</ElectronBuilderVersion>
  • Target: osx

  • AutoUpdater setup

Electron.AutoUpdater.AutoDownload = false;
Electron.AutoUpdater.AutoInstallOnAppQuit = false;
Electron.AutoUpdater.OnUpdateAvailable += info =>  _logger.LogInformation("Update available: {Version}", info.Version);
  • Description:
    CheckForUpdatesAsync hangs. After long debugging I found out that probably serialization/deserialization fails for UpdateInfo. There is a mismatch in ReleaseNotes between Electron.NET and electron updater. Current model expects list but updater returns it as string if FullChangelog is false (default value). After adding FullChangelog = true it fixed the issue.
    Below the current model for electron builder
/**
* The release notes. List if `updater.fullChangelog` is set to `true`, `string` otherwise.
*/
 releaseNotes?: string | Array<ReleaseNoteInfo> | null
  • Solution:
Electron.AutoUpdater.AutoDownload = false;
Electron.AutoUpdater.AutoInstallOnAppQuit = false;
Electron.AutoUpdater.FullChangelog = true;
Electron.AutoUpdater.OnUpdateAvailable += info =>   _logger.LogInformation("Update available: {Version}", info.Version);

Steps to Reproduce:

  1. Run await CheckForUpdatesAsync with FullChangelog = false
  2. See the result is never returned (emit fails)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions