BloopAI/vibe-kanban · error
Failed to open repository in IDE
Error message
Failed to open repository in IDE
What it means
Thrown by the RepoOpenInIDE action when the network request to fetch a deep-link URL for opening the repository in the user's IDE fails, or the response contains no url. The action posts to an API endpoint, then calls window.open(response.url, '_blank'); any failure is caught, logged, and rethrown as this generic Error.
Source
Thrown at packages/web-core/src/shared/actions/index.ts:1133
RepoOpenInIDE: {
id: 'repo-open-in-ide',
label: 'Open Repo in IDE',
icon: DesktopIcon,
requiresTarget: ActionTargetType.GIT,
isVisible: (ctx) => ctx.hasWorkspace && ctx.hasGitRepos,
execute: async (_ctx, _workspaceId, repoId) => {
try {
const response = await repoApi.openEditor(repoId, {
editor_type: null,
file_path: null,
});
if (response.url) {
window.open(response.url, '_blank');
}
} catch (err) {
console.error('Failed to open repo in editor:', err);
throw new Error('Failed to open repository in IDE');
}
},
},
RepoSettings: {
id: 'repo-settings',
label: 'Repository Settings',
icon: GearIcon,
requiresTarget: ActionTargetType.GIT,
isVisible: (ctx) => ctx.hasWorkspace && ctx.hasGitRepos,
execute: async (_ctx, _workspaceId, repoId) => {
await SettingsDialog.show({
initialSection: 'repos',
initialState: {
repoId,
},
});
},View on GitHub (pinned to 4deb7eca8f)
Solutions
- Verify the backend is running and the repo-open endpoint returns 200 with a url field.
- Confirm the repository still exists on disk and its path is valid in the repos table.
- Check the configured IDE/editor type on the server supports deep links (vscode://, cursor://, etc.).
- Inspect the browser console/network tab for the logged underlying error (console.error('Failed to open repo in editor:', err)).
- Handle the missing-url case explicitly in the response handling instead of silently doing nothing.
Example fix
// before
if (response.url) {
window.open(response.url, '_blank');
}
// after
if (response.url) {
window.open(response.url, '_blank');
} else {
console.warn('No IDE url returned; falling back to repo path');
} Defensive patterns
Strategy: try-catch
Validate before calling
// before opening
if (!repoId) throw new Error('repoId is required');
const repo = await repoApi.getById(repoId);
if (!repo?.path) throw new Error('Repository path unavailable; cannot open in IDE'); Type guard
function hasIdeUrl(res: { url?: string | null }): res is { url: string } {
return typeof res.url === 'string' && res.url.length > 0;
} Try / catch
try {
const response = await openInEditorApi(repoId);
if (hasIdeUrl(response)) window.open(response.url, '_blank');
else toast.warning('Editor did not return a URL');
} catch (err) {
toast.error('Could not open repository in IDE. Is the backend running?');
console.error(err);
} Prevention
- Check backend health before invoking IDE deep-link actions.
- Validate the repository still exists and has a path on disk.
- Surface the underlying error message to the user instead of a generic one.
- Watch the network tab for failing open-in-editor requests during setup changes.
When it happens
Trigger: Calling the RepoOpenInIDE execute() when the backend endpoint that resolves the repo path into an editor URL returns a non-2xx status, the network request rejects (server down, CORS), or the backend responds successfully but without response.url set.
Common situations: Backend service not running or restarting while the frontend is open, IDE/editor scheme not configured on the server, repo path missing on disk so the server cannot build a URL, or a stale workspace pointing at a deleted repository.
Related errors
- Host returned HTTP ${response.status}
- Auth methods lookup failed (${res.status})
- Invitation not found (${res.status})
- Failed to accept invitation (${res.status})
- Failed to list organizations (${res.status})
AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29).
Data as JSON: /api/errors/88b865e667697c59.
Report an issue: GitHub.