{"record":{"id":"402e0bb9d126ad20","repo":"RocketChat/Rocket.Chat","slug":"message-converter-not-found","errorCode":null,"errorMessage":"Message converter not found","messagePattern":"Message converter not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"apps/meteor/app/apps/server/bridges/rooms.ts","lineNumber":152,"sourceCode":"\t\tthis.orch.debugLog(`The App ${appId} is getting the room's creator by name: \"${roomName}\"`);\n\n\t\tconst room = await Rooms.findOneByName(roomName, {});\n\n\t\tif (!room?.u?._id) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn this.orch.getConverters()?.get('users').convertById(room.u._id);\n\t}\n\n\tprotected async getMessages(roomId: string, options: GetMessagesOptions, appId: string): Promise<IMessageRaw[]> {\n\t\tthis.orch.debugLog(`The App ${appId} is getting the messages of the room: \"${roomId}\" with options:`, options);\n\n\t\tconst { limit, skip = 0, sort: _sort, showThreadMessages } = options;\n\n\t\tconst messageConverter = this.orch.getConverters()?.get('messages');\n\t\tif (!messageConverter) {\n\t\t\tthrow new Error('Message converter not found');\n\t\t}\n\n\t\tconst threadFilterQuery = showThreadMessages ? {} : { tmid: { $exists: false } };\n\n\t\t// We support only one field for now\n\t\tconst sort: Sort | undefined = _sort?.createdAt ? { ts: _sort.createdAt } : undefined;\n\n\t\tconst messageQueryOptions: FindOptions<ICoreMessage> = {\n\t\t\tlimit,\n\t\t\tskip,\n\t\t\tsort,\n\t\t};\n\n\t\tconst query = {\n\t\t\trid: roomId,\n\t\t\t_hidden: { $ne: true },\n\t\t\tt: { $exists: false },\n\t\t\t...threadFilterQuery,","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/app/apps/server/bridges/rooms.ts#L134-L170","documentation":"AppRoomBridge.getMessages requires the orchestrator's converter registry to contain the 'messages' converter and throws when this.orch.getConverters()?.get('messages') returns undefined. On a healthy server the converters are registered while the Apps subsystem starts, so this error indicates an initialization/ordering failure rather than bad app input.","triggerScenarios":"Calling the get-messages API while the Apps orchestrator is still initializing (startup race); the apps subsystem being disabled/re-enabled mid-flight; a custom or modified server build where converter registration was changed or removed.","commonSituations":"Deployments where app code executes before full server startup; forks of Rocket.Chat that prune apps-engine wiring; errors during orchestrator construction that silently skip converter registration (check startup logs).","solutions":["Ensure the Apps framework is enabled and the server has fully started before apps serve requests","Restart the server and watch startup logs for apps orchestrator/converter errors","If running a fork, verify the code that registers the 'messages' converter still executes","Report upstream with server logs if it reproduces on an unmodified build"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const messages = await app.getRocketChat().getChat().getMessages(roomId, options);\n} catch (err) {\n  if (err instanceof Error && err.message === 'Message converter not found') {\n    // server-side initialization problem — retry after startup or report\n    app.getLogger().error('apps orchestrator not ready: message converter missing');\n    return [];\n  }\n  throw err;\n}","preventionTips":["Treat this as a server health signal, not an app bug — verify the Apps framework is enabled and startup finished","Delay app work that lists messages until the server is fully up","Capture and review startup logs for orchestrator/converter errors after deploys","On custom forks, keep the converter registration wiring intact"],"tags":["apps-engine","rooms","messages","converter","initialization"],"backgroundTag":"converter-not-found","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}