Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#22,342 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@Sinan53x がすでに取り組んでいます。

2026年10月20日 から。

  • #22509 @Sinan53x による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
73/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
gitlab, typescript

調査の方向性

packages/source-control-gitlab/src/server/GitLabCli.tsを読み、エラー処理を#5620のgit stderrの変更と比較してください。VcsProcessExitErrorがGitLabCliCommandError.detailに届くまでの流れを、fromVcsErrorでのnot-foundのマッピングも含めて追ってください。完了条件は、glabの有用なstderrが表示されるエラーに含まれ、認証、レート制限、spawnエラーの処理が維持されることです。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
24.8k
フォーク
6.4k
平均マージ
10時間 8分
マージ済み PR(30日)
323

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pingdotgg/t3code のほかの issue

pingdotgg/t3code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。