← reports

#7090 · Windows hosts cannot pass Browser Automation runtime preparation

BugPriority: MediumEffort: Highpluginsdesktop Issue #70902026-11-05 · base 2d912ea09011708b6a331c1ee7a15bea6ad32970

Verdict: REPRODUCED — deterministic host runtime rejection, repeated in two clean trusted checkouts. Root-cause confidence: high.

Scope: Linux-hosted tests supply the exact native Windows platform identifiers to the real host entry and resolver. No Windows machine, Electron desktop, CLI transport, or actual browser connection was launched. Native Windows end-to-end behavior remains untested.

1. TL;DR

Browser Automation cannot prepare its execution runtime when the selected host reports Windows x64. Its installer accepts only Linux and macOS platform identifiers, so the real runtime resolver throws before any artifact download or browser process starts. Both local headless opening and opening with an existing desktop WebSocket endpoint take this same runtime path. The pinned upstream release also lists only Linux and macOS executables, so removing the platform guard alone would not produce a working Windows runtime. The desktop connection is a transport endpoint, not a replacement JavaScript execution engine.

2. Claims vs findings

ClaimStatusEvidence
A native Windows x64 host cannot prepare the DevBrowser runtime.Verified at the runtime boundaryReal host prepare rejects with the reported platform error in both checkouts; the availability assertion fails for that reason.
Desktop mode is blocked even when a browser endpoint is supplied.Verified at the host boundaryThe desktop table case supplies a syntactically valid private-loopback WebSocket URL and receives the same runtime error before it is contacted.
Local/headless mode has the same blocker.Verified at the host boundaryThe local table case omits connectionUrl and receives the same error.
The pinned release does not ship a Windows executable.Verified by metadataRead-only GitHub release metadata lists four Linux/macOS executables and SHA256SUMS; the repository pins precisely those four platforms.
The reporter's Windows desktop is registered and their external browser workaround works.UnverifiedNo access to the reporter's machine or profile; neither was needed to execute the deterministic failing guard.
Other provider-specific computer-use capabilities are unavailable.Out of scopeNo provider session or computer-use integration was exercised.

3. Environment

4. Minimal reproduction

  1. Check out the trusted commit and build the SDK and owning plugin with the commands below.
  2. Copy the inline reproduction test and its inline isolated-worker configuration below into slopcop-7090.test.ts and slopcop-7090.vitest.config.ts in plugins/browser-automation/.
  3. Run the focused test command. Its two rejection checks pass; its availability check intentionally fails. These are evidence of the existing defect, not a passing fix.
git clone https://github.com/get-bb/bb.git bb-7090
cd bb-7090
git checkout --detach 2d912ea09011708b6a331c1ee7a15bea6ad32970
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@get-bb/plugin-sdk
pnpm exec turbo run build --filter=bb-plugin-browser-automation

# Save the two inline reproduction files in plugins/browser-automation/.
pnpm --filter bb-plugin-browser-automation exec vitest run --config slopcop-7090.vitest.config.ts

The custom configuration uses sharedWorkerProjects, which isolates the test that temporarily changes process platform descriptors. Direct Vitest invocation is deliberate investigation: the existing package test script already fixes its config path and rejects a second --config argument. Upstream SDK and plugin build tasks still run through Turbo.

Expected capability: a supported native Windows host can prepare a usable browser-automation runtime. Actual: preparation rejects before installation. The stack points to runtime-pin.ts:41, not to the supplied desktop endpoint, discovery, Chrome lookup, or a network failure.

 RUN  v4.1.1 <first-checkout>/plugins/browser-automation

 ❯ |issue-7090:isolated| slopcop-7090.test.ts (3 tests | 1 failed) 20ms
     × prepares a runtime for a native Windows host 9ms

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  |issue-7090:isolated| slopcop-7090.test.ts > native Windows runtime availability > prepares a runtime for a native Windows host
AssertionError: promise rejected "Error: DevBrowser has no runtime for win3…" instead of resolving
 ❯ slopcop-7090.test.ts:77:8
     75|       await expect(
     76|         harness.experimental_call("prepare", {}),
     77|       ).resolves.toMatchObject({
       |        ^
     78|         status: "ready",
     79|       });

Caused by: Error: DevBrowser has no runtime for win32-x64; choose a Linux or macOS browser host.
 ❯ resolveRuntime runtime-pin.ts:41:11
 ❯ attachRuntime host.ts:62:18
 ❯ prepare host.ts:192:43
 ❯ Object.experimental_call ../../packages/plugin-sdk/dist/testing/host.js:66:33
 ❯ slopcop-7090.test.ts:75:7

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


 Test Files  1 failed (1)
      Tests  1 failed | 2 passed (3)
   Start at  02:43:35
   Duration  505ms (transform 202ms, setup 0ms, import 316ms, tests 20ms, environment 0ms)

undefined
<first-checkout>/plugins/browser-automation:
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command failed with exit code 1: vitest run --config slopcop-7090.vitest.config.ts
Complete reproduction test
import { randomUUID } from "node:crypto";
import { mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { experimental_createHostEntryHarness } from "@get-bb/plugin-sdk/testing/host";
import { describe, expect, it } from "vitest";
import { createHostEntry } from "./host.js";

describe("native Windows runtime availability", () => {
  it.each([
    {
      backend: "desktop",
      connectionUrl: "ws://127.0.0.1:9/devtools/browser/isolated",
    },
    { backend: "local", connectionUrl: undefined },
  ])(
    "rejects $backend before opening a browser",
    async ({ backend, connectionUrl }) => {
      const root = await mkdtemp(join(tmpdir(), "issue-7090-"));
      const platform = Object.getOwnPropertyDescriptor(process, "platform")!;
      const architecture = Object.getOwnPropertyDescriptor(process, "arch")!;
      const harness = experimental_createHostEntryHarness(createHostEntry(), {
        experimental_paths: {
          dataDir: join(root, "data"),
          tempDir: join(root, "temp"),
        },
      });
      try {
        Object.defineProperty(process, "platform", {
          ...platform,
          value: "win32",
        });
        Object.defineProperty(process, "arch", {
          ...architecture,
          value: "x64",
        });
        const result = harness.experimental_call("open", {
          sessionId: randomUUID(),
          expiresAt: Date.now() + 60_000,
          idleTimeoutMs: 30_000,
          ...(connectionUrl === undefined ? {} : { connectionUrl }),
        });
        await expect(result).rejects.toThrow(
          "DevBrowser has no runtime for win32-x64; choose a Linux or macOS browser host.",
        );
        console.log(
          `${backend}: DevBrowser has no runtime for win32-x64; choose a Linux or macOS browser host.`,
        );
        expect(harness.experimental_getRetainedWorkerLeaseCount()).toBe(0);
      } finally {
        Object.defineProperty(process, "platform", platform);
        Object.defineProperty(process, "arch", architecture);
        await harness.experimental_dispose();
        await rm(root, { recursive: true, force: true });
      }
    },
  );

  it("prepares a runtime for a native Windows host", async () => {
    const root = await mkdtemp(join(tmpdir(), "issue-7090-"));
    const platform = Object.getOwnPropertyDescriptor(process, "platform")!;
    const architecture = Object.getOwnPropertyDescriptor(process, "arch")!;
    const harness = experimental_createHostEntryHarness(createHostEntry(), {
      experimental_paths: {
        dataDir: join(root, "data"),
        tempDir: join(root, "temp"),
      },
    });
    try {
      Object.defineProperty(process, "platform", {
        ...platform,
        value: "win32",
      });
      Object.defineProperty(process, "arch", { ...architecture, value: "x64" });
      await expect(
        harness.experimental_call("prepare", {}),
      ).resolves.toMatchObject({
        status: "ready",
      });
    } finally {
      Object.defineProperty(process, "platform", platform);
      Object.defineProperty(process, "arch", architecture);
      await harness.experimental_dispose();
      await rm(root, { recursive: true, force: true });
    }
  });
});
Complete isolated-worker configuration
import { defineConfig } from "vitest/config";
import { sharedWorkerProjects } from "../../vitest.shared.js";

export default defineConfig({
  resolve: { tsconfigPaths: true },
  test: {
    projects: sharedWorkerProjects({
      pkgDir: import.meta.dirname,
      name: "issue-7090",
      include: ["slopcop-7090.test.ts"],
    }),
  },
});

No screenshot is needed: the reproduced defect is an early host RPC error, not a visual rendering defect.

5. Root cause

The platform boundary is an explicit four-value enum. currentPlatform() validates process.platform and process.arch against it, returning null for Windows.

plugins/browser-automation/installer.ts:33

export const runtimePlatforms = [
  "linux-x64",
  "linux-arm64",
  "darwin-x64",
  "darwin-arm64",
] as const;
export type RuntimePlatform = (typeof runtimePlatforms)[number];
const platformSchema = z.enum(runtimePlatforms);

export interface RuntimeRelease {
  readonly package: string;
  readonly version: string;
  readonly registry: string;
  readonly repository: string;
  readonly artifacts: Readonly<Partial<Record<RuntimePlatform, string>>>;

plugins/browser-automation/installer.ts:66

export function currentPlatform(): RuntimePlatform | null {
  const parsed = platformSchema.safeParse(
    `${process.platform}-${process.arch}`,
  );
  return parsed.success ? parsed.data : null;
}

resolveRuntime() immediately rejects null. This happens before installRuntime(), so a desktop tab being present cannot make the host eligible.

plugins/browser-automation/runtime-pin.ts:8

export const runtimeRelease: RuntimeRelease = {
  package: "dev-browser",
  version: "1.0.0-rc.4",
  registry: "https://registry.npmjs.org",
  repository: "SawyerHood/dev-browser",
  artifacts: {
    "linux-x64":
      "fa6cec3f84463e171bd7b307e2e1f0243df59c70c38f96d790dc41b160db921a",
    "linux-arm64":
      "578db7f1e502cf6b9e43ac09e6adc5720f5397fa3e6d6b7b9ba8377708fe040e",
    "darwin-x64":
      "7cfad83f7f9e16dc5acbc94553430bcd1be24adc4304c0f534805969bfa6d2ba",
    "darwin-arm64":
      "f0a7e7d10ab8be0fee1ee8ac2ca33d3efc46b493e5e998b29ea75c79479a2e8d",
  },
};

plugins/browser-automation/runtime-pin.ts:31

export async function resolveRuntime(args: {
  dataDir: string;
  signal: AbortSignal;
  release?: RuntimeRelease;
  env?: NodeJS.ProcessEnv;
  onProgress?: InstallOptions["onProgress"];
}): Promise<ResolvedRuntime> {
  const release = args.release ?? runtimeRelease;
  const platform = currentPlatform();
  if (platform === null)
    throw new Error(
      `DevBrowser has no runtime for ${process.platform}-${process.arch}; choose a Linux or macOS browser host.`,
    );
  const installed = await installRuntime({
    release,
    dataDir: args.dataDir,
    platform,
    signal: args.signal,

The server acquires a desktop connection where appropriate, but then prepares DevBrowser unconditionally before opening the host session. The host also resolves the runtime before passing the optional connection URL to its runtime factory.

plugins/browser-automation/server.ts:325

      active.set(session.id, record);
      while (true) {
        const runtime = await host.call(
          "prepare",
          {},
          { hostId: session.hostId, signal },
        );
        if (runtime.status === "ready") break;
        bb.log.info(
          `DevBrowser runtime on host ${session.hostId}: ${runtime.detail}`,
        );
      }
      await host.call(
        "open",
        {
          sessionId: session.id,
          ...(connectionUrl === undefined ? {} : { connectionUrl }),
          expiresAt: hardDeadline(session),
          idleTimeoutMs,
        },
        { hostId: session.hostId, signal },
      );

plugins/browser-automation/host.ts:156

  async function start(
    context: ExperimentalHostRpcContext,
    signal: AbortSignal,
    connectionUrl: string | undefined,
  ) {
    const attached = await attachRuntime(context);
    let runtime: ResolvedRuntime;
    try {
      runtime = await attached.promise;
    } finally {
      attached.detach();
    }
    signal.throwIfAborted();
    return factory({
      ...context.experimental_paths,
      runtime,
      connectionUrl,
      signal,
    });

In the actual runtime, supplying a desktop URL bypasses Chrome launch, not DevBrowser execution. The runtime still launches the DevBrowser daemon and uses its binary to evaluate scripts.

plugins/browser-automation/runtime.ts:265

    }
    const endpoint = new URL(connectionUrl);
    if (
      endpoint.protocol !== "ws:" ||
      !["127.0.0.1", "localhost", "[::1]"].includes(endpoint.hostname)
    )
      throw new Error(
        "Desktop connection must be a private loopback WebSocket on the selected host",
      );
    processes.push(supervise(binary, ["daemon"], env));
    await waitForFile(join(home, "daemon.pid"));
    const url = connectionUrl;
    const run = (
      script: string,
      timeoutMs: number,

plugins/browser-automation/runtime.ts:292

          const stdout = await execute(
            binary,
            [
              "--json",
              "--connect",
              url,
              "--timeout",
              String(Math.ceil(timeoutMs / 1000)),
              "--quiet-page",
              "-e",
              script,
            ],
            env,
            deadline,

The pinned upstream release metadata, read on 2026-11-05 from the repository named in the trusted runtime pin, reinforces that this is missing platform support rather than one forgotten lookup entry:

{"assets":["dev-browser-darwin-arm64","dev-browser-darwin-x64","dev-browser-linux-arm64","dev-browser-linux-x64","SHA256SUMS"],"tag_name":"v1.0.0-rc.4"}

The complete read-only asset metadata is embedded above. No upstream executable or branch was downloaded or run.

6. Proposed fix and simple-fix decision

A runtime-based solution requires an upstream Windows build, verified Windows artifact pinning and installation/execution support, followed by native Windows tests for both backends. A fallback that does not use DevBrowser would instead require a new execution implementation while preserving the existing browser-control leases, endpoint restrictions, ownership, script/session behavior and preview lifecycle. Neither is an allowlist-only repair.

No pull request: Windows runtime packaging or a replacement execution backend is outside the authorized simple-fix conditions. The former changes packaging/release work; the latter needs product/architecture and security-boundary decisions. No production patch or fix branch was created or pushed. The focused availability assertion fails on unchanged main, but no valid post-fix pass can be claimed.

Read-only issue timeline, closing-PR references and open-PR search found no linked open pull request at investigation time. No pull request code was checked out.

7. Verification

The same agent repeated the reproduction, not an independent reviewer. The second detached checkout was clean before adding only the identical test and configuration. It used a separate frozen install, SDK build, plugin build and fresh per-case temporary data roots. No ports were started in either run.

Second checkout: separate detached worktree at 2d912ea09011708b6a331c1ee7a15bea6ad32970
Tracked source diff: empty
Command: pnpm --filter bb-plugin-browser-automation exec vitest run --config slopcop-7090.vitest.config.ts
Result: exit 1; 1 expected availability failure, 2 rejection checks passed
Root-cause stack: resolveRuntime runtime-pin.ts:41 → attachRuntime host.ts:62 → prepare host.ts:192
Report correction: no change to the cause or verdict; native Windows and end-to-end desktop coverage are explicitly excluded.
 RUN  v4.1.1 <second-checkout>/plugins/browser-automation

 ❯ |issue-7090:isolated| slopcop-7090.test.ts (3 tests | 1 failed) 20ms
     × prepares a runtime for a native Windows host 8ms

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  |issue-7090:isolated| slopcop-7090.test.ts > native Windows runtime availability > prepares a runtime for a native Windows host
AssertionError: promise rejected "Error: DevBrowser has no runtime for win3…" instead of resolving
 ❯ slopcop-7090.test.ts:77:8
     75|       await expect(
     76|         harness.experimental_call("prepare", {}),
     77|       ).resolves.toMatchObject({
       |        ^
     78|         status: "ready",
     79|       });

Caused by: Error: DevBrowser has no runtime for win32-x64; choose a Linux or macOS browser host.
 ❯ resolveRuntime runtime-pin.ts:41:11
 ❯ attachRuntime host.ts:62:18
 ❯ prepare host.ts:192:43
 ❯ Object.experimental_call ../../packages/plugin-sdk/dist/testing/host.js:66:33
 ❯ slopcop-7090.test.ts:75:7

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


 Test Files  1 failed (1)
      Tests  1 failed | 2 passed (3)
   Start at  02:44:07
   Duration  493ms (transform 194ms, setup 0ms, import 305ms, tests 20ms, environment 0ms)

undefined
<second-checkout>/plugins/browser-automation:
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command failed with exit code 1: vitest run --config slopcop-7090.vitest.config.ts

Existing host, installer, runtime and server tests were also run through Turbo in the first checkout: 68 tests passed in four files. The availability failure therefore reflects the targeted missing Windows path, not a general failure of the existing supported-platform test suite.

8. Related issues

Related platform-registration and CPU-compatibility reports appeared in repository search, but their claims were not used to prove this issue. The reproduced failure is specifically the host runtime platform gate; it occurs before desktop registration or runtime CPU execution could explain this error.

9. Appendix

The first and second reproduction logs, complete test, isolated-worker configuration, upstream asset metadata and exact commands are embedded in this page. Raw local evidence is retained outside the public repository, in accordance with its publication policy.

Existing test result
bb-plugin-browser-automation:test:  Test Files  4 passed (4)
bb-plugin-browser-automation:test:       Tests  68 passed (68)
bb-plugin-browser-automation:test:    Start at  02:44:16
bb-plugin-browser-automation:test:    Duration  3.46s (transform 765ms, setup 0ms, import 1.84s, tests 5.51s, environment 0ms)
bb-plugin-browser-automation:test: 

 Tasks:    7 successful, 7 total
Cached:    0 cached, 7 total
  Time:    6.714s 

Commands
git fetch origin main
git rev-parse origin/main
git worktree add --detach <first-checkout> 2d912ea09011708b6a331c1ee7a15bea6ad32970
git worktree add --detach <second-checkout> 2d912ea09011708b6a331c1ee7a15bea6ad32970

# In each checkout:
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@get-bb/plugin-sdk
pnpm exec turbo run build --filter=bb-plugin-browser-automation
pnpm --filter bb-plugin-browser-automation exec vitest run --config slopcop-7090.vitest.config.ts

# Existing owner-boundary checks, first checkout:
pnpm exec turbo run test --filter=bb-plugin-browser-automation -- host.test.ts installer.test.ts runtime.test.ts server.test.ts

# Read-only metadata and history:
gh api repos/SawyerHood/dev-browser/releases/tags/v1.0.0-rc.4
gh api repos/get-bb/bb/issues/7090/timeline --paginate
gh pr list --repo get-bb/bb --state open --search 7090
git log -3 --oneline -- plugins/browser-automation/runtime-pin.ts plugins/browser-automation/installer.ts
git diff --check

Trust boundary: the issue, including its requested remedies and embedded commands, was treated only as untrusted claims. No issue-supplied command, script, patch, external URL or linked pull-request code was executed. The test was authored from the trusted repository's host harness and runtime code. Only trusted main and the two locally authored reproduction files ran. No dependency was added.

Limitations: this establishes the exact deterministic Windows rejection through the production host resolver and host RPC validation boundary; it does not validate a Windows installation, Electron UI registration, external-browser workaround, provider computer use, or any future Windows fix.