Skip to content

browse open rejects bracketed IPv6 addresses without a URL scheme #3582

Backlog

Description

@raunakpandey1
  • Checked the CLI docs and existing issues and PRs.

Environment Information

  • Stagehand component: browse CLI 0.12.0, built from main at 2290e72aeecea208ca9fe11c941c74b4480326f4.
  • Local Chrome on macOS arm64, Node 22.23.5. No model or provider involved.

Issue Description

browse open accepts bare IPv4 loopback addresses for local development. The equivalent bracketed IPv6 address is rejected before Chrome reaches the page. An explicit URL for the same IPv6 server works.

Steps to Reproduce

  1. Run the local IPv6 HTTP server below.
  2. In another terminal, run browse open 'http://[::1]:8787/' --local --session ipv6-repro. It opens the fixture.
  3. Run browse open '[::1]:8787/' --local --session ipv6-repro. It exits with code 1. It should infer http:// for the IPv6 loopback endpoint.

Minimal Reproduction Code

node -e 'require("node:http").createServer((req, res) => { res.setHeader("content-type", "text/html"); res.end("<title>IPv6 fixture</title><h1>Reached the local server</h1>"); }).listen(8787, "::1")'

Error Messages / Log trace

-32000 Cannot navigate to invalid URL

Screenshots / Videos

The command exits before the page loads. The explicit URL returned the fixture's title and URL in the CLI response.

Related Issues

Related to #3574. That issue is about which commands call the URL normalizer. This failure occurs in browse open, which already calls it. The fix for #3574 in #3577 changes the tab new caller.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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