[BUG] Stagehand block fails with Unexpected server response: 101 when opening Browserbase session

Đang mở
#5,629 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Zoymusk đang làm issue này rồi.

Từ ngày 15/9/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bun, typescript
Lĩnh vực
ai, backend

Hướng nghiên cứu

Start at the Stagehand block's Run Agent operation and its Browserbase session WebSocket/CDP connection, then reproduce the vinted-login-test workflow with the stated configuration. Check whether the runtime or proxy handles the successful 101 upgrade correctly; done means the Browserbase session opens and navigation actions are recorded instead of failing immediately.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

The Stagehand block (Run Agent operation) fails immediately when it tries to open a Browserbase browser session. The run errors out after ~1s and no navigation actions are ever recorded — the browser never launches.

Environment

Workspace ID: 87354126-e3c3-4093-a07b-76df681ab4c9
Workflow: vinted-login-test (d6a50651-f4aa-4c61-96a8-65156e71e8c3)
Block: vintedLogin — type stagehand, operation agent, mode hybrid, provider anthropic

Steps to reproduce

  1. Create a workflow: Start → Stagehand (Run Agent).
  2. Configure provider anthropic with a valid ANTHROPIC_API_KEY, startUrl=https://www.vinted.cz, a login task, and variables for email/password.
  3. Run the workflow.
  4. Block fails after ~1s with Unexpected server response: 101.

Expected

Stagehand opens the Browserbase session and begins navigating.

Actual

WebSocket/CDP upgrade to Browserbase fails with Unexpected server response: 101; browser session never starts. Consistent across retries (not transient).

Ruled out (verified on the workspace side)

ANTHROPIC_API_KEY is valid — starts with sk-ant-, 108 chars, no whitespace; the block accepts it (the earlier Invalid Anthropic API key format error is gone).
VINTED_EMAIL / VINTED_PASSWORD are stored and correctly substituted at runtime.
Workflow lints clean: Start → vintedLogin, no orphans, no unresolved references.

Likely cause

HTTP 101 is actually the successful WebSocket upgrade response. The ws client is rejecting a successful upgrade — a known symptom of a Bun-vs-Node runtime incompatibility (Bun's ws polyfill doesn't handle the upgrade/unexpected-response events), or a reverse proxy not forwarding Upgrade/Connection headers to wss://connect.browserbase.com. Missing/invalid Browserbase credentials would return 401/403, not 101, so this points to server-side runtime/proxy config for the Stagehand↔Browserbase connection rather than user error.

Ngôn ngữ chính
TypeScript
Star
29.8k
Fork
3.9k
Merge trung bình
1 giờ 44 phút
Pull request đã merge (30 ngày)
841

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của simstudioai/sim

Tất cả issue của simstudioai/sim

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.