Skip to content

[BUG] Chrome launcher crashes on extension target discovery timeout due to temporarily unhandled waitForTarget rejection #55

Description

@IkariDevGIT

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions