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

未关闭
#5,629 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Zoymusk 已经在做这个了。

开始于 2026年9月15日。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
bun, typescript
领域
ai, backend

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
TypeScript
星标
29.8k
派生
3.9k
平均合并
1 小时 44 分钟
30 天内合并 PR
841

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

simstudioai/sim 的其他 Issue

查看 simstudioai/sim 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。