twentyhq/twenty · critical · Error

Failed to seed object openRecordIn for workspace ${workspace

Error message

Failed to seed object openRecordIn for workspace ${workspaceId}

What it means

Thrown by the 2.27 command that seeds the object-level openRecordIn setting across objects. It collects objectMetadatasToUpdate and runs them through validateBuildAndRunLegacyWorkspaceMigration; on status === 'fail' it logs the report and throws. The report identifies which object(s) failed the update validation.

Source

Thrown at packages/twenty-server/src/database/commands/upgrade-version-command/2-27/2-27-workspace-command-1785505100000-seed-object-open-record-in.command.ts:188

          applicationUniversalIdentifier:
            twentyStandardFlatApplication.universalIdentifier,
          workspaceId,
          allFlatEntityOperationByMetadataName: {
            objectMetadata: {
              flatEntityToCreate: [],
              flatEntityToDelete: [],
              flatEntityToUpdate: objectMetadatasToUpdate,
            },
          },
        },
      );

    if (result.status === 'fail') {
      this.logger.error(
        `Failed to seed object openRecordIn:\n${JSON.stringify(result, null, 2)}`,
      );

      throw new Error(
        `Failed to seed object openRecordIn for workspace ${workspaceId}`,
      );
    }

    this.logger.log(`Seeded object openRecordIn for workspace ${workspaceId}`);
  }
}

View on GitHub (pinned to 1f5dd2bbd2)

Solutions

  1. Inspect the logged JSON report — note the failing object universalIdentifier(s) and error code.
  2. For each flagged object, verify it still exists and is active; correct any invalid openRecordIn value already stored.
  3. Invalidate and recompute the workspace object metadata cache, then re-run the 2.27 command.
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify target objects are active before submitting the batch:
const active = objectMetadatasToUpdate.filter(o => !o.isCustom && o.isActive !== false);
if (active.length !== objectMetadatasToUpdate.length) { /* investigate drift */ }

Try / catch

try {
  await command.runOnWorkspace({ workspaceId, options });
} catch (e) {
  logger.error({ workspaceId, err: e.message }, 'object openRecordIn seed failed');
}

Prevention

When it happens

Trigger: One of the objects being updated is missing, deactivated, or has an openRecordIn value that fails the field validator; an object universalIdentifier in the update batch no longer resolves in the workspace; a custom object shares a target table name with a standard one causing a collision in the generated migration.

Common situations: Objects deleted/deactivated by the workspace between cache load and build; a prior migration left openRecordIn in an invalid state; custom objects whose names collide with reserved tables.

Related errors


AI-assisted analysis of twentyhq/twenty@1f5dd2bbd2 (2026-08-12). Data as JSON: /api/errors/ce960effd1ab9dbb. Report an issue: GitHub.