temporalio/temporal · error · UnprocessableTaskError
cannot deserialize task %v
Error message
cannot deserialize task %v
What it means
Error "cannot deserialize task %v" thrown in temporalio/temporal.
Source
Thrown at service/history/timer_queue_task_executor_base.go:229
// meaning start version check will always pass.
// Also, there's no way we can perform version check before first run may already be deleted due to retention
}
func (t *timerQueueTaskExecutorBase) executeSingleStateMachineTimer(
ctx context.Context,
workflowContext historyi.WorkflowContext,
ms historyi.MutableState,
deadline time.Time,
timer *persistencespb.StateMachineTaskInfo,
execute func(node *hsm.Node, task hsm.Task) error,
) error {
def, ok := t.shardContext.StateMachineRegistry().TaskSerializer(timer.Type)
if !ok {
return queueserrors.NewUnprocessableTaskError(fmt.Sprintf("deserializer not registered for task type %v", timer.Type))
}
smt, err := def.Deserialize(timer.Data, hsm.TaskAttributes{Deadline: deadline})
if err != nil {
return fmt.Errorf(
"%w: %w",
queueserrors.NewUnprocessableTaskError(fmt.Sprintf("cannot deserialize task %v", timer.Type)),
err,
)
}
ref := hsm.Ref{
WorkflowKey: ms.GetWorkflowKey(),
StateMachineRef: timer.Ref,
Validate: smt.Validate,
}
// TODO(bergundy): Duplicated this logic from the Access method. We specify write access here because
// validateNotZombieWorkflow only blocks write access to zombie workflows.
if err := t.validateNotZombieWorkflow(ms, hsm.AccessWrite); err != nil {
return err
}
if err := t.validateStateMachineRef(ctx, workflowContext, ms, ref, false); err != nil {
return err
}View on GitHub (pinned to bde624efd1)
When it happens
Trigger: Thrown at service/history/timer_queue_task_executor_base.go:229 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01).
Data as JSON: /api/errors/1d334a38e7a7010a.
Report an issue: GitHub.