Troubleshooting the GitLab Duo Agent Platform

  • Tier: Premium, Ultimate
  • Add-on: GitLab Duo Core, Pro, or Enterprise
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated
  • Status: Beta

If you are working with the GitLab Duo Agent Platform in your IDE, you might encounter the following issues.

General guidance

Start by ensuring that GitLab Duo is on and that you are properly connected.

  • Ensure you meet the prerequisites.
  • Ensure the branch you want to work in is checked out.
  • Ensure you have turned on the necessary settings in the IDE.

Network issues

Your network might block the connection to the Agent Platform, for example, by using a firewall. By default the Agent Platform uses a gRPC (Google Remote Procedure Call) connection. The network must let HTTP/2 traffic through to the service for gRPC to work.

gRPC can be changed to a WebSocket connection in the IDE.

To confirm that you can connect to the Agent Platform service using gRPC:

  1. In Google Chrome or Firefox, open Developer Tools and select the Network tab.
  2. Right-click the column headers to show the Protocol column.
  3. In the address bar, enter https://duo-workflow-svc.runway.gitlab.net/DuoWorkflow/ExecuteWorkflow.
  4. Ensure the request was successful and the Protocol column includes h2 in Chrome or HTTP/2 in Firefox.

If the request fails or does not show the HTTP/2 protocol:

  • A security system like Netskope or Zscaler might be configured to block or inspect traffic.
  • The HTTP/2 protocol downgrades to HTTP/1.1, which prevents the Agent Platform from working correctly.

To correct this issue, ask your network administrator to put https://duo-workflow-svc.runway.gitlab.net/DuoWorkflow/ExecuteWorkflow on the correct allowlist, or to exempt it from traffic inspection.

Use WebSocket connection instead of gRPC

If your network conditions do not allow a gRPC connection, WebSocket is an alternative in VS Code and JetBrains IDEs:

  • In VS Code:

    1. Select File > Preferences > Settings
    2. Search for the setting GitLab: Duo Agent Platform: Connection Type, then select WebSocket.
  • In JetBrains:

    1. On the top bar, select the main menu, then select Settings.
    2. On the left sidebar, select Tools > GitLab Duo.
    3. In the GitLab Duo Agent Platform > Connection Type section, select WebSocket.

View debugging logs in VS Code

In VS Code, you can troubleshoot some issues by viewing debugging logs.

  1. Open local debugging logs:
    • On macOS: Cmd + ,
    • On Windows and Linux: Ctrl + ,
  2. Search for the setting GitLab: Debug and enable it.
  3. Open the language server logs:
    1. In VS Code, select View > Output.
    2. In the output panel at the bottom, in the upper-right corner, select GitLab Workflow or GitLab Language Server from the list.
  4. Review for errors, warnings, connection issues, or authentication problems.

VS Code configuration

You can try several things to ensure your repository is properly configured and connected in VS Code.

View the project in the GitLab Workflow extension

Start by ensuring the correct project is selected in the GitLab Workflow extension for VS Code.

  1. In VS Code, on the left sidebar, select GitLab Workflow ( tanuki ).
  2. Ensure the project is listed and selected.

If an error message appears next to the project name, select it to reveal what needs to be updated.

For example, you might have multiple repositories and need to select one, or there might be no repositories at all.

No Git repository

If your workspace doesn’t have a Git repository initialized, you must create a new one:

  1. On the left sidebar, select Source Control ( branch ).
  2. Select Initialize Repository.

When the repository is initialized, you should see the name in the Source Control view.

Git repository with no GitLab remote

You might have a Git repository but it’s not properly connected to GitLab.

  1. On the left sidebar, select Source Control ( branch ).
  2. On the Source Control label, right-click and select Repositories.
  3. Next to your repository, select the ellipsis ( ellipsis_h ), then Remote > Add Remote.
  4. Enter your GitLab project URL.
  5. Select the newly added remote as your upstream.

Multiple GitLab remotes

Your repository might have multiple GitLab remotes configured. To select the correct one:

  1. On the left sidebar, select Source Control ( branch ).
  2. On the status bar, select the current remote name.
  3. From the list, select the appropriate GitLab remote.
  4. Ensure the selected remote belongs to a group namespace in GitLab.

Multiple GitLab projects

If your VS Code workspace contains multiple GitLab projects, you might want to close all the projects you’re not using.

To close projects:

  1. On the left sidebar, select Source Control ( branch ).
  2. Ensure repositories are shown: on the Source Control label, right-click and select Repositories.
  3. Right-click the repository you want to close and select Close Repository.

Project not in a group namespace

GitLab Duo Agent Platform requires that projects belong to a group namespace.

To determine the namespace your project is in, look at the URL.

If necessary, you can transfer your project to a group namespace.

Flows not visible in the UI

If you are trying to run a flow but it’s not visible in the GitLab UI:

  1. Ensure you have at least Developer role in the project.
  2. Ensure GitLab Duo is turned on for your group or project.
  3. Ensure the required feature flags, duo_workflow and duo_workflow_in_ci, are enabled.
  4. Ensure flows are turned on for your project.

Still having issues?

Contact your GitLab administrator for assistance.