Skip to content

馃悶 Handle missing PDF summary relay receivers - #209

Open
JFWooten4 wants to merge 2 commits into
mainfrom
fix/summarize-port-disconnect
Open

JFWooten4 wants to merge 2 commits into
mainfrom
fix/summarize-port-disconnect

Conversation

@JFWooten4

Copy link
Copy Markdown
Member

Problem

Chrome can report Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist. when the viewer's PDF-summary port disconnects without an available receiving listener. The viewer's disconnect callback did not read chrome.runtime.lastError, leaving that failure unconsumed.

Change

  • Read chrome.runtime.lastError synchronously in the summary port's disconnect handler.
  • Clear the pending transfer timeout and reject/reset an outstanding chunk acknowledgement on disconnect.
  • Add a test simulating a missing receiver, asserting that the disconnect listener consumes the error.

Scope and verification

  • Verified the branch differs from main in the intended viewer and test files.
  • This fixes a concrete unchecked-error path, but src/viewer.html:0 alone does not identify the initiating extension script; if the warning persists without using Summarize with ChatGPT, other extension messaging sources should be investigated.
  • Automated tests have not been executed locally.

JFWooten4 and others added 2 commits October 20, 2026 00:54
Consume Chrome's connection error in the PDF summary port's disconnect handler, release its timer, and reject pending acknowledgements without leaving a stale resolver.

Co-authored-by: Codex Web <noreply@openai.com>
Add a regression case that simulates a failed viewer connection and verifies that the disconnect callback consumes Chrome's runtime error.

Co-authored-by: Codex Web <noreply@openai.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant