{"record":{"id":"ad5921a1c866f6fe","repo":"dapr/dapr","slug":"workflow-s-history-key-s-declared-in-metada","errorCode":null,"errorMessage":"workflow '%s': history key '%s' declared in metadata (historyLength=%d) but missing from state store (transient store read failure or partial save?)","messagePattern":"workflow '(.+?)': history key '(.+?)' declared in metadata \\(historyLength=(.+?)\\) but missing from state store \\(transient store read failure or partial save\\?\\)","errorType":"exception","errorClass":"transientKeyMismatchError","httpStatus":null,"severity":"error","filePath":"pkg/runtime/wfengine/state/state.go","lineNumber":862,"sourceCode":"\t\t\t\terr:  fmt.Errorf(\"workflow '%s': inbox key '%s' declared in metadata (inboxLength=%d) but missing from state store (transient store read failure or partial save?)\", actorID, key, metadata.GetInboxLength()),\n\t\t\t\tetag: res.ETag,\n\t\t\t}\n\t\t}\n\n\t\tvar hist backend.HistoryEvent\n\t\terr = proto.Unmarshal(bulkRes[key].Data, &hist)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal history event from inbox state key '%s': %w\", key, err)\n\t\t}\n\n\t\twState.Inbox = append(wState.Inbox, &hist)\n\t}\n\n\tfor i := range metadata.GetHistoryLength() {\n\t\tkey = getMultiEntryKeyName(historyKeyPrefix, i)\n\t\tif bulkRes[key].Data == nil {\n\t\t\treturn nil, &transientKeyMismatchError{\n\t\t\t\terr:  fmt.Errorf(\"workflow '%s': history key '%s' declared in metadata (historyLength=%d) but missing from state store (transient store read failure or partial save?)\", actorID, key, metadata.GetHistoryLength()),\n\t\t\t\tetag: res.ETag,\n\t\t\t}\n\t\t}\n\n\t\tvar hist backend.HistoryEvent\n\t\terr = proto.Unmarshal(bulkRes[key].Data, &hist)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to unmarshal history event from history state key '%s': %w\", key, err)\n\t\t}\n\n\t\twState.History = append(wState.History, &hist)\n\t\twState.RawHistory = append(wState.RawHistory, bulkRes[key].Data)\n\t}\n\n\tfor i := range metadata.GetSigningCertificateLength() {\n\t\tkey = getMultiEntryKeyName(sigcertKeyPrefix, i)\n\t\tif bulkRes[key].Data == nil {\n\t\t\tif hasTamperMarker(wState) {","sourceCodeStart":844,"sourceCodeEnd":880,"githubUrl":"https://github.com/dapr/dapr/blob/74ad41702745709bb15fe2114ff693b8c59bc3cc/pkg/runtime/wfengine/state/state.go#L844-L880","documentation":"Error \"workflow '%s': history key '%s' declared in metadata (historyLength=%d) but missing from state store (transient store read failure or partial save?)\" thrown in dapr/dapr.","triggerScenarios":"Thrown at pkg/runtime/wfengine/state/state.go:862 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"}