RocketChat/Rocket.Chat · error
Not implemented.
Error message
Not implemented.
What it means
AppPersistenceBridge.update(id, data, upsert, appId) is a stub in the Meteor implementation: after the object-type guard it unconditionally throws 'Not implemented.'. Updating a persistence record by its raw document id is simply not supported by the server bridge — only association-based writes (createWithAssociations / updateByAssociations) are implemented.
Solutions
- Use updateByAssociations(associations, data, upsert) — it is implemented and upserts
- Always create records with createWithAssociations so you can update them later by the same associations
- Alternatively emulate update: read by id, remove, then re-create with associations
- Never persist state whose only handle is the create()-returned Mongo id
Example fix
// before const id = await app.getPersistence().create(data); await persistenceUpdateById(id, newData); // bridge throws Not implemented. // after const assoc = [ RocketChatAssociationRecord.MINE ]; await app.getPersistence().createWithAssociations(data, assoc); await app.getPersistence().updateByAssociations(assoc, newData, true); // upsert supported
Defensive patterns
Strategy: fallback
Try / catch
try {
await persistenceUpdateById(id, newData);
} catch (err) {
if (err instanceof Error && err.message === 'Not implemented.') {
// fall back to the supported association-based upsert
await app.getPersistence().updateByAssociations(associations, newData, true);
return;
}
throw err;
} Prevention
- Never design storage around the create()-returned Mongo id — use associations from the start
- Standardize on createWithAssociations + updateByAssociations pairs in your persistence layer
- If you must key by id: readById, remove, then createWithAssociations the new data
- Watch apps-engine release notes if an update-by-id implementation ever lands
When it happens
Trigger: Any app code path that ends in the bridge's update(): e.g. calling apps-engine persistence update-by-id helpers, or storing with create() and then trying to modify the record using the returned id.
Common situations: Developers assuming CRUD symmetry (create/read/update/delete by id); porting examples that predate the association-based API; refactoring away from associations to raw ids.
Related errors
- Attempted to store an invalid data type, it must be an…
- Method not implemented.
- A new user type has been added that the Apps don't know…
- A video conference must exist to update.
- app-addon-not-valid
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/ea7d546c0c62ecb9.
Report an issue: GitHub.
Appendix: source
Thrown at apps/meteor/app/apps/server/bridges/persistence.ts:113
const records = await this.orch.getPersistenceModel().find(query).toArray();
if (!records?.length) {
return undefined;
}
await this.orch.getPersistenceModel().remove(query);
return Array.isArray(records) ? records.map((r) => r.data) : [];
}
protected async update(id: string, data: object, _upsert: boolean, appId: string): Promise<string> {
this.orch.debugLog(`The App ${appId} is updating the record "${id}"`);
if (typeof data !== 'object') {
throw new Error('Attempted to store an invalid data type, it must be an object.');
}
throw new Error('Not implemented.');
}
protected async updateByAssociations(
associations: Array<RocketChatAssociationRecord>,
data: object,
upsert = true,
appId: string,
): Promise<string> {
this.orch.debugLog({ msg: `The App ${appId} is updating the record with association to data as follows:`, associations });
if (typeof data !== 'object') {
throw new Error('Attempted to store an invalid data type, it must be an object.');
}
const query = {
appId,
associations,
};View on GitHub (pinned to b2c16d5842)