zai-org / zai-org/feedback

[Bug] v3.12.3 更新后 BigModel 登录失败 (HTTP 500 / code 2007) —— Web 轮询网桥与桌面端 DeepLink 回调换票竞态冲突

Open
#705 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority: P2 status: 待评估 type: Bug
Dominant language
No language data
Stars
22
Forks
1
PR merge metrics
No merged PRs in 30d

Description

提交前确认 · Pre-submission checklist
  • 我已搜索过现有 issue,确认这不是重复 / I searched existing issues and confirmed this isn't a duplicate.
  • 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category

账号 / 登录 · Account / Login

涉及的 Agent 框架 · Agent framework

ZCode Agent(自研)

严重程度 · Severity

阻塞使用 · Blocking (无法使用核心功能 / core function unusable)

复现频率 · Reproducibility

必现 · Always

问题描述 · Description

在更新到 ZCode v3.12.3 后,通过界面点击“智谱 BigModel
登录”,在外部浏览器中完成账号密码授权后唤回桌面端,桌面端 100% 弹出“登录失败 / http
error”提示,无法正常登录。
经日志定位,原因是 Web 端授权落地页(https://zcode.z. ai/app/oauth/login)在判定客户端版本 app_version > 3.9.1 时开启了
pollingBridgeEnabled,在唤起桌面 DeepLink
的同时向后端发起了轮询回调,导致一次性单次授权码(Auth Code)被重复核销,后端返回 500 {"code":2007,"msg":"http error"}

复现步骤 · Steps to reproduce
  1. 打开 ZCode 桌面端,进入设置或账号中心。
  2. 点击“使用智谱 BigModel 登录”。
  3. 系统自动唤起默认浏览器,打开智谱统一登录授权页(https://bigmodel.cn/login?... )。
  4. 在网页端完成账号密码验证并确认授权。
  5. 网页跳转至中转页并自动通过 DeepLink 唤回 ZCode
    桌面端(zcode://oauth/callback?authCode=...)。
  6. 查看 ZCode 桌面端界面与登录状态。
期望表现 · Expected behavior

浏览器授权完成后成功唤回桌面应用,桌面端正确换取 Access Token /
JWT,界面显示登录成功并同步账号昵称及模型权益,后台轮询与 DeepLink 正常收敛结束。

实际表现 · Actual behavior
  1. 唤回桌面端后,右下角/界面立即弹出红色错误提示:“登录失败”“http
    error”
  2. 本地日志记录 oauth.handleCallback FAILoauth.pollPendingOAuth FAIL,两处
    RPC 调用均捕获相同的 500 ApiError。
  3. 账号保持未登录状态,无法使用 BigModel 相关的订阅模型。
ZCode 版本 · ZCode version

v3.12.3

设备 / 系统 / 浏览器 · Device / OS / Browser

Win 11(26100)

截图 / 录屏 / 日志 · Screenshots / Recordings / Logs

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the oauth.handleCallback and oauth.pollPendingOAuth entry points, along with the web polling bridge and the zcode://oauth/callback flow described in the report. Reproduce the v3.12.3 login sequence and inspect where the authorization code is exchanged. Done means BigModel login succeeds without either path redeeming the one-time code twice.

Written by the indexing model from the issue text.

Assessment

Domain
api, authentication, desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.