Skip to content

fix(desktop): merge updater plugin config into base tauri.conf.json (closes #6270)#6283

Merged
houko merged 1 commit into
mainfrom
fix/desktop-updater-config
Jun 23, 2026
Merged

fix(desktop): merge updater plugin config into base tauri.conf.json (closes #6270)#6283
houko merged 1 commit into
mainfrom
fix/desktop-updater-config

Conversation

@houko

@houko houko commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Problem

Closes #6270. The desktop app crashes on launch with plugins.updater is null (PluginInitialization("updater", "invalid type: null, expected struct Config"), exit 101).

The updater plugin is registered unconditionally for every desktop target (crates/librefang-desktop/src/lib.rs:322, inside #[cfg(desktop)]), but its only config block (plugins.updater) lived in crates/librefang-desktop/tauri.desktop.conf.json — an overlay that:

  • no build ever passes via --config (zero references in release.yml / release-desktop.yml or anywhere else), and
  • Tauri's auto-merge convention never loads (it only merges tauri.<windows|linux|macos>.conf.json, not tauri.desktop.conf.json).

generate_context!() bakes in the base tauri.conf.json only, which had no plugins key at all, so the updater plugin initializes against a missing config and panics. Windows was reported first, but the overlay is dead on every desktop platform — Linux/macOS bundles crash identically.

Fix

  • Move the plugins.updater block into the base crates/librefang-desktop/tauri.conf.json (always present in generate_context!()).
  • Delete the orphan tauri.desktop.conf.json. Its identifier was already identical to the base (ai.librefang.desktop), so nothing else changes.

Mobile is unaffected: the updater plugin is cfg-gated out at the Rust level (updater.rs is #![cfg(not(ios/android))], registration is #[cfg(desktop)]) and mobile builds use their own tauri.android/ios.conf.json overrides.

Verification

  • tauri.conf.json validated as well-formed JSON; identifier unchanged.
  • Config-only change to a platform-independent launch crash (the missing key panics init on every desktop OS before any endpoint probe), so the desktop build lanes in CI exercise it. Could not build the Tauri bundle locally (no desktop toolchain here).

Out of scope

The reporter's secondary note (the latest.json updater endpoint 404) is separate and already mitigated — updater.rs::manifest_reachable() HEAD-probes the endpoint and skips the background check on 404. Making auto-update actually deliver needs a signed latest.json from the release pipeline (TAURI_SIGNING_PRIVATE_KEY), which is release-infra, not this code fix.

…loses #6270)

The desktop app registers the updater plugin unconditionally for all desktop targets (`lib.rs:322`, inside `#[cfg(desktop)]`), but the only `plugins.updater` config block lived in `tauri.desktop.conf.json` — an overlay that no build ever merges and that Tauri's auto-merge convention (which only loads `tauri.<windows|linux|macos>.conf.json`) never picks up. `generate_context!()` bakes in `tauri.conf.json` only, so at launch the updater plugin's initializer deserializes the missing `plugins.updater` as `null` into its non-optional `Config` and panics ("invalid type: null, expected struct Config"), crashing the app on startup.

Windows was reported first (#6270) but every desktop platform crashes identically, since the overlay is dead on all of them.

Fold the `plugins.updater` block into the base `tauri.conf.json` (always present in `generate_context!()`) and delete the orphan overlay. The overlay's `identifier` was already identical to the base, so nothing else changes. Mobile is unaffected: the updater plugin is cfg-gated out at the Rust level and mobile uses its own `tauri.android/ios.conf.json` overrides.
@github-actions github-actions Bot added size/S 10-49 lines changed no-rust-required This task does not require Rust knowledge labels Jun 23, 2026
@houko
houko merged commit 2aca289 into main Jun 23, 2026
32 checks passed
@houko
houko deleted the fix/desktop-updater-config branch June 23, 2026 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-rust-required This task does not require Rust knowledge size/S 10-49 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows desktop setup fails to launch: plugins.updater is null

1 participant