NousResearch/hermes-agent · error
Marketplace install is only available in the desktop app.
Error message
Marketplace install is only available in the desktop app.
What it means
Thrown by installVscodeThemeFromMarketplace when window.hermesDesktop?.themes?.fetchMarketplace is absent — the preload-API bridge that downloads Marketplace extensions only exists inside the Electron desktop app. Running the same code in a plain browser (dashboard web build) or in tests without the desktop preload yields undefined and this error.
Source
Thrown at apps/desktop/src/themes/install.ts:86
...(darkTerminal ? { darkTerminal } : {})
}
}
/**
* Download a Marketplace extension and install the theme family it contributes
* (see `buildThemeFromMarketplace`). Returns the single installed theme.
*/
export async function installVscodeThemeFromMarketplace(id: string): Promise<DesktopTheme> {
const trimmed = id.trim()
if (!MARKETPLACE_ID_RE.test(trimmed)) {
throw new Error('Expected a Marketplace id like "publisher.extension".')
}
const api = window.hermesDesktop?.themes
if (!api?.fetchMarketplace) {
throw new Error('Marketplace install is only available in the desktop app.')
}
const result = await api.fetchMarketplace(trimmed)
return installUserTheme(buildThemeFromMarketplace(result))
}
View on GitHub (pinned to c896c09c42)
Solutions
- Only offer Marketplace install in the Electron app; feature-gate the UI on !!window.hermesDesktop?.themes?.fetchMarketplace.
- In tests, stub window.hermesDesktop with a fake fetchMarketplace before invoking.
- Update Hermes Desktop if the preload bridge is missing in your installed build.
Example fix
// before
const theme = await installVscodeThemeFromMarketplace(id)
// after
if (!window.hermesDesktop?.themes?.fetchMarketplace) {
throw new Error('Marketplace install requires the desktop app')
}
const theme = await installVscodeThemeFromMarketplace(id) Defensive patterns
Strategy: type-guard
Validate before calling
const canInstallFromMarketplace = (): boolean => typeof window !== 'undefined' && Boolean(window.hermesDesktop?.themes?.fetchMarketplace)
Type guard
function hasMarketplaceApi(wp: typeof window): wp is typeof window & {
hermesDesktop: { themes: { fetchMarketplace: (id: string) => Promise<DesktopMarketplaceThemeResult> } }
} {
return Boolean(wp?.hermesDesktop?.themes?.fetchMarketplace)
} Prevention
- Feature-gate Marketplace install UI on presence of the preload API.
- Stub window.hermesDesktop in vitest setups for shared code paths.
- Version-check the preload bridge after app updates before offering the feature.
When it happens
Trigger: Importing and calling installVscodeThemeFromMarketplace outside Electron (dashboard in a browser, vitest/jsdom without mocking window.hermesDesktop), or on an older desktop build whose preload does not expose themes.fetchMarketplace.
Common situations: Shared theme code executed by the web dashboard, unit tests forgetting to stub the preload API, or a Desktop version predating the Marketplace installer API.
Related errors
- HERMES_DESKTOP_REMOTE_URL is set but HERMES_DESKTOP_REMOTE_T
- Hermes desktop bridge unavailable
- Hermes Desktop bridge is unavailable
- Hermes Desktop bridge is unavailable
- "${result.extensionId}" does not contribute any color themes
AI-assisted analysis of NousResearch/hermes-agent@c896c09c42 (2026-08-14).
Data as JSON: /api/errors/8efceb518b499b5a.
Report an issue: GitHub.