{"record":{"id":"8e3ead977d728e17","repo":"actualbudget/actual","slug":"openid-configuration-not-found","errorCode":null,"errorMessage":"OpenID configuration not found","messagePattern":"OpenID configuration not found","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"packages/sync-server/src/app-openid.ts","lineNumber":84,"sourceCode":"\napp.post('/config', openIdConfigRateLimiter, async (req, res) => {\n  const ownerCount = UserService.getOwnerCount();\n\n  if (ownerCount > 0) {\n    res.status(400).send({ status: 'error', reason: 'already-bootstraped' });\n    return;\n  }\n\n  if (!(await checkPassword(req.body.password))) {\n    res.status(400).send({ status: 'error', reason: 'invalid-password' });\n    return;\n  }\n\n  const auth = UserService.getOpenIDConfig();\n\n  if (!auth) {\n    res\n      .status(500)\n      .send({ status: 'error', reason: 'OpenID configuration not found' });\n    return;\n  }\n\n  try {\n    const openIdConfig = JSON.parse(auth.extra_data);\n    res.send({ status: 'ok', data: { openId: openIdConfig } });\n  } catch {\n    res\n      .status(500)\n      .send({ status: 'error', reason: 'Invalid OpenID configuration' });\n  }\n});\n\napp.get('/callback', async (req, res) => {\n  const { error, url } = await loginWithOpenIdFinalize(req.query);\n\n  if (error) {","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/actualbudget/actual/blob/d4334cb6e6123f4d3bcea1ad6166608884c7e658/packages/sync-server/src/app-openid.ts#L66-L102","documentation":"After password validation, POST /openid/config reads the stored OpenID configuration via UserService.getOpenIDConfig(). If nothing is stored, the endpoint responds 500 with reason 'OpenID configuration not found'. This means the server's internal state lacks the OpenID config record expected at bootstrap time.","triggerScenarios":"Calling POST /openid/config when no OpenID configuration row exists in the user service store (getOpenIDConfig returns null/undefined) — e.g. a corrupted or partially migrated database.","commonSituations":"Restored or hand-edited database missing the OpenID config row; version upgrade/migration that did not create the config entry; attempting config on a server where OpenID was never actually configured despite owner setup.","solutions":["Configure OpenID through the server's normal setup flow so the config record gets written, then retry","Inspect the database (user/service table) for the missing OpenID config row and restore it from a backup","Re-run any pending database migrations for the sync-server","Check server logs around getOpenIDConfig for storage errors"],"exampleFix":"null","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if (res.status === 500 && (await res.json()).reason === 'OpenID configuration not found') {\n  // fall back: run server setup/enable flow to create the config, then retry\n}","preventionTips":["Keep database backups before upgrades or manual edits","Run all sync-server migrations after version upgrades","Don't hand-edit the account database","Verify OpenID was actually configured on this instance before calling /config"],"tags":["openid","http-500","configuration","database","missing-data"],"backgroundTag":"missing-configuration-record","analyzedSha":"d4334cb6e6123f4d3bcea1ad6166608884c7e658","analyzedAt":"2026-08-29T01:02:11.213Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}