Updater: cannot switch from the beta channel back to stable

Open
#455 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 5 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp
Domain
desktop, release

Research direction

Start with src/Genie.App/Services/CoreAppUpdater.cs, especially its constructor and StageOnExitAsync, then trace how UpdatesDialogViewModel selects a channel and presents check results. Check Velopack's downgrade option and whether settings remain readable after returning to an older release. Done when switching from a beta to stable offers the stable version with a clear explanation, while stable installs and auto-apply do not downgrade unexpectedly.

Written by the indexing model from the issue text.

Description

area:updater bug P2

What happens

Once an install has updated to a beta build, setting Channel back to stable in Help ▸ Check for Updates does not take it back to the stable release. The check reports "Core is up to date." and the Update button stays disabled, so the install stays on the beta build.

Today that means anyone who moved to 5.0.1-beta.1 or 5.0.1-beta.2 to test cannot return to 5.0.0 from inside the app. The only way back is to uninstall and reinstall from the v5.0.0 release.

Steps to reproduce

  1. Start on 5.0.0 (stable channel).
  2. Help ▸ Check for Updates, set Channel to beta, check, and update. Help ▸ About Genie 5 now shows 5.0.1-beta.2.
  3. Open Help ▸ Check for Updates again and set Channel to stable.
  4. Click the Core check.

Expected: 5.0.0 is offered, and updating installs it.

Actual: "Core is up to date." Nothing is offered.

Cause

The channel switch itself works: UpdatesDialogViewModel saves the channel and rebuilds CoreAppUpdater with prerelease: false, so the feed now only contains stable releases. The newest of those is 5.0.0, which is a lower version than the installed 5.0.1-beta.2. The update check only ever offers a higher version, so it returns nothing, and CoreAppUpdater.CheckAsync reports that as "Up to date."

CoreAppUpdater builds its UpdateOptions with only ExplicitChannel set (src/Genie.App/Services/CoreAppUpdater.cs, constructor). Downgrades are never allowed, so a channel switch can only ever move forward.

The same applies to the auto-apply path (StageOnExitAsync), which uses the same check.

Scope

  • Affects every platform, since the version comparison is the same everywhere.
  • It is temporary per release cycle: once 5.0.1 ships as stable it is a higher version than 5.0.1-beta.2, so beta installs on the stable channel will be offered it normally. Until then they are held on the beta.
  • It was not visible before 5.0.0, because every build was a pre-release and there was no stable release to go back to.

Suggested direction

  • When the selected channel is stable and the installed build is a pre-release, allow the check to offer the latest stable release even though it is a lower version (Velopack has an AllowVersionDowngrade option on UpdateOptions for this). It should not apply when the installed build is already stable, and should not be used by auto-apply without the user asking for it.
  • Say what is happening in the dialog: "You are on 5.0.1-beta.2. Switching to stable will install 5.0.0." rather than "Up to date."
  • Settings written by the newer build have to load in the older one. Worth a check before offering the downgrade.
  • Until this is fixed, the test notes for a beta should say how to get back (reinstall from the stable release).
Dominant language
C#
Stars
2
Forks
5
Avg merge
4d 3h
Merged PRs (30d)
22

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GenieClient/Genie5

All issues in GenieClient/Genie5

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.