hyperledger/fabric · error
chaincode install failed with status: %d - %s
Error message
chaincode install failed with status: %d - %s
What it means
The peer endorsed the install but returned a non-SUCCESS Response.Status; the CLI formats the peer's status code and message into this error. This is how the peer's actual rejection reason (bad signature, no admin rights, internal error) reaches the user.
Source
Thrown at internal/peer/lifecycle/chaincode/install.go:166
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) {
installChaincodeArgs := &lb.InstallChaincodeArgs{
ChaincodeInstallPackage: pkgBytes,
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Read the status and message: 403/PERMISSION_DENIED typically means use the org Admin identity.
- Set CORE_PEER_MSPCONFIGPATH to the org admin's MSP and retry.
- Check peer logs for the detailed error behind a 500 INTERNAL_SERVER_ERROR.
- Ensure the signing identity's cert is part of the peer's channel/admin policy.
Example fix
// before: non-admin signer
export CORE_PEER_MSPCONFIGPATH=${PWD}/crypto/peerOrganizations/org1/users/User1@org1/msp
// after: admin signer
export CORE_PEER_MSPCONFIGPATH=${PWD}/crypto/peerOrganizations/org1/users/Admin@org1/msp Defensive patterns
Strategy: validation
Validate before calling
// ensure the signer is the org admin before installing
if !strings.Contains(os.Getenv("CORE_PEER_MSPCONFIGPATH"), "Admin@") {
return errors.New("install requires the org Admin identity")
} Try / catch
if err := install(); err != nil {
if strings.Contains(err.Error(), "install failed with status") {
switch {
case strings.Contains(err.Error(), "403"), strings.Contains(err.Error(), "policy"):
// switch to admin MSP and retry
}
}
return err
} Prevention
- Use the org Admin identity for lifecycle install
- Match CORE_PEER_LOCALMSPID to the peer's org
- Read the embedded status/message for the root cause
- Keep admin certs present in peer MSP admincerts
When it happens
Trigger: proposalResponse.Response.Status != int32(cb.Status_SUCCESS) in submitInstallProposal, e.g. status 500 with a message like 'implicit policy evaluation failed' or 'failed to invoke backing implementation'.
Common situations: Installing without org admin credentials (lifecycle install requires the admin signer); MSP not enrolled as the org's Admin role; peer-side errors writing to the filesystem or CSP; signature/identity verification failures.
Related errors
- implicit policy evaluation failed - %d sub-policies were sat
- Could not create _lifecycle chaincodes install path: %s
- proposal hash does not match
- could not serialize the signing identity
- could not sign the proposal response payload
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/fbc282a413b0ff13.
Report an issue: GitHub.