{"record":{"id":"2479b7cc340faf12","repo":"hyperledger/fabric","slug":"no-proposal-responses-received-2479b7","errorCode":null,"errorMessage":"no proposal responses received","messagePattern":"no proposal responses received","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/lifecycle/chaincode/commit.go","lineNumber":184,"sourceCode":"\t}\n\n\tsignedProposal, err := signProposal(proposal, c.Signer)\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to create signed proposal\")\n\t}\n\n\tvar responses []*pb.ProposalResponse\n\tfor _, endorser := range c.EndorserClients {\n\t\tproposalResponse, err := endorser.ProcessProposal(context.Background(), signedProposal)\n\t\tif err != nil {\n\t\t\treturn errors.WithMessage(err, \"failed to endorse proposal\")\n\t\t}\n\t\tresponses = append(responses, proposalResponse)\n\t}\n\n\tif len(responses) == 0 {\n\t\t// this should only be empty due to a programming bug\n\t\treturn errors.New(\"no proposal responses received\")\n\t}\n\n\t// all responses will be checked when the signed transaction is created.\n\t// for now, just set this so we check the first response's status\n\tproposalResponse := responses[0]\n\n\tif proposalResponse == nil {\n\t\treturn errors.New(\"received nil proposal response\")\n\t}\n\n\tif proposalResponse.Response == nil {\n\t\treturn errors.New(\"received proposal response with nil response\")\n\t}\n\n\tif proposalResponse.Response.Status != int32(cb.Status_SUCCESS) {\n\t\treturn errors.Errorf(\"proposal failed with status: %d - %s\", proposalResponse.Response.Status, proposalResponse.Response.Message)\n\t}\n\t// assemble a signed transaction (it's an Envelope message)","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/lifecycle/chaincode/commit.go#L166-L202","documentation":"Commit collects a proposal response from each endorser and requires at least one. An empty responses slice indicates a programming bug in the caller — normally each collected response is appended, so len(responses)==0 should be impossible in correct flows.","triggerScenarios":"Calling Commit with a proposal whose endorser list produced no appended responses — i.e., the loop collecting proposalResponse never appended (mis-wired client or empty endorsements slice).","commonSituations":"Custom SDK/tooling invoking lifecycle Commit with no endorsers; modified or vendored code where the collection loop was skipped; tests exercising Commit with empty fixtures.","solutions":["Ensure at least one endorser client and a valid proposal are passed so responses are collected.","Fix the caller loop so every collected proposalResponse is appended to responses.","Verify Endorse clients are configured and endorsing succeeded before Commit.","If this arises in stock fabric CLI, file/inspect a bug — it is not an expected user-facing condition."],"exampleFix":"// before\nif len(endorsementEndorsers) == 0 { return nil } // commit proceeds with no responses\n// after\nif len(endorsementEndorsers) == 0 { return errors.New(\"no endorsers configured\") }","handlingStrategy":"validation","validationCode":"if len(endorsementEndorsers) == 0 {\n    return errors.New(\"cannot commit: no endorsers configured\")\n}","typeGuard":"func hasResponses(resps []*pb.ProposalResponse) bool { return len(resps) > 0 }","tryCatchPattern":"if err := commit(...); err != nil {\n    if strings.Contains(err.Error(), \"no proposal responses received\") {\n        // audit the collection loop / endorser configuration\n    }\n}","preventionTips":["Verify endorsement step succeeded and responses were appended before Commit.","Configure at least one endorser client in ClientConnections.","Cover the responses-collection path with tests."],"tags":["hyperledger-fabric","programming-bug","proposal-response"],"backgroundTag":"empty-response-collection","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"}