{"record":{"id":"09653109d53c78c2","repo":"twentyhq/twenty","slug":"standard-application-is-missing-messagelist-view","errorCode":null,"errorMessage":"Standard application is missing messageList view ${LIST_VIEW_UNIVERSAL_IDENTIFIER}","messagePattern":"Standard application is missing messageList view (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/twenty-server/src/database/commands/upgrade-version-command/2-20/2-20-workspace-command-1783525261001-create-message-list-view.command.ts","lineNumber":180,"sourceCode":"  }: {\n    flatViewMaps: WorkspaceCacheDataMap['flatViewMaps'];\n    standardAllFlatEntityMaps: TwentyStandardAllFlatEntityMaps;\n  }): FlatView[] {\n    if (\n      isDefined(\n        flatViewMaps.byUniversalIdentifier[LIST_VIEW_UNIVERSAL_IDENTIFIER],\n      )\n    ) {\n      return [];\n    }\n\n    const standardView = findFlatEntityByUniversalIdentifier<FlatView>({\n      flatEntityMaps: standardAllFlatEntityMaps.flatViewMaps,\n      universalIdentifier: LIST_VIEW_UNIVERSAL_IDENTIFIER,\n    });\n\n    if (!isDefined(standardView)) {\n      throw new Error(\n        `Standard application is missing messageList view ${LIST_VIEW_UNIVERSAL_IDENTIFIER}`,\n      );\n    }\n\n    return [standardView];\n  }\n}\n","sourceCodeStart":162,"sourceCodeEnd":188,"githubUrl":"https://github.com/twentyhq/twenty/blob/1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6/packages/twenty-server/src/database/commands/upgrade-version-command/2-20/2-20-workspace-command-1783525261001-create-message-list-view.command.ts#L162-L188","documentation":"Thrown by the 2.20 workspace upgrade command that creates the messageList standard view. In resolveViewsToCreate, after confirming the workspace does not yet have the 'allMessageLists' view, the command calls findFlatEntityByUniversalIdentifier against the computed twenty-standard-application flat view maps. If the standard definitions do not contain a FlatView with the universal identifier derived from STANDARD_OBJECTS.messageList.views.allMessageLists, the lookup returns undefined and the command throws. This is a code-level invariant: the command assumes the installed twenty-shared package defines that view.","triggerScenarios":"Running 'upgrade:2-20:create-message-list-view' when twenty-shared/metadata STANDARD_OBJECTS.messageList.views.allMessageLists.universalIdentifier does not resolve to a FlatView in computeTwentyStandardApplicationAllFlatEntityMaps. Happens on version skew between twenty-server and twenty-shared, or if the standard messageList object was forked/modified to omit the allMessageLists view.","commonSituations":"Upgrading a fork where standard objects were customized; running the command against an incompatible twenty-shared build; a regression in standard metadata definitions that removed or renamed the allMessageLists view identifier.","solutions":["Verify STANDARD_OBJECTS.messageList.views.allMessageLists.universalIdentifier exists in the installed twenty-shared package (rebuild twenty-shared if stale: npx nx build twenty-shared)","Ensure twenty-server and twenty-shared are at the same release version in the monorepo","Run the command with --dryRun first to confirm the standard view resolves without side effects","If the standard definition was intentionally removed, delete or update this upgrade command to match"],"exampleFix":"// before: identifier references a view that no longer exists in standard definitions\nconst LIST_VIEW_UNIVERSAL_IDENTIFIER =\n  LIST.views.allMessageLists.universalIdentifier;\n\n// after: guard with an early return if the standard definition is absent\nconst LIST_VIEW_UNIVERSAL_IDENTIFIER =\n  LIST.views.allMessageLists?.universalIdentifier;\n\nif (!isDefined(LIST_VIEW_UNIVERSAL_IDENTIFIER)) {\n  this.logger.warn('messageList allMessageLists view not in standard definitions, skipping');\n  return;\n}","handlingStrategy":"validation","validationCode":"// Before running the upgrade, verify the standard view exists in the installed definitions\nimport { STANDARD_OBJECTS } from 'twenty-shared/metadata';\n\nconst viewUid = STANDARD_OBJECTS.messageList?.views?.allMessageLists?.universalIdentifier;\n\nif (!viewUid) {\n  throw new Error('twenty-shared does not define messageList.views.allMessageLists — rebuild twenty-shared or align versions');\n}","typeGuard":"import { isDefined } from 'twenty-shared/utils';\n\nconst hasStandardView = (uid: string | undefined): uid is string =>\n  isDefined(uid) && uid.length > 0;","tryCatchPattern":null,"preventionTips":["Always rebuild twenty-shared before running workspace upgrade commands: npx nx build twenty-shared","Run upgrade commands with --dryRun first to validate standard-entity lookups without side effects","Keep twenty-server and twenty-shared at the same git tag / release version in the monorepo","Add an integration test that asserts every upgrade command's referenced standard identifiers resolve in computeTwentyStandardApplicationAllFlatEntityMaps"],"tags":["metadata","upgrade-command","standard-application","workspace-migration","flat-view"],"backgroundTag":null,"analyzedSha":"1f5dd2bbd2a8da3419c8cfd52dd545c0024df1a6","analyzedAt":"2026-08-12T15:37:27.593Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}