Skip to content

[chromium-headless]: fix headless browsers start with no pages#104

Merged
archandatta merged 2 commits intomainfrom
archand/kernel-638/fix-breaking-target
Dec 12, 2025
Merged

[chromium-headless]: fix headless browsers start with no pages#104
archandatta merged 2 commits intomainfrom
archand/kernel-638/fix-breaking-target

Conversation

@archandatta
Copy link
Contributor

@archandatta archandatta commented Dec 12, 2025

This PR address a bug with creating headless browsers with --no-startup-window flag causing breaking Target.createTarget CDP calls.

Ticket

Testing

  • run the TestCDPTargetCreation test. Test should pass with initial_page_count=1
  • re-add --no-startup-window in wrapper.sh, rebuild the docker image in images/chromium-headless and rerun the TestCDPTargetCreation test, the test should fail

Note

Removes the --no-startup-window flag so headless Chromium starts with a page, and adds an e2e test that verifies CDP target creation.

  • Chromium headless image:
    • Remove --no-startup-window from default CHROMIUM_FLAGS in images/chromium-headless/image/wrapper.sh to ensure an initial page target exists.
  • E2E tests:
    • Add TestCDPTargetCreation in server/e2e/e2e_chromium_test.go to assert at least one page target via CDP.
    • Add listCDPTargets helper to query http://localhost:9223/json/list.

Written by Cursor Bugbot for commit d5c4556. This will update automatically on new commits. Configure here.

@archandatta archandatta requested a review from rgarcia December 12, 2025 15:18
@archandatta archandatta force-pushed the archand/kernel-638/fix-breaking-target branch from de6a647 to d5c4556 Compare December 12, 2025 16:23
@archandatta archandatta merged commit 008ece0 into main Dec 12, 2025
5 checks passed
@archandatta archandatta deleted the archand/kernel-638/fix-breaking-target branch December 12, 2025 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants