-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem (one or two sentences)
Two reliability issues in src/core/webview/ClineProvider.ts:
postMessageToWebview()does not catch rejections fromthis.view?.webview.postMessage(...). If the webview is disposed before delivery, this can surface as an unhandled promise rejection.dispose()is not idempotent. If called multiple times (for example during rapid deactivation/reload), it repeats cleanup work that should run once.
Context (who is affected and when)
Occurs during extension deactivation, reload, or when the panel is closed while messages are in flight. Can produce noisy errors in the Developer Tools console and/or output channel.
Reproduction steps
- Environment: Any OS, Roo Code v3.47.3.
- Start a task, then immediately close the Roo Code panel or reload the VS Code window.
- Open Developer Tools console (Help → Toggle Developer Tools → Console) and observe errors.
- For dispose: trigger extension deactivation twice in quick succession (e.g., rapid reload).
Expected result
postMessageToWebview() drops messages safely if the webview is disposed. dispose() is idempotent; subsequent calls are no-ops.
Actual result
postMessageToWebview() can produce unhandled promise rejections after disposal. dispose() re-executes cleanup on repeated calls.
Variations tried (optional)
N/A
App Version
v3.47.3
API Provider (optional)
None
Model Used (optional)
N/A
Roo Code Task Links (optional)
No response
Relevant logs or errors (optional)
Unhandled promise rejection when webview.postMessage() is called after the webview has been disposed (error text varies).Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working