{"record":{"id":"e8f99fa8e806505a","repo":"meteor/meteor","slug":"service-not-configured-e8f99f","errorCode":null,"errorMessage":"Service not configured","messagePattern":"Service not configured","errorType":"exception","errorClass":"ServiceConfiguration.ConfigError","httpStatus":null,"severity":"error","filePath":"packages/meteor-developer-oauth/meteor_developer_server.js","lineNumber":36,"sourceCode":"\n  return {\n    serviceData,\n    options: {profile: {name: serviceData.username}}\n    // XXX use username for name until meteor accounts has a profile with a name\n  };\n});\n\n// returns an object containing:\n// - accessToken\n// - expiresIn: lifetime of token in seconds\n// - refreshToken, if this is the first authorization request and we got a\n//   refresh token from the server\nconst getTokens = async (query) => {\n  const config = await ServiceConfiguration.configurations.findOneAsync({\n    service: 'meteor-developer',\n  });\n  if (!config) {\n    throw new ServiceConfiguration.ConfigError();\n  }\n\n  const body = OAuth._addValuesToQueryParams({\n    grant_type: 'authorization_code',\n    code: query.code,\n    client_id: config.clientId,\n    client_secret: OAuth.openSecret(config.secret),\n    redirect_uri: OAuth._redirectUri('meteor-developer', config),\n  }).toString();\n\n  return OAuth._fetch(\n    MeteorDeveloperAccounts._server + '/oauth2/token',\n    'POST',\n    {\n      headers: {\n        Accept: 'application/json',\n        'Content-type': 'application/x-www-form-urlencoded',\n      },","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/meteor/meteor/blob/5076d2f818d3cac01d0cf8312fa5b2332076a4fb/packages/meteor-developer-oauth/meteor_developer_server.js#L18-L54","documentation":"Thrown server-side in the meteor-developer OAuth handler's getTokens when ServiceConfiguration.configurations.findOneAsync({service:'meteor-developer'}) returns null. Standard ServiceConfiguration.ConfigError indicating the meteor-developer service credentials were never registered.","triggerScenarios":"The meteor-developer OAuth callback fires (token exchange attempted) with no meteor-developer config document in the database.","commonSituations":"Forgot to seed meteor-developer credentials; config in the wrong environment/DB; config document removed.","solutions":["Insert/upsert the config: ServiceConfiguration.configurations.upsert({service:'meteor-developer'}, {$set:{clientId, secret, loginStyle}}).","Confirm the server uses the database holding the config.","Re-seed configuration on deploy."],"exampleFix":"// before — no meteor-developer config registered\n\n// after\nimport { ServiceConfiguration } from 'meteor/service-configuration';\nServiceConfiguration.configurations.upsert(\n  { service: 'meteor-developer' },\n  { $set: { clientId, secret, loginStyle: 'popup' } }\n);","handlingStrategy":"validation","validationCode":"import { ServiceConfiguration } from 'meteor/service-configuration';\nasync function meteorDevConfigured() {\n  return !!(await ServiceConfiguration.configurations.findOneAsync({ service: 'meteor-developer' }));\n}","typeGuard":null,"tryCatchPattern":"try {\n  const tokens = await getTokens(query);\n} catch (err) {\n  if (err instanceof ServiceConfiguration.ConfigError) {\n    // admin-facing: register meteor-developer credentials\n  }\n  throw err;\n}","preventionTips":["Seed meteor-developer credentials in a server startup hook.","Add a deploy/startup smoke test that asserts the config document exists.","Load credentials from settings.json at boot."],"tags":["oauth","meteor-developer","configuration"],"backgroundTag":null,"analyzedSha":"5076d2f818d3cac01d0cf8312fa5b2332076a4fb","analyzedAt":"2026-08-13T03:27:40.142Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}