Skip to content

fix(opener): avoid blocking-runtime panic in reveal_item_in_dir - #3565

Merged
lucasfernog merged 3 commits into
tauri-apps:v2from
cyclone-mind:fix/opener-reveal-item-blocking-panic
Oct 13, 2026
Merged

lucasfernog merged 3 commits into
tauri-apps:v2from
cyclone-mind:fix/opener-reveal-item-blocking-panic

Conversation

@cyclone-mind

Copy link
Copy Markdown
Contributor

On Linux, reveal_items_in_dir opens a blocking zbus connection
(zbus::blocking::Connection::session()). The reveal_item_in_dir command runs
that synchronously on the async runtime's worker thread, which panics with
"Cannot start a runtime from within a runtime" — the JS promise then just hangs,
no rejection ever reaches the frontend.

Wrapped the call in tauri::async_runtime::spawn_blocking so it runs off the
async worker thread. Same fix the issue reporter already confirmed works as an
app-side workaround, just moved into the plugin so nobody has to hand-roll it.

Fixes #3552

Verified with cargo check / cargo fmt --check / cargo clippy on the opener
crate — all clean. Don't have a Linux box handy to reproduce the actual panic,
but the change is a direct port of the reporter's verified workaround.

Added a .changes entry per the repo's covector convention.

@cyclone-mind
cyclone-mind requested a review from a team as a code owner September 1, 2026 09:23
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Package Changes Through 2c35939

There are 19 changes which include barcode-scanner with patch, barcode-scanner-js with patch, biometric with minor, biometric-js with minor, deep-link with patch, deep-link-js with patch, fs with patch, fs-js with patch, notification with minor, notification-js with minor, opener with patch, opener-js with patch, single-instance with patch, sql with minor, sql-js with minor, torch with minor, torch-js with minor, updater with minor, updater-js 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
api-example 2.0.55 2.0.56
api-example-js 2.0.51 2.0.52
deep-link-example-js 2.2.16 2.2.17
barcode-scanner 2.5.2 2.5.3
barcode-scanner-js 2.5.2 2.5.3
biometric 2.4.2 2.5.0
biometric-js 2.4.2 2.5.0
deep-link 2.6.1 2.6.2
deep-link-js 2.6.1 2.6.2
fs 2.7.0 2.7.1
fs-js 2.7.0 2.7.1
dialog 2.8.2 2.8.3
dialog-js 2.8.2 2.8.3
opener 2.7.1 2.7.2
opener-js 2.7.1 2.7.2
http 2.8.2 2.8.3
http-js 2.8.2 2.8.3
notification 2.6.0 2.7.0
notification-js 2.6.0 2.7.0
persisted-scope 2.4.1 2.4.2
single-instance 2.5.3 2.5.4
sql 2.5.0 2.6.0
sql-js 2.5.0 2.6.0
updater 2.13.3 2.14.0
updater-js 2.13.3 2.14.0
torch 2.0.0 2.1.0
torch-js 2.0.0 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

Move the runtime-panic fix into the Linux/BSD implementation so the
public Rust APIs are covered too, not just the JS command, and propagate
the spawn_blocking join error via the existing Tauri error variant.
@lucasfernog
lucasfernog merged commit 1ab9304 into tauri-apps:v2 Oct 13, 2026
23 checks passed
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.

[bug][opener] revealItemInDir panics on Linux: blocking zbus connection inside the async command ('Cannot start a runtime from within a runtime')

3 participants