{"record":{"id":"fbc282a413b0ff13","repo":"hyperledger/fabric","slug":"chaincode-install-failed-with-status-d-s","errorCode":null,"errorMessage":"chaincode install failed with status: %d - %s","messagePattern":"chaincode install failed with status: (.+?) - (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/lifecycle/chaincode/install.go","lineNumber":166,"sourceCode":"\treturn i.submitInstallProposal(signedProposal)\n}\n\nfunc (i *Installer) submitInstallProposal(signedProposal *pb.SignedProposal) error {\n\tproposalResponse, err := i.EndorserClient.ProcessProposal(context.Background(), signedProposal)\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to endorse chaincode install\")\n\t}\n\n\tif proposalResponse == nil {\n\t\treturn errors.New(\"chaincode install failed: received nil proposal response\")\n\t}\n\n\tif proposalResponse.Response == nil {\n\t\treturn errors.New(\"chaincode install failed: received proposal response with nil response\")\n\t}\n\n\tif proposalResponse.Response.Status != int32(cb.Status_SUCCESS) {\n\t\treturn errors.Errorf(\"chaincode install failed with status: %d - %s\", proposalResponse.Response.Status, proposalResponse.Response.Message)\n\t}\n\tlogger.Infof(\"Installed remotely: %v\", proposalResponse)\n\n\ticr := &lb.InstallChaincodeResult{}\n\terr = proto.Unmarshal(proposalResponse.Response.Payload, icr)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to unmarshal proposal response's response payload\")\n\t}\n\tlogger.Infof(\"Chaincode code package identifier: %s\", icr.PackageId)\n\n\treturn nil\n}\n\nfunc (i *Installer) createInstallProposal(pkgBytes []byte, creatorBytes []byte) (*pb.Proposal, error) {\n\tinstallChaincodeArgs := &lb.InstallChaincodeArgs{\n\t\tChaincodeInstallPackage: pkgBytes,\n\t}\n","sourceCodeStart":148,"sourceCodeEnd":184,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/lifecycle/chaincode/install.go#L148-L184","documentation":"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.","triggerScenarios":"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'.","commonSituations":"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.","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."],"exampleFix":"// before: non-admin signer\nexport CORE_PEER_MSPCONFIGPATH=${PWD}/crypto/peerOrganizations/org1/users/User1@org1/msp\n// after: admin signer\nexport CORE_PEER_MSPCONFIGPATH=${PWD}/crypto/peerOrganizations/org1/users/Admin@org1/msp","handlingStrategy":"validation","validationCode":"// ensure the signer is the org admin before installing\nif !strings.Contains(os.Getenv(\"CORE_PEER_MSPCONFIGPATH\"), \"Admin@\") {\n    return errors.New(\"install requires the org Admin identity\")\n}","typeGuard":null,"tryCatchPattern":"if err := install(); err != nil {\n    if strings.Contains(err.Error(), \"install failed with status\") {\n        switch {\n        case strings.Contains(err.Error(), \"403\"), strings.Contains(err.Error(), \"policy\"):\n            // switch to admin MSP and retry\n        }\n    }\n    return err\n}","preventionTips":["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"],"tags":["fabric","endorsement","permissions","status-code"],"backgroundTag":"proposal-response-non-success","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}