fix(desktop): use the built-in updater/process plugins (fixes the ACL dead end)#63
Merged
Conversation
…tom commands The custom updater_check/updater_install commands could never work from the window's content: it's served over HTTP (remote to Tauri), and custom commands have no ACL permission to grant remote content, so invoke() was silently denied. Switch to the standard tauri-plugin-updater + tauri-plugin-process, driven from the web UI via their JS APIs (check / downloadAndInstall / relaunch), lazily imported behind window.isTauri so the browser build never loads them. Grant updater:default + process:default in the capability (which already allows the localhost remote URL) — plugin commands *do* have permissions, so the ACL can authorize them. Enable devtools in release so webview/ACL errors are inspectable while the shell is young.
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.
Root cause of the whole saga: I hand-rolled custom
updater_check/updater_installcommands to avoid the plugin JS deps — but custom commands have no ACL permission you can grant to remote content, and the window loads the app over HTTP (remote to Tauri), soinvoke()was silently denied. My earlier "debug verified" was a false positive becausetauri devtreats the dev URL as trusted local, so the ACL was never exercised.Fix: use the standard
tauri-plugin-updater+tauri-plugin-processvia their JS APIs, and grantupdater:default+process:defaultin the capability (which already has theremote.urlsgrant). Plugin commands have permissions, so the ACL can authorize them for the remote webview.window.isTauri, never loaded in the browser build.devtoolsin release so any remaining webview/ACL error is inspectable (right-click → Inspect → Console).