ArchiveBox / ArchiveBox/abx-plugins
[BUG] Chrome launcher crashes on extension target discovery timeout due to temporarily unhandled waitForTarget rejection
- Dominant language
- Python
- Stars
- 14
- Forks
- 3
- Avg merge
- 3h 12m
- Merged PRs (30d)
- 15
Description
## Description
The crawl-scoped Chrome launcher crashes when an unpacked extension's MV3 service-worker target is not discovered within the 2-second timeout.
Environment:
- ArchiveBox 0.9.35rc190
Chrome starts successfully, but crashes while loading extensions:
> [⚙️] Loading 5 unpacked chrome extensions into browser...
> TimeoutError: Timed out after waiting 2000ms
> Node.js v24.18.0
ArchiveBox then reports:
> RuntimeError: Background hook on_CrawlSetup__90_chrome_launch.daemon.bg exited before readiness
## Cause
`waitForExtensionTargetHandle()` creates the `browser.waitForTarget()` promise, then awaits `wakeExtension()` before awaiting the target promise.
If the target promise times out during that gap, Node treats it as an unhandled rejection and terminates the process before `loadUnpackedExtensionsIntoBrowser()` can handle it as a nonfatal `target_error`.
## Expected behavior
Failure to attach to an extension target should log the existing warning, record `extension.target_error`, and continue without killing Chromium or the crawl runner.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating waitForExtensionTargetHandle() and loadUnpackedExtensionsIntoBrowser(), then trace how browser.waitForTarget() and wakeExtension() interact. Reproduce the extension target discovery timeout and verify that the existing warning and extension.target_error are recorded while Chromium and the crawl runner continue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100