fix(daemon): re-attach on 'no close frame' WebSocket error#347
Open
jerichoBob wants to merge 1 commit into
Open
fix(daemon): re-attach on 'no close frame' WebSocket error#347jerichoBob wants to merge 1 commit into
jerichoBob wants to merge 1 commit into
Conversation
Extends stale-session recovery to also trigger on "no close frame received or sent" — the error raised when a tab's DevTools session closes without a proper WS close handshake. Previously only "Session with given id not found" triggered re-attach, leaving stale sessions from closed/navigated tabs unrecovered. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
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.
Problem
When a Chrome tab's DevTools session closes without a proper WebSocket close handshake (e.g., tab navigated away, closed, or Chrome killed the session), the
websocketslibrary raises:The daemon's stale-session recovery in
handle()only matched"Session with given id not found"— so this error bypassed re-attach and propagated back to the caller as a hard failure.Fix
Add
"no close frame"to the stale-session condition so both error strings triggerattach_first_page()and retry:Impact
Summary by cubic
Handle stale DevTools sessions by re-attaching when
websocketsraises "no close frame received or sent" after a tab closes or navigates. This prevents hard failures and matches the existing behavior for "Session with given id not found".Written for commit e8d11b5. Summary will update on new commits.