{"record":{"id":"2dd2996a3bd441f9","repo":"hyperledger/fabric","slug":"cannot-create-proposal-due-to-s","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/joinbysnapshotstatus.go","lineNumber":78,"sourceCode":"\treturn nil\n}\n\nfunc (cc *endorserClient) joinBySnapshotStatus() (*pb.JoinBySnapshotStatus, 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.JoinBySnapshotStatus)}},\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, due to %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\tjoinbysnapshotStatus := &pb.JoinBySnapshotStatus{}","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/channel/joinbysnapshotstatus.go#L60-L96","documentation":"This error is returned by the `peer channel joinbysnapshot` status command when constructing the endorser proposal fails. The CLI serializes the local signer identity and calls protoutil.CreateProposalFromCIS to build a Proposal proto for the JoinBySnapshotStatus chaincode invocation; any failure there is wrapped with the underlying cause in %s.","triggerScenarios":"protoutil.CreateProposalFromCIS returns an error while building the ENDORSER_TRANSACTION proposal for the joinbysnapshot status query — e.g. malformed/empty channel ID or invocation input, or the signer identity cannot be constructed.","commonSituations":"MSP configuration is broken so the signer's serialized identity is invalid; a corrupted or partially initialized peer client config (cc.cf.Signer is nil or misconfigured); running the command before 'fetchconfig'/snapshot prerequisites are in place.","solutions":["Inspect the wrapped %s cause in the message — it names the exact proposal-construction failure","Verify the peer CLI's MSP/identity configuration (core.yaml, --mspdir/--clientauth) so the signer serializes correctly","Re-run with the correct channel name and snapshot parameters; ensure no empty/invalid chaincode invocation arguments are passed","Regenerate the peer's local MSP certificates if the identity is expired or corrupt"],"exampleFix":"// before: signer misconfigured, error surfaces here\nprop, _, err := protoutil.CreateProposalFromCIS(common2.HeaderType_ENDORSER_TRANSACTION, \"\", invocation, c)\nif err != nil { return nil, fmt.Errorf(\"cannot create proposal, due to %s\", err) }\n// after: validate signer serialization up front\nc, err := cc.cf.Signer.Serialize()\nif err != nil { return nil, fmt.Errorf(\"signer identity not available: %w\", err) }\nprop, _, err = protoutil.CreateProposalFromCIS(common2.HeaderType_ENDORSER_TRANSACTION, \"\", invocation, c)","handlingStrategy":"validation","validationCode":"// pre-flight: signer identity must serialize\nif _, err := signer.Serialize(); err != nil {\n    return fmt.Errorf(\"signer identity invalid, cannot build proposal: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err != nil {\n    return nil, fmt.Errorf(\"cannot create proposal, due to %s\", err) // log err fully for diagnosis\n}","preventionTips":["Validate MSP directory contents before running peer channel commands","Use the same identity config that works for other peer CLI commands first","Pin CLI and peer to the same Fabric version","Check --mspdir/--clientauth flags are consistent"],"tags":["fabric","peer-cli","proposal","signing"],"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-08T10:18:20.063Z"}