chore(desktop): upgrade Tauri to 2.11.x to fix blank window after sleep on macOS#600
Merged
Merged
Conversation
6927615 to
4163217
Compare
…ep on macOS macOS aggressively suspends/terminates WKWebView's WebContent process during long screen-lock/sleep. Until tauri-runtime-wry 2.11.0, there was no default handler for this, so on resume the Tauri window remained alive but the webview rendered blank with no JS context — only an app restart recovered it. tauri-runtime-wry 2.11.x ships a default macOS/iOS handler that calls webview.reload() on web content process termination (via the new wry webViewWebContentProcessDidTerminate hook). We inherit this automatically by bumping the runtime. Bumps (via cargo update -p tauri --precise 2.11.1 in desktop/src-tauri): - tauri 2.10.3 -> 2.11.1 - tauri-runtime 2.10.1 -> 2.11.1 - tauri-runtime-wry 2.10.1 -> 2.11.1 - wry 0.54.4 -> 0.55.1 - tao 0.34.8 -> 0.35.2 - tauri-build 2.5.6 -> 2.6.1 - tauri-utils 2.8.3 -> 2.9.1 - @tauri-apps/api ~2.10 -> ~2.11 - @tauri-apps/cli ~2.10 -> ~2.11 Verified: - cargo check / clippy --no-deps / fmt --check on desktop/src-tauri: clean - pnpm typecheck / lint / build on desktop/: clean Refs: tauri-apps/tauri#10662, tauri-apps/tauri#14523, tauri-apps/wry#1619 Signed-off-by: Tyler Longwell <109685178+tlongwell-block@users.noreply.github.com>
4163217 to
605469c
Compare
This was referenced May 28, 2026
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.
What
Bumps the desktop Tauri runtime to 2.11.x.
tauritauri-runtimetauri-runtime-wrywrytaotauri-build@tauri-apps/api~2.10~2.11@tauri-apps/cli~2.10~2.11Why
After leaving the laptop locked/asleep for a long while, the Sprout window comes back blank and only a full app restart recovers it.
Root cause is a known WKWebView behavior on macOS: the OS aggressively suspends/terminates a backgrounded WebContent process to reclaim memory. When the user returns, the Tauri
NSWindowis still alive but its webview is empty, with no JS context to recover from.Until tauri-runtime-wry 2.11.0, wry had no plumbing for the underlying
webViewWebContentProcessDidTerminatedelegate, so apps had no chance to react. 2.11.x ships a default macOS/iOS handler that callswebview.reload()on web content process termination, so the window self-heals after a wake — exactly the recovery this bug needs. Sprout requires no app-side changes to opt in; the fix is inherited by bumping the runtime.Confirmed by reading the released crate source (
tauri-runtime-wry-2.11.1/src/lib.rsregisters a defaultwith_on_web_content_process_terminate_handlerthat logs and reloads; that code is absent in 2.10.1).Related upstream:
How
desktop/src-tauri/Cargo.tomlalready specifies caret-2 for all tauri-* crates, so no manifest edits were needed — only the lockfile moved.Verified locally
cargo checkondesktop/src-tauri: cleancargo clippy --no-deps: clean (33 pre-existing warnings, none new)cargo fmt --check: cleanpnpm typecheck: cleanpnpm lint(biome): cleanpnpm build(vite): cleandesktop-check,desktop-tauri-check,desktop-build,rust-clippy,rust-tests,mobile-check,mobile-test,web-build): all greenSmoke test plan for the bug itself
Console.appfiltered to the Sprout process should showweb content process terminatedfrom Tauri's default handler at the moment it triggers.Risk
Low. Caret-2 already allowed 2.11 on the next
cargo update; this PR just makes it deliberate. Plugin crates and Tauri's own API surface are additive between 2.10→2.11. Two areas worth a manual eyeball before merge:sprout://deep link from another app still focuses the running instance.Out of scope (worth doing separately)
ErrorBoundaryindesktop/src. If anything throws on wake-time re-render the tree unmounts → same blank-screen symptom from a different cause. Worth adding regardless of this bump.prevent_sleep.rsusesPreventUserIdleSystemSleepwhich keeps the system awake while agents are active but does not prevent the WebContent process from being jetsam'd on lid-close/lock. The Tauri upgrade is the right place to fix that; nothing to change inprevent_sleep.