Session.invalidate() leaves in-flight CDP calls pending
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- backend
Research direction
Search the TypeScript source for Session.invalidate(), the WebSocket close listener, and the pending call collection. Reproduce an in-flight CDP call during invalidation, then add or update a test to verify that the call rejects with the invalidation error and no pending entry remains.
Written by the indexing model from the issue text.
Description
Description
Session.invalidate() clears this.ws before closing the socket. The close listener then treats that socket as superseded and returns without rejecting entries in pending, so an in-flight CDP call can remain pending forever.
Plugins
None
OpenCode version
main at e634099
Steps to reproduce
- Connect a
Sessionto a WebSocket endpoint. - Start a CDP call that does not receive a response.
- Call
session.invalidate(error). - Observe that the call never settles. It should reject with the invalidation error.
Screenshot and/or share link
No response
Operating System
macOS
Terminal
Codex desktop
- Dominant language
- TypeScript
- Stars
- 737
- Forks
- 87
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from browser-use/browsercode
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
browser-use/browsercode#132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
browser-use/browsercode#130 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
browser-use/browsercode#131 ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
browser-use/browsercode#101 · 1 comment ·
All issues in browser-use/browsercode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·