{"record":{"id":"453378797437c4d1","repo":"apereo/cas","slug":"error-decoding-flow-execution","errorCode":null,"errorMessage":"Error decoding flow execution","messagePattern":"Error decoding flow execution","errorType":"exception","errorClass":"ClientFlowExecutionRepositoryException","httpStatus":null,"severity":"error","filePath":"core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/executor/ClientFlowExecutionRepository.java","lineNumber":87,"sourceCode":"    public FlowExecutionLock getLock(final FlowExecutionKey key) throws FlowExecutionRepositoryException {\n        return NOOP_LOCK;\n    }\n\n    @Override\n    public FlowExecution getFlowExecution(final FlowExecutionKey key) throws FlowExecutionRepositoryException {\n        if (key instanceof final ClientFlowExecutionKey clientFlowExecutionKey) {\n            try {\n                val encoded = clientFlowExecutionKey.getData();\n                val state = (SerializedFlowExecutionState) determineTranscoder().decode(encoded);\n\n                if (webflowProperties.getSession().isPinToSession()) {\n                    verifyWebflowSessionIsCorrectlyPinned(state);\n                }\n                val conversationScope = state.getConversationScope();\n                val flow = flowDefinitionLocator.getFlowDefinition(state.getFlowId());\n                return flowExecutionFactory.restoreFlowExecution(state.getExecution(), flow, key, conversationScope, this.flowDefinitionLocator);\n            } catch (final Exception e) {\n                throw new ClientFlowExecutionRepositoryException(\"Error decoding flow execution\", e);\n            }\n        }\n        throw new IllegalArgumentException(\"Expected instance of ClientFlowExecutionKey but got \" + key.getClass().getName());\n    }\n\n\n    @Override\n    public void putFlowExecution(final FlowExecution flowExecution) throws FlowExecutionRepositoryException {\n    }\n\n    @Override\n    public void removeFlowExecution(final FlowExecution flowExecution) throws FlowExecutionRepositoryException {\n    }\n\n    @Override\n    public FlowExecutionKey getKey(final FlowExecution execution) {\n        try {\n            if (webflowProperties.getSession().isPinToSession()) {","sourceCodeStart":69,"sourceCodeEnd":105,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/executor/ClientFlowExecutionRepository.java#L69-L105","documentation":"The flow execution encoded in the ClientFlowExecutionKey could not be restored: the transcoder failed to decode/decrypt the key data (tampered, corrupted, expired, or encrypted with different keys), or restoration of the state threw. ClientFlowExecutionRepositoryException wraps that cause. The input at fault is the opaque flow execution key data.","triggerScenarios":"Thrown at core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/executor/ClientFlowExecutionRepository.java:87 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Have the user restart the flow with a fresh key (the key is likely stale or corrupted)","Verify webflow cipher/encryption keys are stable across nodes and restarts","Inspect the wrapped cause for decode/decryption specifics","Ensure the key was not truncated in transit (URL length limits, proxies)"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e7288fc434b4f4505b8452e1a57e8fb3111bb863","analyzedAt":"2026-09-08T15:39:16.015Z","contentChangedAt":"2026-09-08T15:39:16.015Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}