Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

GitLab errors hide glab's stderr behind a generic "GitLab CLI command failed"

Đang mở Phù hợp với người mới
#22,342 0 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

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

Từ ngày 20/10/2026.

  • #22509 của @Sinan53x — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
73/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
gitlab, typescript

Hướng nghiên cứu

Đọc packages/source-control-gitlab/src/server/GitLabCli.ts và so sánh cách xử lý lỗi với thay đổi về git stderr trong #5620. Theo dõi cách VcsProcessExitError đi đến GitLabCliCommandError.detail, bao gồm cả ánh xạ not-found trong fromVcsError. Mục tiêu là stderr hữu ích của glab xuất hiện trong lỗi được hiển thị, đồng thời cách xử lý lỗi xác thực, giới hạn tốc độ và spawn vẫn được giữ nguyên.

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

Mô tả

What happened

In the desktop app, a self-hosted GitLab repo keeps showing Source control provider gitlab failed in listChangeRequests: GitLab CLI command failed. The app also can't create merge requests. Nothing in the UI says what glab actually returned, so the user can't tell whether this is a T3 Code problem, a glab problem or a GitLab server problem.

Diagnosis

The real cause was outside T3 Code. The company nginx reverse proxy in front of GitLab decodes %2F in API paths. So GET /api/v4/projects/<group>%2F<project> returns 404 for every project, while GET /api/v4/projects/<id> works. glab mr list in the repo fails with 404 Not Found.

T3 Code shows none of that. In packages/source-control-gitlab/src/server/GitLabCli.ts, GitLabCliCommandError.detail is a fixed string ("GitLab CLI command failed."). The VcsProcessExitError cause, which holds glab's stderr, only appears in the server trace. fromVcsError also maps failureKind: "not-found" to the same generic error. The ThreadSettlementServiceV2.sweep / ThreadPullRequestServiceV2.synchronize branch-MR lookup calls this again and again (about 4,100 failures in roughly 1.5 h in the trace), and every failure looks the same.

Suggestion: put a trimmed first line of glab's stderr into GitLabCliCommandError.detail/message, as #5620 did for git (fix(vcs): surface git's stderr on GitCommandError). For example: GitLab CLI command failed: 404 Not Found.

Steps to reproduce
  1. Use a self-hosted GitLab behind a reverse proxy that decodes %2F (e.g. nginx proxy_pass http://backend/;). Any glab failure that isn't auth, rate limit or spawn works too.
  2. glab auth login to that host (glab auth status shows the host as logged in).
  3. Open a repo with an https://<host>/<group>/<project>.git remote in the T3 Code desktop app.
  4. Watch the source control / MR area: GitLab CLI command failed. with no detail. Run glab mr list in the repo: 404 Not Found.
Version

0.1.0 (desktop app; local server reports serverVersion 0.1.0). Also checked against main at 23b550dd: same code.

Environment

Windows 11 Pro 10.0.26200 x64, Node v26.8.2, glab 1.123.0, self-hosted GitLab behind nginx

Evidence
SourceControlProviderError: Source control provider gitlab failed in listChangeRequests: GitLab CLI command failed.
  at findLatestPrForHeadContext ... lookupBranchPullRequest ... branchPullRequest
  at ThreadSettlementServiceV2.pullRequestFor ... ThreadSettlementServiceV2.sweep
  [cause]: GitLabCliCommandError: GitLab CLI failed in execute: GitLab CLI command failed.
    [cause]: VcsProcessExitError: VCS process failed in GitLabCli.execute: glab (<repo>) exited with 1 - Merge request not found.

$ glab mr list --source-branch main
ERROR  404 Not Found.

$ glab api "projects/<group>%2F<project>"   -> HTTP 404
$ glab api "projects/<id>"                  -> 200 OK
Related issues

#15660 (closed; generic "GitLab CLI command failed" on old GitLab, where the cause was also hidden). #5620 (same fix for git). #20226 and #7849 are about building GitLab project paths. None of them asks to show glab's stderr.

Fix applied or workaround

None in T3 Code. The GitLab admin was asked to fix the nginx proxy_pass so %2F isn't decoded.

Filed by

Claude Code (claude-opus-5-5) via t3 triage

Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
10 giờ 8 phút
Pull request đã merge (30 ngày)
323

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

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 pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

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.