Repository navigation
fix(app): a browser tab on a port with nothing listening no longer crashes the app - #44
Merged
Merged
Conversation
…ashes the app The console watcher polled Webview::url twice a second. wry's url() unwraps WKWebView.URL, which is nil after a failed load (connection refused), so the panic aborted the app, and the restored tab crashed every launch after. The watcher now reads location.href through the drain question it already sends. Fixes #36 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Fixes #36.
What broke
watch_consolepolledwv.url()every 500 ms. On macOS, wry'surl()doeswebview.URL().unwrap()(tauri-apps/wry#1752), andWKWebView.URLis nil after a load that failed, such ashttp://localhost:3000with no server. The panic aborted the app, and because the tab is restored on launch, every later launch crashed too.The fix
We no longer call
Webview::url. The drain question the watcher already sends to the page now returnslocation.href, a newline, then the console report.split_drainsplits that answer and ignores anything that isn't http(s), such as theabout:blanka pane is left on when its first load fails. Client-side route changes ("moved") still reach the address bar as before. They now share the drain's one-question-at-a-time gate, so a page stuck in a busy loop updates its address up to 5 s late.Checks
cargo check, pluscargo test --lib browser(a new unit test forsplit_drain)docs-sitebuild (changelog bullet)🤖 Generated with Claude Code