Conversation
…llyChecksForUpdates Fixes #9662 - Only checkForUpdatesInBackground when automaticallyChecksForUpdates Prevents calling -[SPUUpdater checkForUpdatesInBackground] when Sparkle's automaticallyChecksForUpdates is NO, which caused incorrect behavior and a Sparkle console warning (fixes #9662). Also refactors backgroundCheckForUpdate() into guard-style early returns so each condition produces its own precise log message. Signed-off-by: Iva Horn <iva.horn@nextcloud.com>
|
/backport to stable-4.0 |
There was a problem hiding this comment.
Pull request overview
Fixes a macOS startup warning by preventing SPUUpdater::checkForUpdatesInBackground from being called when Sparkle itself is not configured/allowed to perform automatic background checks (automaticallyChecksForUpdates == NO), which can diverge from Nextcloud’s own config on fresh installs.
Changes:
- Adds a Sparkle-side guard (
automaticallyChecksForUpdates) before running background update checks. - Refactors
backgroundCheckForUpdate()into early-return guards with more specific log messages.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Artifact containing the AppImage: nextcloud-appimage-pr-9744.zip Digest: To test this change/fix you can download the above artifact file, unzip it, and run it. Please make sure to quit your existing Nextcloud app and backup your data. |
|
|
/backport to stable-33.0 |



Fixes #9662
Problem
On macOS, Sparkle would log the following warning at startup:
This happened because
backgroundCheckForUpdate()calledcheckForUpdatesInBackgroundrelying solely on Nextcloud's own config (autoUpdateCheck) — without consulting Sparkle's ownautomaticallyChecksForUpdatesproperty. The two settings have independent sources of truth:config.autoUpdateCheck()reads from Nextcloud'sQSettings-backed config file, whileautomaticallyChecksForUpdatesis managed by Sparkle inNSUserDefaultsand reflects whether Sparkle has been initialised and granted permission by the user. They can diverge, for example on a fresh install before Sparkle has shown its first-run permission prompt.Fix
automaticallyChecksForUpdatesas a third guard inbackgroundCheckForUpdate(), preventing the call tocheckForUpdatesInBackgroundwhen Sparkle is not in a state to handle it.if/elseinto individual early-return guard blocks (each with its own log message) so that logs precisely identify which condition prevented the background check from running.