usebruno/bruno · error · Error
Selected API spec is not available. Open it in the workspace
Error message
Selected API spec is not available. Open it in the workspace first.
What it means
Error "Selected API spec is not available. Open it in the workspace first." thrown in usebruno/bruno.
Source
Thrown at packages/bruno-app/src/utils/mock-server/mock-server-instances.js:330
export const resolveMockServerStartPayload = (instance, { collection, apiSpecs, workspacePath }) => {
const mockServerUid = instance.uid;
const resolvedWorkspacePath = workspacePath || null;
if (instance.sourceType === 'manual') {
return {
mockServerUid,
serverName: instance.name,
sourceType: 'manual',
workspacePath: resolvedWorkspacePath,
port: Number(instance.port),
globalDelay: Number(instance.globalDelay) || 0
};
}
if (instance.sourceType === 'spec') {
const spec = resolveInstanceSpec(instance, apiSpecs);
if (!spec?.pathname) {
throw new Error('Selected API spec is not available. Open it in the workspace first.');
}
return {
mockServerUid,
serverName: instance.name,
sourceType: 'spec',
specPath: spec.pathname,
workspacePath: resolvedWorkspacePath,
port: Number(instance.port),
globalDelay: Number(instance.globalDelay) || 0
};
}
if (!collection?.pathname) {
throw new Error('Selected collection is not available.');
}
return {View on GitHub (pinned to 9bdd81c7bd)
Solutions
- Open the API spec in the workspace first, then select it for the mock server.
- Verify the spec file still exists at its registered path.
When it happens
Trigger: Thrown at packages/bruno-app/src/utils/mock-server/mock-server-instances.js:330 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/175faf6b99fdeb0c.
Report an issue: GitHub.