{"record":{"id":"9347a93bd6b92341","repo":"kestra-io/kestra","slug":"onboarding-tour-errors-no-execution-to-replay","errorCode":null,"errorMessage":"onboarding.tour.errors.no_execution_to_replay","messagePattern":"onboarding\\.tour\\.errors\\.no_execution_to_replay","errorType":"exception","errorClass":"TourSceneError","httpStatus":null,"severity":"error","filePath":"ui/src/components/onboarding/tour/useTourActions.ts","lineNumber":291,"sourceCode":"\n    const executeFlow = async (flowId: string = TOUR_FLOW_ID) => {\n        const execution = await executionsStore.triggerExecution({\n            namespace: TOUR_NAMESPACE,\n            id: flowId,\n            kind: \"NORMAL\",\n            formData: {},\n            labels: [TOUR_MANUAL_LABEL],\n        })\n        tourStore.setTourState({lastExecutionId: execution.id})\n        await openExecution(execution.id, flowId)\n        return waitForExecution(execution.id)\n    }\n\n    // Replay, not restart: only replay copies successful task-run outputs, which the fixed message needs.\n    const replayFromFailedTask = async () => {\n        const executionId = tour().failedExecutionId ?? tour().lastExecutionId\n        if (!executionId) {\n            throw new TourSceneError(\"onboarding.tour.errors.no_execution_to_replay\")\n        }\n\n        const execution = await executionsStore.loadExecution({id: executionId})\n        const failedTaskRun = (execution?.taskRunList ?? []).find(\n            (taskRun: any) => taskRun?.state?.current === \"FAILED\",\n        )\n        const revision = await latestRevision()\n\n        const replayed = await executionsStore.replayExecution({\n            executionId,\n            taskRunId: failedTaskRun?.id,\n            revision,\n        })\n\n        const replayedId = replayed?.id ?? executionId\n        tourStore.setTourState({restartedExecutionId: replayedId, lastExecutionId: replayedId})\n        await openExecution(replayedId)\n        return waitForExecution(replayedId)","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/ui/src/components/onboarding/tour/useTourActions.ts#L273-L309","documentation":"Thrown by the onboarding tour replay step when there is no execution to replay. replayFromFailedTask reads tour().failedExecutionId ?? tour().lastExecutionId; if both are null/undefined it cannot pick a source execution, so it throws TourSceneError with key 'onboarding.tour.errors.no_execution_to_replay'. This is a state-machine guard: the replay scene was entered without a prior execution being recorded in tour state.","triggerScenarios":"replayFromFailedTask() is called while tour().failedExecutionId and tour().lastExecutionId are both falsy (no prior execution stored in tourState), so TourSceneError is thrown with no extra context.","commonSituations":"The user skipped the execute-flow scene, tour state was cleared (localStorage reset, different browser, tenant switch), the prior execution never reached a failed state so failedExecutionId was never set, or the tour was resumed on a stale link.","solutions":["Ensure the execute-flow tour scene ran and produced an execution (lastExecutionId should be set in tour state).","If tour state was lost, restart the tour or jump back to the execute-flow scene.","Confirm the tour flow actually failed (a fully successful run leaves failedExecutionId unset)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const executionId = tour().failedExecutionId ?? tour().lastExecutionId;\nif (!executionId) {\n  // route the user back to the execute-flow scene instead of throwing\n  return router.push({name: 'onboarding/tour', query: {scene: 'execute_flow'}});\n}","typeGuard":null,"tryCatchPattern":"try {\n  return await replayFromFailedTask();\n} catch (e) {\n  if (e instanceof TourSceneError && e.key.endsWith('no_execution_to_replay')) {\n    guideUserToExecuteFlowScene();\n    return;\n  }\n  throw e;\n}","preventionTips":["Guard scene transitions so replay cannot be entered without a recorded execution.","Persist tour state so a refresh does not lose lastExecutionId.","Make the scene graph resilient: missing prerequisite => reroute, not throw."],"tags":["onboarding","tour","state","execution","frontend","i18n"],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}