easysoft / easysoft/zentao-cli

Windows + Node.js v24 登录失败 (UV_HANDLE_CLOSING assertion)

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
57
Forks
20
PR merge metrics
No merged PRs in 30d

Description

描述 (Description)
描述 (Description)

在 Windows 11 + Node.js v24.16.0 环境下,执行 zentao login 命令时出现 libuv 断言错误,无法完成登录。

重现步骤 (Steps to Reproduce)
# 环境
# Windows 11 Home China 10.0.26200
# Node.js v24.16.0
# zentao-cli 0.1.8

npm install -g zentao-cli
zentao login -s https://zentao.designorder.cn -u admin -p password
期望 (Expectation)
期望 (Expected Expectation)

正常登录并保存 token 到配置文件。

结果 (Result)
实际结果 (Actual Result)
Unexpected end of JSON input
Assertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\win\async.c, line 94

进程以 exit code 127 退出。

临时解决方案 (Workaround)

通过直接调用禅道 API 获取 token,手动创建配置文件 ~/.config/zentao/zentao.json

# 1. 获取 token
curl -s -X POST "https://zentao.example.com/api.php/v1/tokens" \
  -H "Content-Type: application/json" \
  -d '{"account":"admin","password":"password"}'

# 2. 手动创建配置文件
mkdir -p ~/.config/zentao
cat > ~/.config/zentao/zentao.json << EOF
{
  "currentProfile": "admin@https://zentao.example.com",
  "profiles": [
    {
      "server": "https://zentao.example.com",
      "account": "admin",
      "token": "<获取到的token>",
      "loginTime": "2026-06-12T00:00:00.000Z",
      "lastUsedTime": "2026-06-12T00:00:00.000Z"
    }
  ]
}
EOF
环境信息 (Environment)
  • OS: Windows 11 Home China 10.0.26200
  • Node.js: v24.16.0
  • zentao-cli: 0.1.8
  • Shell: bash (Git Bash)
补充说明

这个错误可能是 Node.js v24 中 libuv 的 Windows 兼容性问题。建议:

  1. 在文档中注明支持的 Node.js 版本范围
  2. 或者修复与新版 Node.js 的兼容性问题
软件版本 (Software version)

No response

Contributor guide

No contributing guide indexed for this repository

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 reproducing zentao login with Windows 11, Node.js v24.16.0, and the reported Git Bash environment. Trace the login entry point, the POST request to /api.php/v1/tokens, and creation of ~/.config/zentao/zentao.json; done means login completes and saves a usable token without the JSON or libuv assertion errors.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.