hyperledger/fabric · error

no proposal responses received

Error message

no proposal responses received

What it means

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.

Source

Thrown at internal/peer/lifecycle/chaincode/commit.go:184

	}

	signedProposal, err := signProposal(proposal, c.Signer)
	if err != nil {
		return errors.WithMessage(err, "failed to create signed proposal")
	}

	var responses []*pb.ProposalResponse
	for _, endorser := range c.EndorserClients {
		proposalResponse, err := endorser.ProcessProposal(context.Background(), signedProposal)
		if err != nil {
			return errors.WithMessage(err, "failed to endorse proposal")
		}
		responses = append(responses, proposalResponse)
	}

	if len(responses) == 0 {
		// this should only be empty due to a programming bug
		return errors.New("no proposal responses received")
	}

	// all responses will be checked when the signed transaction is created.
	// for now, just set this so we check the first response's status
	proposalResponse := responses[0]

	if proposalResponse == nil {
		return errors.New("received nil proposal response")
	}

	if proposalResponse.Response == nil {
		return errors.New("received proposal response with nil response")
	}

	if proposalResponse.Response.Status != int32(cb.Status_SUCCESS) {
		return errors.Errorf("proposal failed with status: %d - %s", proposalResponse.Response.Status, proposalResponse.Response.Message)
	}
	// assemble a signed transaction (it's an Envelope message)

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Ensure at least one endorser client and a valid proposal are passed so responses are collected.
  2. Fix the caller loop so every collected proposalResponse is appended to responses.
  3. Verify Endorse clients are configured and endorsing succeeded before Commit.
  4. If this arises in stock fabric CLI, file/inspect a bug — it is not an expected user-facing condition.

Example fix

// before
if len(endorsementEndorsers) == 0 { return nil } // commit proceeds with no responses
// after
if len(endorsementEndorsers) == 0 { return errors.New("no endorsers configured") }
Defensive patterns

Strategy: validation

Validate before calling

if len(endorsementEndorsers) == 0 {
    return errors.New("cannot commit: no endorsers configured")
}

Type guard

func hasResponses(resps []*pb.ProposalResponse) bool { return len(resps) > 0 }

Try / catch

if err := commit(...); err != nil {
    if strings.Contains(err.Error(), "no proposal responses received") {
        // audit the collection loop / endorser configuration
    }
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/2479b7cc340faf12. Report an issue: GitHub.