{"record":{"id":"1d334a38e7a7010a","repo":"temporalio/temporal","slug":"cannot-deserialize-task-v","errorCode":null,"errorMessage":"cannot deserialize task %v","messagePattern":"cannot deserialize task (.+?)","errorType":"exception","errorClass":"UnprocessableTaskError","httpStatus":null,"severity":"error","filePath":"service/history/timer_queue_task_executor_base.go","lineNumber":229,"sourceCode":"\t// meaning start version check will always pass.\n\t// Also, there's no way we can perform version check before first run may already be deleted due to retention\n}\n\nfunc (t *timerQueueTaskExecutorBase) executeSingleStateMachineTimer(\n\tctx context.Context,\n\tworkflowContext historyi.WorkflowContext,\n\tms historyi.MutableState,\n\tdeadline time.Time,\n\ttimer *persistencespb.StateMachineTaskInfo,\n\texecute func(node *hsm.Node, task hsm.Task) error,\n) error {\n\tdef, ok := t.shardContext.StateMachineRegistry().TaskSerializer(timer.Type)\n\tif !ok {\n\t\treturn queueserrors.NewUnprocessableTaskError(fmt.Sprintf(\"deserializer not registered for task type %v\", timer.Type))\n\t}\n\tsmt, err := def.Deserialize(timer.Data, hsm.TaskAttributes{Deadline: deadline})\n\tif err != nil {\n\t\treturn fmt.Errorf(\n\t\t\t\"%w: %w\",\n\t\t\tqueueserrors.NewUnprocessableTaskError(fmt.Sprintf(\"cannot deserialize task %v\", timer.Type)),\n\t\t\terr,\n\t\t)\n\t}\n\tref := hsm.Ref{\n\t\tWorkflowKey:     ms.GetWorkflowKey(),\n\t\tStateMachineRef: timer.Ref,\n\t\tValidate:        smt.Validate,\n\t}\n\t// TODO(bergundy): Duplicated this logic from the Access method. We specify write access here because\n\t// validateNotZombieWorkflow only blocks write access to zombie workflows.\n\tif err := t.validateNotZombieWorkflow(ms, hsm.AccessWrite); err != nil {\n\t\treturn err\n\t}\n\tif err := t.validateStateMachineRef(ctx, workflowContext, ms, ref, false); err != nil {\n\t\treturn err\n\t}","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/history/timer_queue_task_executor_base.go#L211-L247","documentation":"Error \"cannot deserialize task %v\" thrown in temporalio/temporal.","triggerScenarios":"Thrown at service/history/timer_queue_task_executor_base.go:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}