twentyhq/twenty · critical · Error
Failed to backfill standard skills for workspace ${workspace
Error message
Failed to backfill standard skills for workspace ${workspaceId} What it means
Thrown by the 2.27 command that backfills standard Skills into existing workspaces. It builds skill flat entities and submits them via validateBuildAndRunLegacyWorkspaceMigration; on status === 'fail' it logs the full report then throws. The failure is in the skill flat-entity operations — the orchestrator's report (nested under the logged JSON) identifies which skill(s) and which validation rule failed.
Source
Thrown at packages/twenty-server/src/database/commands/upgrade-version-command/2-27/2-27-workspace-command-1785499350000-backfill-standard-skills.command.ts:110
allFlatEntityOperationByMetadataName: {
skill: {
flatEntityToCreate: skillsToCreate,
flatEntityToDelete: [],
flatEntityToUpdate: [],
},
},
workspaceId,
applicationUniversalIdentifier:
twentyStandardFlatApplication.universalIdentifier,
},
);
if (validateAndBuildResult.status === 'fail') {
this.logger.error(
`Failed to backfill standard skills:\n${JSON.stringify(validateAndBuildResult, null, 2)}`,
);
throw new Error(
`Failed to backfill standard skills for workspace ${workspaceId}`,
);
}
this.logger.log(
`Successfully created ${skillsToCreate.length} standard skill(s) for workspace ${workspaceId}`,
);
}
}
View on GitHub (pinned to 1f5dd2bbd2)
Solutions
- Inspect the logged JSON report (this command logs it via logger.error before throwing) — find the failing skill universalIdentifier and the error code.
- Verify the referenced application and any object/field identifiers the skill depends on exist for the workspace (query core.metadata).
- Remove or repair colliding/dangling skill rows for that workspace, then re-run the 2.27 command.
- If upgrading across many skipped versions, run the intermediate major upgrades first so all dependent metadata exists.
Defensive patterns
Strategy: try-catch
Try / catch
try {
await command.runOnWorkspace({ workspaceId, options });
} catch (e) {
// the command logs the full report via logger.error before throwing;
// capture workspaceId and continue the per-workspace loop.
upgradeRunner.markWorkspaceFailed(workspaceId, e);
} Prevention
- Run intermediate major-version upgrades so all objects/fields the skills reference already exist.
- Ensure the twentyStandardFlatApplication record exists and is linked for each workspace before the 2.27 upgrade.
- Read the logged report to find the failing skill universalIdentifier before retrying.
When it happens
Trigger: A skill flat entity references an application/object/field universalIdentifier that does not exist in the target workspace; a skill universalIdentifier already exists with a different shape (collision); a dependent relation or workflow node references a skill that the validator cannot resolve; the twentyStandardFlatApplication record is missing or mislinked for the workspace.
Common situations: Workspace created on an older release where the standard application seed diverged from current code; partial earlier skill seeding that left half-written rows; cross-version upgrade skipping intermediate releases so dependent metadata (objects the skills reference) is absent.
Related errors
- Failed to add NOT_RECORDED to CallRecording status metadata
- Failed to add the Block Settings command menu item for works
- Failed to backfill record page(s) for workspace ${workspaceI
- Failed to create the workspaceMember openRecordIn field for
- Failed to seed object openRecordIn for workspace ${workspace
AI-assisted analysis of twentyhq/twenty@1f5dd2bbd2 (2026-08-12).
Data as JSON: /api/errors/13b8ce6d1d72db32.
Report an issue: GitHub.