Skip to content

fix: surface commands that are unreachable due to missing permissions - #15941

Open
gronke wants to merge 3 commits into
tauri-apps:devfrom
gronke:fix/surface-unreachable-commands
Open

fix: surface commands that are unreachable due to missing permissions#15941
gronke wants to merge 3 commits into
tauri-apps:devfrom
gronke:fix/surface-unreachable-commands

Conversation

@gronke

@gronke gronke commented Aug 29, 2026

Copy link
Copy Markdown
Member

A command listed in generate_handler! but missing from the plugin's COMMANDS build-script list is silently unreachable: no permission is generated, so no capability can grant it, and every invoke is rejected at runtime with nothing on the host side.

Two changes:

  • generate_handler! prints a build-time warning when a registered command is not referenced by any permission of the crate (plugin COMMANDS or hand-written permission files). Fail-open: crates without defined permissions stay silent, REMOVE_UNUSED_COMMANDS flow unchanged, renamed commands called out in the message. Probes the permission-file lists written by tauri-plugin (external plugins), tauri-build (inlined plugins, app manifest) and the tauri crate (core plugins).
  • ACL denials are now logged host-side via log::error! (rich resolve_access_message in debug builds, short message in release); previously the reason lived only in the webview's rejected promise, which frontends routinely swallow.

Closes #15940

gronke added 3 commits August 28, 2026 18:06
The ACL rejection was only visible in the webview's rejected promise,
which frontends routinely swallow. The same message now goes to
log::error!.
…any permission

A command listed in generate_handler! but missing from the plugin's
COMMANDS list (or any hand-written permission) is silently
unreachable: no permission exists, so no capability can grant it.
generate_handler! now prints a warning naming the command. Fail-open:
crates without defined permissions stay silent, and the
REMOVE_UNUSED_COMMANDS flow is unchanged.
@gronke
gronke requested a review from a team as a code owner August 29, 2026 09:53
@github-actions

Copy link
Copy Markdown
Contributor

Package Changes Through c0fd20a

There are 14 changes which include tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-build with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-bundler with minor, tauri-macos-sign with minor, @tauri-apps/api with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.11.1 2.12.0
tauri-utils 2.9.3 2.10.0
tauri-macos-sign 2.3.4 2.4.0
tauri-bundler 2.9.4 2.10.0
tauri-runtime 2.11.3 2.12.0
tauri-runtime-wry 2.11.4 2.12.0
tauri-codegen 2.6.3 2.7.0
tauri-macros 2.6.3 2.7.0
tauri-plugin 2.6.3 2.7.0
tauri-build 2.6.3 2.7.0
tauri 2.11.5 2.12.0
@tauri-apps/cli 2.11.4 2.12.0
tauri-cli 2.11.4 2.12.0
tauri-driver 2.0.6 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A command in invoke_handler but absent from COMMANDS is silently unreachable, with no build-time warning

1 participant