hyperledger/fabric · error

chaincode install failed: received proposal response with ni

Error message

chaincode install failed: received proposal response with nil response

What it means

The install proposal's endorsement returned a proposalResponse whose inner Response field is nil, so the CLI cannot read status or payload. The endorser replied, but without the expected embedded response structure.

Source

Thrown at internal/peer/lifecycle/chaincode/install.go:162

	if err != nil {
		return errors.WithMessage(err, "failed to create signed proposal for chaincode install")
	}

	return i.submitInstallProposal(signedProposal)
}

func (i *Installer) submitInstallProposal(signedProposal *pb.SignedProposal) error {
	proposalResponse, err := i.EndorserClient.ProcessProposal(context.Background(), signedProposal)
	if err != nil {
		return errors.WithMessage(err, "failed to endorse chaincode install")
	}

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

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

	if proposalResponse.Response.Status != int32(cb.Status_SUCCESS) {
		return errors.Errorf("chaincode install failed with status: %d - %s", proposalResponse.Response.Status, proposalResponse.Response.Message)
	}
	logger.Infof("Installed remotely: %v", proposalResponse)

	icr := &lb.InstallChaincodeResult{}
	err = proto.Unmarshal(proposalResponse.Response.Payload, icr)
	if err != nil {
		return errors.Wrap(err, "failed to unmarshal proposal response's response payload")
	}
	logger.Infof("Chaincode code package identifier: %s", icr.PackageId)

	return nil
}

func (i *Installer) createInstallProposal(pkgBytes []byte, creatorBytes []byte) (*pb.Proposal, error) {

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Retry the install against the peer and check peer logs for panics or endorsement errors.
  2. Verify peer CLI and peer node are on compatible Fabric versions.
  3. Bypass any proxy/load balancer and connect directly to the peer to rule out message corruption.
  4. Confirm TLS and address configuration so you're hitting the intended peer endpoint.

Example fix

// before: via mutating proxy
--peerAddresses proxy.example.com:7051
// after: direct peer address
--peerAddresses peer0.org1.example.com:7051
Defensive patterns

Strategy: type-guard

Validate before calling

// confirm direct peer reachability before install
tcpAddr := fmt.Sprintf("%s:%d", peerHost, peerPort)
if c, err := net.DialTimeout("tcp", tcpAddr, 5*time.Second); err != nil { return err } else { c.Close() }

Type guard

func hasInnerResponse(r *pb.ProposalResponse) bool { return r != nil && r.Response != nil }

Try / catch

resp, err := submitInstallProposal(sp)
if err == nil && !hasInnerResponse(resp) {
    // retry directly against peer, bypassing proxies
}

Prevention

When it happens

Trigger: proposalResponse.Response == nil check in submitInstallProposal fires after ProcessProposal returned a non-nil response lacking its Response member during chaincode install.

Common situations: Malformed peer reply due to peer-side panic mid-endorsement; incompatible peer/client proto versions; intermediary (proxy) corrupting the gRPC message.

Related errors


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