{"record":{"id":"c1dc295019295f7a","repo":"dapr/dapr","slug":"failed-to-load-workflow-state-w","errorCode":null,"errorMessage":"failed to load workflow state: %w","messagePattern":"failed to load workflow state: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runtime/wfengine/state/state.go","lineNumber":821,"sourceCode":"\tfor i := range metadata.GetSigningCertificateLength() {\n\t\tbulkReq.Keys[n] = getMultiEntryKeyName(sigcertKeyPrefix, i)\n\t\tn++\n\t}\n\n\tfor i := range metadata.GetExternalSigningCertificateLength() {\n\t\tbulkReq.Keys[n] = getMultiEntryKeyName(extSigCertKeyPrefix, i)\n\t\tn++\n\t}\n\n\tfor i := range metadata.GetSignatureLength() {\n\t\tbulkReq.Keys[n] = getMultiEntryKeyName(signatureKeyPrefix, i)\n\t\tn++\n\t}\n\n\t// Perform the request\n\tbulkRes, err := state.GetBulk(ctx, bulkReq, false)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to load workflow state: %w\", err)\n\t}\n\n\tdefer func() {\n\t\t// TODO: @joshvanl: remove in v1.16 where we will no longer have legacy\n\t\t// state parsing issues.\n\t\tif rerr := recover(); rerr != nil {\n\t\t\twfLogger.Warnf(\"Found legacy workflow state, ignoring and overwriting with new storage API: %s; %v\", actorID, rerr)\n\t\t}\n\t}()\n\n\t// Parse responses. If metadata declares N inbox or history entries but\n\t// the bulk GET returns nil Data for any of them, return an error so the\n\t// caller can retry the load. Silently skipping was the previous\n\t// behavior, but under state-store chaos (transient read failures) it\n\t// produces a workflow runtime state with truncated history; durabletask\n\t// then reports name=(unknown)/events=0 and the workflow strands on the\n\t// next save, which clobbers the metadata HistoryLength.\n\tvar key string","sourceCodeStart":803,"sourceCodeEnd":839,"githubUrl":"https://github.com/dapr/dapr/blob/74ad41702745709bb15fe2114ff693b8c59bc3cc/pkg/runtime/wfengine/state/state.go#L803-L839","documentation":"Error \"failed to load workflow state: %w\" thrown in dapr/dapr.","triggerScenarios":"Thrown at pkg/runtime/wfengine/state/state.go:821 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":"74ad41702745709bb15fe2114ff693b8c59bc3cc","analyzedAt":"2026-08-16T04:22:26.543Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}