{"record":{"id":"d864c4fb69fee7c6","repo":"hyperledger/fabric","slug":"cannot-define-a-new-channel-with-no-application-se","errorCode":null,"errorMessage":"cannot define a new channel with no Application section","messagePattern":"cannot define a new channel with no Application section","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/configtxgen/encoder/encoder.go","lineNumber":454,"sourceCode":"\tfor _, org := range conf.Organizations {\n\t\tvar err error\n\t\tconsortiumGroup.Groups[org.Name], err = NewConsortiumOrgGroup(org)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed to create consortium org\")\n\t\t}\n\t}\n\n\taddValue(consortiumGroup, channelconfig.ChannelCreationPolicyValue(policies.ImplicitMetaAnyPolicy(channelconfig.AdminsPolicyKey).Value()), ordererAdminsPolicyName)\n\n\tconsortiumGroup.ModPolicy = ordererAdminsPolicyName\n\treturn consortiumGroup, nil\n}\n\n// NewChannelCreateConfigUpdate generates a ConfigUpdate which can be sent to the orderer to create a new channel.  Optionally, the channel group of the\n// ordering system channel may be passed in, and the resulting ConfigUpdate will extract the appropriate versions from this file.\nfunc NewChannelCreateConfigUpdate(channelID string, conf *genesisconfig.Profile, templateConfig *cb.ConfigGroup) (*cb.ConfigUpdate, error) {\n\tif conf.Application == nil {\n\t\treturn nil, errors.New(\"cannot define a new channel with no Application section\")\n\t}\n\n\tif conf.Consortium == \"\" {\n\t\treturn nil, errors.New(\"cannot define a new channel with no Consortium value\")\n\t}\n\n\tnewChannelGroup, err := NewChannelGroup(conf)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"could not turn parse profile into channel group\")\n\t}\n\n\tupdt, err := update.Compute(&cb.Config{ChannelGroup: templateConfig}, &cb.Config{ChannelGroup: newChannelGroup})\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"could not compute update\")\n\t}\n\n\t// Add the consortium name to create the channel for into the write set as required.\n\tupdt.ChannelId = channelID","sourceCodeStart":436,"sourceCodeEnd":472,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/configtxgen/encoder/encoder.go#L436-L472","documentation":"NewChannelCreateConfigUpdate builds the ConfigUpdate transaction used to create a new application channel. It refuses to proceed when the profile has no Application section, because a new channel must define application orgs and capabilities. This is a deliberate guard against generating a channel-creation transaction from an incomplete profile.","triggerScenarios":"Calling NewChannelCreateConfigUpdate or MakeChannelCreationTransactionFromTemplate with a genesisconfig.Profile where conf.Application == nil (e.g. using an orderer-only/system-channel-style profile for channel creation).","commonSituations":"Using `configtxgen --outputCreateChannelTx` with a profile that only defines Orderer settings; copying a system channel profile as the channel-creation profile; edits where the Application block was deleted from the profile.","solutions":["Add an Application section (with Organizations and Capabilities) to the profile used for channel creation.","Point --profile at an application-channel profile, not the system channel/orderer-only profile.","Confirm configtx.yaml profile indentation so Application is actually parsed into the profile."],"exampleFix":"# before\nProfile:\n  MyChannel:\n    Orderer:\n      OrdererDefaults\n# after\nProfile:\n  MyChannel:\n    Orderer:\n      OrdererDefaults\n    Application:\n      Organizations:\n        - *Org1\n      Capabilities:\n        V1_4: true","handlingStrategy":"validation","validationCode":"if profile.Application == nil || len(profile.Application.Organizations) == 0 {\n    return errors.New(\"profile must define an Application section with organizations before channel creation\")\n}","typeGuard":"func hasApplicationSection(p *genesisconfig.Profile) bool {\n    return p != nil && p.Application != nil\n}","tryCatchPattern":"_, err := encoder.NewChannelCreateConfigUpdate(channelID, profile, template)\nif err != nil && strings.Contains(err.Error(), \"no Application section\") {\n    return fmt.Errorf(\"use an application-channel profile for %s\", channelID)\n}","preventionTips":["Always use a dedicated application-channel profile (not the system channel profile) for outputCreateChannelTx.","Keep Application sections in all channel-creation profiles in configtx.yaml.","Validate profiles at startup before invoking channel-creation APIs."],"tags":["hyperledger-fabric","configtx","channel-creation","profile"],"backgroundTag":"missing-config-section","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"}