fix(desktop): merge updater plugin config into base tauri.conf.json (closes #6270)#6283
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 incrates/librefang-desktop/tauri.desktop.conf.json— an overlay that:--config(zero references inrelease.yml/release-desktop.ymlor anywhere else), andtauri.<windows|linux|macos>.conf.json, nottauri.desktop.conf.json).generate_context!()bakes in the basetauri.conf.jsononly, which had nopluginskey 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
plugins.updaterblock into the basecrates/librefang-desktop/tauri.conf.json(always present ingenerate_context!()).tauri.desktop.conf.json. Itsidentifierwas 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.rsis#![cfg(not(ios/android))], registration is#[cfg(desktop)]) and mobile builds use their owntauri.android/ios.conf.jsonoverrides.Verification
tauri.conf.jsonvalidated as well-formed JSON;identifierunchanged.Out of scope
The reporter's secondary note (the
latest.jsonupdater 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 signedlatest.jsonfrom the release pipeline (TAURI_SIGNING_PRIVATE_KEY), which is release-infra, not this code fix.