{"record":{"id":"58d23cd2a027826f","repo":"hyperledger/fabric","slug":"chaincode-install-failed-received-proposal-respon","errorCode":null,"errorMessage":"chaincode install failed: received proposal response with nil response","messagePattern":"chaincode install failed: received proposal response with nil response","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/lifecycle/chaincode/install.go","lineNumber":162,"sourceCode":"\tif err != nil {\n\t\treturn errors.WithMessage(err, \"failed to create signed proposal for chaincode install\")\n\t}\n\n\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) {","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/lifecycle/chaincode/install.go#L144-L180","documentation":"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.","triggerScenarios":"proposalResponse.Response == nil check in submitInstallProposal fires after ProcessProposal returned a non-nil response lacking its Response member during chaincode install.","commonSituations":"Malformed peer reply due to peer-side panic mid-endorsement; incompatible peer/client proto versions; intermediary (proxy) corrupting the gRPC message.","solutions":["Retry the install against the peer and check peer logs for panics or endorsement errors.","Verify peer CLI and peer node are on compatible Fabric versions.","Bypass any proxy/load balancer and connect directly to the peer to rule out message corruption.","Confirm TLS and address configuration so you're hitting the intended peer endpoint."],"exampleFix":"// before: via mutating proxy\n--peerAddresses proxy.example.com:7051\n// after: direct peer address\n--peerAddresses peer0.org1.example.com:7051","handlingStrategy":"type-guard","validationCode":"// confirm direct peer reachability before install\ntcpAddr := fmt.Sprintf(\"%s:%d\", peerHost, peerPort)\nif c, err := net.DialTimeout(\"tcp\", tcpAddr, 5*time.Second); err != nil { return err } else { c.Close() }","typeGuard":"func hasInnerResponse(r *pb.ProposalResponse) bool { return r != nil && r.Response != nil }","tryCatchPattern":"resp, err := submitInstallProposal(sp)\nif err == nil && !hasInnerResponse(resp) {\n    // retry directly against peer, bypassing proxies\n}","preventionTips":["Connect directly to the peer, not through mutating proxies","Keep client and peer proto versions compatible","Watch peer logs for mid-endorsement panics","Retry once before surfacing to users"],"tags":["fabric","endorsement","peer","nil-response"],"backgroundTag":"nil-proposal-response","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"}