twenty icon indicating copy to clipboard operation
twenty copied to clipboard

Fresh install for k8 - error on create workspace - driverError: error: null value in column "fieldMetadataId" of relation "viewField" violates not-null constraint

Open magnetic5355 opened this issue 2 weeks ago • 3 comments

Bug Description

Fresh install for k8 - error on create workspace - driverError: error: null value in column "fieldMetadataId" of relation "viewField" violates not-null constraint

Image

Image

Example:

Use manifests from repo to install on k8 using kubectl. 

Expected behavior

Can use the application :)

Example:

First run opens, user and password are created, prompts work workspace, application crashes and cannot proceed

Technical inputs

Example:

 twentycrm NotFoundError: Workspace not found                                                                                                                                                                                                               │
│ twentycrm     at new BaseGraphQLError (/app/packages/twenty-server/dist/src/engine/core-modules/graphql/utils/graphql-errors.util.js:86:9)                                                                                                                 │
│ twentycrm     at new NotFoundError (/app/packages/twenty-server/dist/src/engine/core-modules/graphql/utils/graphql-errors.util.js:170:9)                                                                                                                   │
│ twentycrm     at workspaceGraphqlApiExceptionHandler (/app/packages/twenty-server/dist/src/engine/core-modules/workspace/utils/workspace-graphql-api-exception-handler.util.js:18:23)                                                                      │
│ twentycrm     at WorkspaceResolver.getPublicWorkspaceDataByDomain (/app/packages/twenty-server/dist/src/engine/core-modules/workspace/workspace.resolver.js:207:94)                                                                                        │
│ twentycrm     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)                                                                                                                                                                │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncMetadataService] Syncing standard objects and fields metadata                                                                                                                          │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncMetadataService] Syncing standard objects and fields metadata                                                                                                                          │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncObjectMetadataService] Comparing standard objects and fields metadata                                                                                                                  │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncObjectMetadataService] Updating workspace metadata                                                                                                                                     │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncObjectMetadataService] Generating migrations                                                                                                                                           │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncObjectMetadataService] Saving migrations                                                                                                                                               │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncFieldMetadataService] Updating workspace metadata                                                                                                                                      │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncFieldMetadataService] Generating migrations                                                                                                                                            │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:50 PM     LOG [WorkspaceSyncFieldMetadataService] Saving migrations                                                                                                                                                │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:51 PM     LOG [WorkspaceSyncIndexMetadataService] Syncing index metadata                                                                                                                                           │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:52 PM     LOG [WorkspaceSyncMetadataService] Executing pending migrations                                                                                                                                          │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:57 PM     LOG [WorkspaceMetadataCacheService:recomputeMetadataCache] Execution time: 413.37ms                                                                                                                      │
│ twentycrm [Nest] 1  - 02/14/2025, 11:08:57 PM     LOG [WorkspaceMetadataVersionService:incrementMetadataVersion] Execution time: 422.54ms                                                                                                                  │
│ twentycrm /app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219                                                                                                                                                                             │
│ twentycrm             throw new QueryFailedError_1.QueryFailedError(query, parameters, err);
twentycrm QueryFailedError: null value in column "fieldMetadataId" of relation "viewField" violates not-null constraint                                                                                                                                    │
│ twentycrm     at PostgresQueryRunner.query (/app/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js:219:19)                                                                                                                                       │
│ twentycrm     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)                                                                                                                                                                │
│ twentycrm     at async InsertQueryBuilder.execute (/app/node_modules/typeorm/query-builder/InsertQueryBuilder.js:106:33)                                                                                                                                   │
│ twentycrm     at async createWorkspaceViews (/app/packages/twenty-server/dist/src/engine/workspace-manager/standard-objects-prefill-data/create-workspace-views.js:42:13)                                                                                  │
│ twentycrm     at async /app/packages/twenty-server/dist/src/engine/workspace-manager/standard-objects-prefill-data/standard-objects-prefill-data.js:36:39                                                                                                  │
│ twentycrm     at async EntityManager.transaction (/app/node_modules/typeorm/entity-manager/EntityManager.js:73:28) {                                                                                                                                       │
│ twentycrm   query: 'INSERT INTO "workspace_75newspk38m8w5lhey3kdxoni"."viewField"("fieldMetadataId", "position", "isVisible", "size", "viewId", "aggregateOperation") VALUES ($1, $2, $3, $4, $5, DEFAULT), ($6, $7, $8, $9, $10, DEFAULT), (DEFAULT, $11, │
│ twentycrm   parameters: [                                                                                                                                                                                                                                  │
│ twentycrm     '8c64443e-fdde-4b06-9e81-51b76dc66b52',                                                                                                                                                                                                      │
│ twentycrm     0,                                                                                                                                                                                                                                           │
│ twentycrm     true,                                                                                                                                                                                                                                        │
│ twentycrm     210,                                                                                                                                                                                                                                         │
│ twentycrm     '254eb8d3-e99e-45c6-a789-1cf7f3d35e72',                                                                                                                                                                                                      │
│ twentycrm     '82a812b3-5bce-4d70-8486-a66ff1bee886',                                                                                                                                                                                                      │
│ twentycrm     1,                                                                                                                                                                                                                                           │
│ twentycrm     true,                                                                                                                                                                                                                                        │
│ twentycrm     150,                                                                                                                                                                                                                                         │
│ twentycrm     '254eb8d3-e99e-45c6-a789-1cf7f3d35e72',                                                                                                                                                                                                      │
│ twentycrm     2,                                                                                                                                                                                                                                           │
│ twentycrm     true,                                                                                                                                                                                                                                        │
│ twentycrm     150,                                                                                                                                                                                                                                         │
│ twentycrm     '254eb8d3-e99e-45c6-a789-1cf7f3d35e72',                                                                                                                                                                                                      │
│ twentycrm     'e27fedbc-b447-44a0-a822-2e3cb5aad85b',                                                                                                                                                                                                      │
│ twentycrm     3,                                                                                                                                                                                                                                           │
│ twentycrm     true,                                                                                                                                                                                                                                        │
│ twentycrm     150,                                                                                                                                                                                                                                         │
│ twentycrm     '254eb8d3-e99e-45c6-a789-1cf7f3d35e72',                                                                                                                                                                                                      │
│ twentycrm     '835493e9-a9b8-45f8-b60a-50e1fb24da61',                                                                                                                                                                                                      │
│ twentycrm     4,                                                                                                                                                                                                                                           │
│ twentycrm     true,                                                                                                                                                                                                                                        │
│ twentycrm     150,                                                                                                                                                                                                                                         │
│ twentycrm     '254eb8d3-e99e-45c6-a789-1cf7f3d35e72'                                                                                                                                                                                                       │
│ twentycrm   ],                           

magnetic5355 avatar Feb 14 '25 23:02 magnetic5355