{"record":{"id":"774e7f7662b5f321","repo":"hyperledger/fabric","slug":"failed-to-unmarshal-proposal-response-s-response-p","errorCode":null,"errorMessage":"failed to unmarshal proposal response's response payload","messagePattern":"failed to unmarshal proposal response's response payload","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/lifecycle/chaincode/checkcommitreadiness.go","lineNumber":242,"sourceCode":"\t\t\"ChaincodeParameters\": \"ChaincodeParameters (Check the Sequence, ChaincodeName)\",\n\t\t\"EndorsementInfo\":     \"EndorsementInfo (Check the Version, InitRequired, EndorsementPlugin)\",\n\t\t\"ValidationInfo\":      \"ValidationInfo (Check the ValidationParameter, ValidationPlugin)\",\n\t\t\"Collections\":         \"Collections (Check the Collections)\",\n\t}\n\n\tif description, ok := descriptions[item]; ok {\n\t\treturn description\n\t}\n\treturn item\n}\n\n// printResponse prints the information included in the response\n// from the server as human readable plain-text.\nfunc (c *CommitReadinessChecker) printResponse(proposalResponse *pb.ProposalResponse) error {\n\tresult := &lb.CheckCommitReadinessResult{}\n\terr := proto.Unmarshal(proposalResponse.Response.Payload, result)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to unmarshal proposal response's response payload\")\n\t}\n\n\torgs := []string{}\n\tfor org := range result.Approvals {\n\t\torgs = append(orgs, org)\n\t}\n\tsort.Strings(orgs)\n\n\tfmt.Fprintf(c.Writer, \"Chaincode definition for chaincode '%s', version '%s', sequence '%d' on channel '%s' approval status by org:\\n\", c.Input.Name, c.Input.Version, c.Input.Sequence, c.Input.ChannelID)\n\tfor _, org := range orgs {\n\t\tfmt.Fprintf(c.Writer, \"%s: %t\", org, result.Approvals[org])\n\n\t\tif mismatch, ok := result.Mismatches[org]; ok && c.Input.InspectionEnabled && len(mismatch.Items) > 0 {\n\t\t\tfmt.Fprintf(c.Writer, \" (mismatch: [%s])\", strings.Join(result.Mismatches[org].Items, \", \"))\n\t\t}\n\t\tfmt.Fprintln(c.Writer)\n\t}\n","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/lifecycle/chaincode/checkcommitreadiness.go#L224-L260","documentation":"printResponse renders a readiness proposal response as human-readable plain text. This error means the payload of a successful ProposalResponse could not be unmarshaled into CheckCommitReadinessResult — same family as 1591 but on the non-JSON output path.","triggerScenarios":"c.printResponse(proposalResponse) is called with a payload that fails proto.Unmarshal into CheckCommitReadinessResult (incompatible peer response format).","commonSituations":"Mixed-version Fabric network; peer returning an unexpected payload despite SUCCESS status; MITM/proxy altering response body.","solutions":["Align peer and CLI Fabric versions (both 2.x)","Test with --output json to see if the JSON path parses the payload correctly (isolate the bug)","Retry against a different peer","Check the wrapped protobuf error for which field failed to parse"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if proposalResponse == nil || proposalResponse.Response == nil || len(proposalResponse.Response.Payload) == 0 { return errors.New(\"no payload to parse\") }","typeGuard":"func hasPayload(r *pb.ProposalResponse) bool { return r != nil && r.Response != nil && len(r.Response.Payload) > 0 }","tryCatchPattern":"if err := c.printResponse(resp); err != nil { if strings.Contains(err.Error(), \"failed to unmarshal\") { return printResponseAsJSON(resp, &lb.CheckCommitReadinessResult{}, c.Writer) } return err }","preventionTips":["Match peer and CLI Fabric versions","Verify with --output json whether the payload itself parses","Retry against another peer to isolate a bad node"],"tags":["fabric","protobuf","unmarshal"],"backgroundTag":"protobuf-unmarshal-failed","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}