{"record":{"id":"a72e150aefa9b55e","repo":"hyperledger/fabric","slug":"cannot-create-proposal-due-to-s-a72e15","errorCode":null,"errorMessage":"Cannot create proposal, due to %s","messagePattern":"Cannot create proposal, due to (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/channel/list.go","lineNumber":58,"sourceCode":"\t}\n}\n\nfunc (cc *endorserClient) getChannels() ([]*pb.ChannelInfo, error) {\n\tvar err error\n\n\tinvocation := &pb.ChaincodeInvocationSpec{\n\t\tChaincodeSpec: &pb.ChaincodeSpec{\n\t\t\tType:        pb.ChaincodeSpec_Type(pb.ChaincodeSpec_Type_value[\"GOLANG\"]),\n\t\t\tChaincodeId: &pb.ChaincodeID{Name: \"cscc\"},\n\t\t\tInput:       &pb.ChaincodeInput{Args: [][]byte{[]byte(cscc.GetChannels)}},\n\t\t},\n\t}\n\n\tvar prop *pb.Proposal\n\tc, _ := cc.cf.Signer.Serialize()\n\tprop, _, err = protoutil.CreateProposalFromCIS(common2.HeaderType_ENDORSER_TRANSACTION, \"\", invocation, c)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Cannot create proposal, due to %s\", err)\n\t}\n\n\tvar signedProp *pb.SignedProposal\n\tsignedProp, err = protoutil.GetSignedProposal(prop, cc.cf.Signer)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Cannot create signed proposal, due to %s\", err)\n\t}\n\n\tproposalResp, err := cc.cf.EndorserClient.ProcessProposal(context.Background(), signedProp)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed sending proposal, got %s\", err)\n\t}\n\n\tif proposalResp.Response == nil || proposalResp.Response.Status != http.StatusOK {\n\t\treturn nil, fmt.Errorf(\"Received bad response, status %d: %s\", proposalResp.Response.Status, proposalResp.Response.Message)\n\t}\n\n\tvar channelQueryResponse pb.ChannelQueryResponse","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/channel/list.go#L40-L76","documentation":"Returned by getChannels (the implementation behind `peer channel list`) when building the GetChannels endorser proposal fails. The CLI serializes the signer identity and calls protoutil.CreateProposalFromCIS; any failure is wrapped with the cause.","triggerScenarios":"CreateProposalFromCIS returns an error while constructing the ENDORSER_TRANSACTION proposal for the qscc GetChannels invocation — malformed invocation spec or the signer identity cannot be serialized/used.","commonSituations":"Broken MSP config so the signer's identity can't be built; corrupted crypto material in the MSP directory; running the CLI outside a properly configured peer client context.","solutions":["Read the wrapped cause in the %s for the specific failure","Verify MSP directory layout (signcerts + keystore present and valid)","Re-enroll the identity if certificates are expired or malformed","Ensure the correct -f/--mspdir and connection flags are used"],"exampleFix":"// before: c serialized with ignored error\nc, _ := cc.cf.Signer.Serialize()\nprop, _, err = protoutil.CreateProposalFromCIS(common2.HeaderType_ENDORSER_TRANSACTION, \"\", invocation, c)\n// after\nc, err := cc.cf.Signer.Serialize()\nif err != nil { return nil, fmt.Errorf(\"cannot serialize signer: %w\", err) }","handlingStrategy":"validation","validationCode":"// pre-flight: signer must serialize before proposal creation\nif _, err := cc.cf.Signer.Serialize(); err != nil {\n    return fmt.Errorf(\"signer identity invalid, cannot build GetChannels proposal: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"prop, _, err := protoutil.CreateProposalFromCIS(common2.HeaderType_ENDORSER_TRANSACTION, \"\", invocation, c)\nif err != nil {\n    return nil, fmt.Errorf(\"Cannot create proposal, due to %s\", err)\n}","preventionTips":["Verify MSP layout (admincerts/signcerts/keystore) before CLI runs","Use an identity already proven to work with qscc queries","Keep Fabric CLI and peer versions aligned"],"tags":["fabric","peer-cli","proposal","qscc"],"backgroundTag":"proposal-creation-failed","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"}