Failed to import Prod to Dev due to crons component validation

I’m trying to export my prod Convex DB and import it into dev, but I’m consistently blocked by schema validation on the crons component table. What I’m doing Export from prod: npx convex export --prod --path prod-data.zip Import into dev (empty DB): npx convex import --replace-all prod-data.zip The error Even though my dev DB is empty, I get: Hit an error while importing:
Failed to insert or update a document in table "crons" because it does not match the schema: Value does not match validator. Path: .schedulerJobId Value: "kc2358c11gms18ajcbsedrjgn57xxxxx" Validator: v.id("_scheduled_functions")
At first I thought this was my own schema, but I tracked it down: this crons table and schedulerJobId field are coming from the crons component, not from any schema I control. What I tried To get around schema validation, I changed my convex/schema.ts to:
import { defineSchema } from "convex/server";
// ...my tables and the crons component

export default defineSchema(
{
// all tables, including crons component tables
},
{
schemaValidation: false,
},
);
import { defineSchema } from "convex/server";
// ...my tables and the crons component

export default defineSchema(
{
// all tables, including crons component tables
},
{
schemaValidation: false,
},
);
Then I ran npx convex dev / npx convex deploy for the dev deployment I’m importing into, and re-ran: npx convex import --replace-all prod-data.zip But I still see the same validation error mentioning: Validator: v.id("_scheduled_functions") which suggests the deployment is still enforcing the schedulerJobId: v.id("_scheduled_functions") validator from the crons component, even though I’ve set schemaValidation: false in defineSchema for this deployment. According to the docs, setting schemaValidation: false should skip runtime validation of inserts/updates against validators. Any help?
2 Replies
Convex Bot
Convex Bot3d ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
ginodrose - Tap2
ginodrose - Tap2OP3d ago
Managed to work around it by deleting manually the content of the exported production zip _components/crons/crons/documents.jsonl (which is really not ideal) However I will keep this open for further inspections

Did you find this page helpful?