Skip to content

GitLab Duo Chat fails to initialize in VS Code Web environment

Checklist

Summary

GitLab Duo Chat fails to load in VSCode for Web environments such as GitLab Workspaces and GitPod and very likely GitHub codespaces.

Steps to reproduce

In GitLab Workspaces, the GitLab VSCode Extension is not updated yet because of this bug. The following instructions explain how to launch the extension in a Workspace in debug mode.

In GitPod

What is the current bug behavior?

GitLab Duo Chat never loads.

What is the expected correct behavior?

I can use the GitLab Duo Chat feature.

Proposal

  1. Detect which environment each user is in: desktop vs. web, and adjust the feature visibility and loading method

Relevant logs and/or screenshots

GitLab Workspaces GitPod
gitlab_workspaces.png Screenshot 2025-04-17 at 12.33.07.png

Relevant logs

In the Web Browser, GitLab VSCod Extension attempts to establish a connection to the URL:

http://127.0.0.1:40817/webview/duo-chat-v2

This URL is not accessible because the Web View server is running in the Remote Machine and the Web Browser cannot access directly to it.

Possible fixes

See the following documentation describes how to implement Web Views in a way that ensures they will work in a remote development environment: https://code.visualstudio.com/api/advanced-topics/remote-extensions#use-the-message-passing-api-for-dynamic-webview-content.

Edited by Dasha Adushkina