{"record":{"id":"8a5f9408e25962b7","repo":"usebruno/bruno","slug":"no-stored-spec-file-found-please-sync-with-remote","errorCode":null,"errorMessage":"No stored spec file found. Please sync with remote spec first.","messagePattern":"No stored spec file found\\. Please sync with remote spec first\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/bruno-electron/src/ipc/openapi-sync.js","lineNumber":867,"sourceCode":"      if (removedFields.length) changes.push(`-${removedFields.length} form fields`);\n    }\n    if (jsonBodyDiff) changes.push('body schema');\n  }\n\n  return { hasDiff, changes };\n};\n\n/**\n * Load the stored spec for a collection and convert it to Bruno collection format.\n * Throws if no stored spec file exists.\n */\nconst loadStoredSpecCollection = (collectionPath, brunoConfig) => {\n  const sourceUrl = brunoConfig?.openapi?.[0]?.sourceUrl;\n  const specEntry = sourceUrl ? getSpecEntryForUrl(collectionPath) : null;\n  const specPath = specEntry ? path.join(getSpecsDir(), specEntry.filename) : null;\n\n  if (!specPath || !fs.existsSync(specPath)) {\n    throw new Error('No stored spec file found. Please sync with remote spec first.');\n  }\n\n  const specRaw = fs.readFileSync(specPath, 'utf8');\n  const storedSpec = parseSpec(specRaw);\n  const groupBy = brunoConfig?.openapi?.[0]?.groupBy || 'tags';\n  return openApiToBruno(storedSpec, { groupBy });\n};\n\nconst registerOpenAPISyncIpc = (mainWindow) => {\n  ipcMain.handle('renderer:check-openapi-updates', async (event, {\n    collectionUid, collectionPath, sourceUrl, storedSpecHash, environmentContext\n  }) => {\n    try {\n      const result = await fetchSpecFromSource({ collectionUid, collectionPath, sourceUrl, environmentContext });\n      if (result.error) {\n        return { hasUpdates: false, error: result.error, errorCode: result.errorCode };\n      }\n      const remoteSpecHash = generateSpecHash(result.spec);","sourceCodeStart":849,"sourceCodeEnd":885,"githubUrl":"https://github.com/usebruno/bruno/blob/9bdd81c7bdc57006e5f5ebffb79321a8d979f712/packages/bruno-electron/src/ipc/openapi-sync.js#L849-L885","documentation":"Error \"No stored spec file found. Please sync with remote spec first.\" thrown in usebruno/bruno.","triggerScenarios":"Thrown at packages/bruno-electron/src/ipc/openapi-sync.js:867 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run a sync with the remote spec first to store a local copy.","Check the sync configuration points to a reachable spec URL."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9bdd81c7bdc57006e5f5ebffb79321a8d979f712","analyzedAt":"2026-08-13T04:09:25.751Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}