{"record":{"id":"e340638a4079887e","repo":"RocketChat/Rocket.Chat","slug":"the-setting-id-is-not-readable","errorCode":null,"errorMessage":"The setting \"${id}\" is not readable.","messagePattern":"The setting \"(.+?)\" is not readable\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/meteor/app/apps/server/bridges/settings.ts","lineNumber":27,"sourceCode":"\nexport class AppSettingBridge extends ServerSettingBridge {\n\tconstructor(private readonly orch: IAppServerOrchestrator) {\n\t\tsuper();\n\t}\n\n\tprotected async getAll(appId: string): Promise<Array<ISetting>> {\n\t\tthis.orch.debugLog(`The App ${appId} is getting all the settings.`);\n\n\t\tconst settings = await Settings.find({ secret: false }).toArray();\n\t\treturn settings.map((s) => this.orch.getConverters()?.get('settings').convertToApp(s));\n\t}\n\n\tprotected async getOneById(id: string, appId: string): Promise<ISetting> {\n\t\tthis.orch.debugLog(`The App ${appId} is getting the setting by id ${id}.`);\n\n\t\tconst setting = await this.getReadableSettingById(id, appId);\n\t\tif (!setting) {\n\t\t\tthrow new Error(`The setting \"${id}\" is not readable.`);\n\t\t}\n\n\t\treturn setting;\n\t}\n\n\tprotected async hideGroup(name: string, appId: string): Promise<void> {\n\t\tthis.orch.debugLog(`The App ${appId} is hidding the group ${name}.`);\n\n\t\tthrow new Error('Method not implemented.');\n\t}\n\n\tprotected async hideSetting(id: string, appId: string): Promise<void> {\n\t\tthis.orch.debugLog(`The App ${appId} is hidding the setting ${id}.`);\n\n\t\tif (!(await this.isReadableById(id, appId))) {\n\t\t\tthrow new Error(`The setting \"${id}\" is not readable.`);\n\t\t}\n","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/app/apps/server/bridges/settings.ts#L9-L45","documentation":"Thrown by getOneById when getReadableSettingById returns null. A setting is 'not readable' if it does not exist, is hidden and the app lacks explicit permission, the app has no server-setting.read permission, or the app itself is not found in the manager. Readability is gated by the app's declared permissions, not just the secret/hidden flag.","triggerScenarios":"App calls getOneById(id) for a setting id that is hidden/secret, does not exist, or is outside the app's declared server-setting.read scope (including when the app declares no permissions at all).","commonSituations":"App tries to read an internal/admin-only setting it never declared permission for; setting id is misspelled; the setting was removed in a newer Rocket.Chat version; app's permission declaration is missing the hiddenSettings entry for a hidden setting it legitimately needs.","solutions":["Declare a server-setting.read permission in the app's manifest with the needed hiddenSettings entries.","Confirm the setting id exists and is not hidden, or request access explicitly.","Use getAll() to discover the actually-readable setting ids instead of guessing."],"exampleFix":"// before\nconst siteUrl = await read.getEnvironmentReader().getServerSettings().getOneById('Site_Url');\n\n// after\n// app.json: declare permission\n// {\n//   \"permissions\": [{ \"name\": \"server-setting.read\", \"hiddenSettings\": [\"Site_Url\"] }]\n// }\nconst siteUrl = await read.getEnvironmentReader().getServerSettings().getOneById('Site_Url');","handlingStrategy":"validation","validationCode":"const readable = await read.getEnvironmentReader().getServerSettings().isReadableById(id);\nif (!readable) {\n  throw new Error(`App cannot read setting ${id}; check permissions`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const s = await read.getEnvironmentReader().getServerSettings().getOneById(id);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('is not readable')) {\n    // declare server-setting.read permission or use a different setting\n  } else {\n    throw err;\n  }\n}","preventionTips":["Declare server-setting.read with the needed ids/hiddenSettings in app.json.","Prefer getAll() to discover readable setting ids.","Spell setting ids exactly as defined on the server."],"tags":["apps-engine","settings","permissions","validation"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}