Skip to content

[Bug]: GitLab issues can't be opened or linked: issue read queries Issue.awardEmoji, which GitLab's GraphQL schema doesn't have #38379

Closed

Description

@13pixlar

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server (GitLab issue tracker, packages/source-control-gitlab)

Steps to reproduce

  1. Add a project whose origin is a gitlab.com repository, with glab signed in.
  2. Open any GitLab issue in it: in the Issues panel, or with the MCP tools read_issue / link_issue (for example https://gitlab.com/<group>/<project>/-/work_items/<iid>).

Expected behavior

The issue opens, and link_issue links it to the thread.

Actual behavior

Both fail with Issue operation detail failed: GitLab CLI command failed. Nothing can be linked to a thread, because link_issue reads the issue first.

The cause is ISSUE_AWARD_EMOJI_GRAPHQL_QUERY (packages/source-control-gitlab/src/server/gitLabIssueJson.ts:415), which IssueService.detail runs as part of the read. It selects awardEmoji directly on Issue, and GitLab's GraphQL schema has no such field:

{"errors":[{"message":"Field 'awardEmoji' doesn't exist on type 'Issue'","locations":[{"line":5,"column":7}],"path":["query","project","mergeRequest","awardEmoji"],"extensions":{"code":"undefinedField","typeName":"Issue","fieldName":"awardEmoji"}}]}

I replayed the query T3 sends (glab api graphql --method POST --input - --header 'Content-Type: application/json') to get that error. The REST calls in the same read (issues/:iid, notes, resource_label_events, closed_by, related_merge_requests, award_emoji) all succeed.

Two possible fixes: read issue-level reactions from REST award_emoji, which already works, or from the work item AWARD_EMOJI widget. Separately, a failed reactions read should probably degrade to "no reactions" instead of failing the whole issue read.

Impact

Blocks work completely: GitLab issues can't be opened or linked to threads.

Version or commit

v0.1.11-nightly.20261117.4851 (desktop, Linux). The query is unchanged on main at 856c84e.

Environment

Linux desktop app, glab 1.117.0, gitlab.com.

Logs or stack traces

VcsProcessExitError: VCS process failed in GitLabCli.execute: glab (<project>) exited with 1 - Process exited with a non-zero status.
    at VcsProcess.run ...
    at IssueService.detail (.../apps/server/dist/server-*.mjs)
IssueOperationError: Issue operation detail failed: GitLab CLI command failed.

glab's stderr is hidden behind the generic message (see #22342), which made this harder to find.

Workaround

Dispatching thread.issue.link directly over the orchestration API works, because that command doesn't read the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions