Skip to content

Track upstream: macOS invoke promise can be orphaned on webview teardown (tauri#12338) #27

Description

@anbturki

Upstream issue, tracked here for visibility. Code analysis only: not reproduced in this app.

Problem

On macOS, an in-flight invoke can be orphaned when the webview navigates or is torn down, so the promise never settles. Upstream report: tauri-apps/tauri#12338 (Tauri 2.2.1 / wry 0.48.0), where the response callback runs after the webview context has become invalid, panicking inside wry::wkwebview::class::url_scheme_handler::start_task under AssertUnwindSafe (so it aborts rather than unwinding).

Relevance

Any UI state gated on an unsettled promise stays pending forever. This is the same failure shape as #23 (a tab pinned on "Loading"), which is why it is worth tracking even though our fix covers the common case.

Current mitigation

The 15s load timeout added in #23 (src/hooks/useTabs.ts) already converts an unsettled read into a retryable error, so the tab surface is covered. Not covered: the workspace scan (scan_markdown is spawn_blocking with no timeout, src-tauri/src/tauri_api/mod.rs), which would leave the sidebar spinner running indefinitely.

Suggested action

Track the upstream fix and confirm our Tauri/wry versions include it once released. Optionally extend the timeout-and-retry pattern from #23 to the scan command so no long-lived IPC call can strand UI state.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions