{"record":{"id":"472d8f1a00fac7bc","repo":"strapi/strapi","slug":"impossible-to-proceed-to-the-given-step","errorCode":null,"errorMessage":"Impossible to proceed to the given step","messagePattern":"Impossible to proceed to the given step","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/data-transfer/src/strapi/remote/flows/index.ts","lineNumber":72,"sourceCode":"      const indexesDifference = findStepIndex(step) - findStepIndex(state.step);\n\n      // It's possible to send multiple time the same transfer step in a row\n      if (indexesDifference === 0 && step.kind === 'transfer') {\n        return true;\n      }\n\n      return indexesDifference > 0;\n    },\n\n    cannot(step: Step) {\n      return !this.can(step);\n    },\n\n    set(step: Step) {\n      const canSwitch = this.can(step);\n\n      if (!canSwitch) {\n        throw new Error('Impossible to proceed to the given step');\n      }\n\n      state.step = step;\n\n      return this;\n    },\n\n    get() {\n      return state.step;\n    },\n  };\n};\n","sourceCodeStart":54,"sourceCodeEnd":85,"githubUrl":"https://github.com/strapi/strapi/blob/4a4101264d7098754df36e85fa629fd2f2349d8c/packages/core/data-transfer/src/strapi/remote/flows/index.ts#L54-L85","documentation":"Thrown by createFlow's set() method when can(step) returns false — i.e., the requested step is at an index earlier than the current step (the flow only allows forward movement, with one exception: re-sending the same transfer stage is permitted). This guards the server-side transfer state machine against clients that send steps out of order or attempt to go backward.","triggerScenarios":"A client sends a transfer step that precedes the current one (e.g., requesting 'init' after 'bootstrap' already ran), or an action step that has already been executed and isn't idempotently repeatable.","commonSituations":"Version mismatch between client and server causing different flow definitions; a buggy/retrying client resending an earlier step after the server advanced; a custom client that doesn't follow the ordered flow (init → bootstrap → schemas → entities → links → ...).","solutions":["Send transfer steps in the order defined by DEFAULT_TRANSFER_FLOW; do not resend an earlier step once the server has advanced.","Ensure client and server run compatible Strapi versions so the flow definition matches.","If a step failed and must be retried, restart the entire transfer (new transferID) rather than replaying an earlier step."],"exampleFix":"// before — client sends steps out of order\nflow.set({ kind: 'transfer', stage: 'init' }); // after bootstrap already ran\n// after — check before setting, or start a new transfer\nif (flow.can({ kind: 'transfer', stage: 'init' })) {\n  flow.set({ kind: 'transfer', stage: 'init' });\n}","handlingStrategy":"validation","validationCode":"// Check flow.can(step) before calling set()\nif (flow.can(step)) {\n  flow.set(step);\n} else {\n  // step is behind current — reject the client message or start a new transfer\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Send transfer steps strictly in the order defined by DEFAULT_TRANSFER_FLOW.","Never resend an earlier step after the server advanced; restart the transfer (new transferID) instead.","Keep client and server Strapi versions aligned so the flow definition matches."],"tags":["data-transfer","state-machine","protocol","ordering","server-side"],"backgroundTag":null,"analyzedSha":"4a4101264d7098754df36e85fa629fd2f2349d8c","analyzedAt":"2026-08-12T12:47:50.760Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}