Skip to content

Cross-port localhost WebSocket fails in in-app browser #1452

Closed

Description

@seancxk

Problem

A local web app served from one localhost port cannot establish a WebSocket connection to a different localhost port in bb's in-app browser.

The page's HTML/JS loads correctly, but data that depends on the WebSocket remains pending and the UI stays on "Loading…" indefinitely.

The same URL works normally in Chrome and Safari.

Repro

  1. Run a local app with its frontend and WebSocket backend on different localhost ports. For example:

    • Vite dev server: 127.0.0.1:3009
    • Convex local backend: 127.0.0.1:3210
  2. Open http://127.0.0.1:3009 in bb's in-app browser.

  3. The page shell renders, but live queries remain pending.

  4. Open the same URL in Chrome or Safari.

  5. The app loads normally.

This example uses Convex, but the issue appears to be with cross-port localhost WebSocket connections rather than Convex specifically.

Vite's HMR WebSocket works because it uses the same port as the page.

Expected

Pages opened in the in-app browser should be able to establish WebSocket connections to other localhost ports, as they can in Chrome and Safari.

Environment

  • bb 0.37.0
  • macOS (Darwin 25.5.0)

Activity

  1. added 2 commits that reference this issue on Aug 13, 2026
    dd65a45
    2481fea
  2. added a commit that references this issue on Aug 13, 2026
    51bc134
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