install_extension / uninstall_extension abandon the operation at 30 s and leave the timer uncleared
Maintainers usually reply within 1 day
@amirkhakshour is already working on this.
Since Nov 24, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- devtools
Research direction
Start in src/McpContext.ts at installExtension and uninstallExtension, and compare them with the timer handling in getDevToolsData around lines 724-741. The reload_extension path in src/tools/extensions.ts goes through installExtension, so check it too. Done means both timers are cleared in a finally and the timeout either cancels the operation or says in the error that it may still complete. Open PR #3611 already targets this, so check it before starting.
Written by the indexing model from the issue text.
Description
Description of the bug
install_extension and uninstall_extension race the real operation against a 30 s timer, report failure when the timer wins, and leave the operation running. The timer is never cleared on the success path either.
// src/McpContext.ts:1115-1134
async installExtension(extensionPath: string): Promise<string> {
const id = await Promise.race([
this.browser.installExtension(extensionPath),
new Promise<string>((_, rej) =>
setTimeout(() => rej(new Error('Timeout installing extension')), 30000),
),
]);
return id;
}
async uninstallExtension(id: string): Promise<void> {
await Promise.race([
this.browser.uninstallExtension(id),
new Promise<void>((_, rej) =>
setTimeout(() => rej(new Error('Timeout uninstalling extension')), 30000),
),
]);
}
Three consequences:
- Reported state diverges from actual state. The caller is told the install failed;
browser.installExtensionkeeps running and may succeed. A laterlist_extensionsshows the "failed" extension. - A retry races the abandoned attempt. Nothing cancels the first call, so two concurrent installs of the same path are possible.
- The timer outlives the call. On success the 30 s
setTimeoutis still pending — it fires into aPromise.racethat already settled, so it is silently swallowed, but the timer and its closure stay alive for 30 s per call.getDevToolsDatain the same file shows the intended shape (src/McpContext.ts:724-741): keep the id andclearTimeoutin afinally.
reload_extension inherits the same behaviour — it calls context.installExtension directly (src/tools/extensions.ts:92).
Reproduction
install_extensionwith a large unpacked extension directory on a slow disk (or a cold network filesystem) so the browser call takes longer than 30 s:
install_extension { "path": "/path/to/large-unpacked-extension" }
# => error: "Timeout installing extension"
list_extensions
# => the extension is listed as installed
reload_extensionon the same extension shows the same pattern, because it goes throughinstallExtension.
Expectation
Either the operation is cancelled when the deadline passes (so "failed" is true), or the tool waits for it and reports the real outcome. Reporting failure for work that continues is the one option that leaves the caller unable to reason about state.
Fix shape
clearTimeoutin afinallyand keep both timer handles, mirroringgetDevToolsData(src/McpContext.ts:724-741).- Decide the semantics for the timeout: propagate an
AbortSignalintobrowser.installExtension/uninstallExtensionif Chrome's API allows cancelling, or state in the error that the operation may still complete and the caller should re-check withlist_extensions.
Chrome DevTools MCP version
1.13.0 (commit 92250bc)
Notes
Found by an automated multi-lens audit run (mini-ork); three of the four analysis lenses reached this finding independently, and I confirmed it in src/McpContext.ts and src/tools/extensions.ts at 92250bc. Not run here (no Chrome in the audit environment), so the 30 s boundary is read from the constant rather than observed.
- Dominant language
- TypeScript
- Stars
- 59.8k
- Forks
- 4.8k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 162
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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 ChromeDevTools/chrome-devtools-mcp
-
feature
Difficulty 1/5 Under an hour Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#3689 ·
Maintainers usually reply within 1 day
-
`evaluate_script` `sourcePath` http(s) URLs are mangled into `file://` pathsMay be free again A pull request for this issue was closed without being merged. Opencollecting-feedback
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#3453 · 3 comments ·
Maintainers usually reply within 1 day
-
collecting-feedback feature
Difficulty 2/5 Half a day Newbie friendliness 76/100
ChromeDevTools/chrome-devtools-mcp#3225 · 3 comments ·
Maintainers usually reply within 1 day
-
confirmed p3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ChromeDevTools/chrome-devtools-mcp#2947 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
ChromeDevTools/chrome-devtools-mcp#3648 ·
Maintainers usually reply within 1 day
All issues in ChromeDevTools/chrome-devtools-mcp
Similar issues
-
bug from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
nightly-labs/openbot#21303 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
ADORSYS-GIS/CoopData#282 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OHDSI/Data2Evidence#3816 ·
Maintainers usually reply within 3 days
-
`ovsx verify` fails for a version older than the 100 newest of an extensionPossibly taken @trivikr claimed this today. Opencli
Difficulty 2/5 1-3 hours Newbie friendliness 81/100
eclipse-openvsx/openvsx#2482 · 2 comments ·
Maintainers usually reply within 1 day
-
bug builder-vite hmr sev:S3
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
storybookjs/storybook#37965 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day