easysoft / easysoft/zentao-cli
Windows 下创建命令失败时会额外输出 UV_HANDLE_CLOSING 断言
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 57
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
问题描述
在 Windows 环境下,zentao-cli 执行失败的创建命令时,除了正常返回服务端业务错误外,还会额外输出一条 Node/uv 断言:
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\\win\\async.c, line 76
这会带来两个问题:
- 用户会误以为 CLI 自身崩溃,而不仅仅是禅道服务端返回了业务错误。
- AI Agent / MCP / CLI 调用方在解析 stderr 时,很难区分“真实业务错误”和“CLI 运行时断言噪音”。
版本与环境
- zentao-cli:
0.1.8 - Zentao Server:
22.2 - OS: Windows
- Node:
v24.14.0
复现步骤
执行以下命令(故意传一个不存在的 product / parent,让服务端返回错误):
zentao project create --data "{""name"":""bad-probe"",""model"":""scrum"",""begin"":""2026-06-15"",""end"":""2026-06-30"",""products"":[999999],""parent"":999999,""workflowGroup"":0}" --format json
实际结果
stderr / stdout 中除了禅道服务端返回的业务错误外,还出现额外断言:
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\\win\\async.c, line 76
同时 stdout 中仍然能看到服务端业务错误,例如:
{
"error": {
"code": "2008",
"message": "禅道服务端返回错误(Url:http://127.0.0.1:5493/api.php/v2/projects?,Status:200),请查看详细错误信息:\"Products does not exist.\""
}
}
期望结果
- CLI 在 Windows 下遇到服务端业务错误时,只返回正常的错误输出,不应再额外打印 uv / handle closing 断言。
- 如果这是底层进程退出或异步句柄清理问题,建议在命令失败路径上避免重复关闭或重复触发异步清理。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce the failing zentao project create command on Windows, then trace its failed-command and asynchronous cleanup path. Done means the server business error remains available without the UV_HANDLE_CLOSING assertion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100