{"record":{"id":"6c065e90828c5337","repo":"hyperledger/fabric","slug":"supplied-channel-creation-profile-does-not-contain","errorCode":null,"errorMessage":"supplied channel creation profile does not contain an application section","messagePattern":"supplied channel creation profile does not contain an application section","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/configtxgen/encoder/encoder.go","lineNumber":531,"sourceCode":"\t\t},\n\t}\n\n\tconsortiums, ok := template.Groups[channelconfig.ConsortiumsGroupKey]\n\tif !ok {\n\t\treturn nil, errors.Errorf(\"supplied system channel group does not appear to be system channel (missing consortiums group)\")\n\t}\n\n\tif consortiums.Groups == nil {\n\t\treturn nil, errors.Errorf(\"system channel consortiums group appears to have no consortiums defined\")\n\t}\n\n\tconsortium, ok := consortiums.Groups[conf.Consortium]\n\tif !ok {\n\t\treturn nil, errors.Errorf(\"supplied system channel group is missing '%s' consortium\", conf.Consortium)\n\t}\n\n\tif conf.Application == nil {\n\t\treturn nil, errors.Errorf(\"supplied channel creation profile does not contain an application section\")\n\t}\n\n\tfor _, organization := range conf.Application.Organizations {\n\t\tvar ok bool\n\t\ttemplate.Groups[channelconfig.ApplicationGroupKey].Groups[organization.Name], ok = consortium.Groups[organization.Name]\n\t\tif !ok {\n\t\t\treturn nil, errors.Errorf(\"consortium %s does not contain member org %s\", conf.Consortium, organization.Name)\n\t\t}\n\t}\n\tdelete(template.Groups, channelconfig.ConsortiumsGroupKey)\n\n\taddValue(template, channelconfig.ConsortiumValue(conf.Consortium), channelconfig.AdminsPolicyKey)\n\n\treturn template, nil\n}\n\n// MakeChannelCreationTransaction is a handy utility function for creating transactions for channel creation.\n// It assumes the invoker has no system channel context so ignores all but the application section.","sourceCodeStart":513,"sourceCodeEnd":549,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/configtxgen/encoder/encoder.go#L513-L549","documentation":"ConfigTemplateFromGroup requires the channel-creation profile to have an Application section, because application orgs are resolved from the consortium into the Application group of the new channel's template. When conf.Application is nil the template cannot be assembled, so this error is returned.","triggerScenarios":"Calling MakeChannelCreationTransaction(WithSystemChannelContext) with a Profile whose Application field is nil — i.e. the profile defines a Consortium but no Application/Organizations section in configtx.yaml.","commonSituations":"A minimal channel profile was written with only Consortium (and maybe Orderer) sections; an orderer-only profile was mistakenly used to create an application channel; configtx.yaml was trimmed and the Application section dropped.","solutions":["Add an Application section with Organizations to the channel-creation profile in configtx.yaml","Ensure each listed organization is also a member of the referenced Consortium","Regenerate any cached/generated artifacts (genesis block, tx) with configtxgen after the edit"],"exampleFix":"// before (configtx.yaml)\nChannelCreationProfile:\n  Consortium: SampleConsortium\n// after\nChannelCreationProfile:\n  Consortium: SampleConsortium\n  Application:\n    Organizations:\n      - Name: Org1","handlingStrategy":"validation","validationCode":"// Go: require an Application section before generating the creation transaction\nif profile.Application == nil {\n    return errors.New(\"profile must define an Application section with Organizations\")\n}","typeGuard":"func hasApplicationSection(p *genesisconfig.Profile) bool { return p != nil && p.Application != nil }","tryCatchPattern":"if err != nil {\n    if strings.Contains(err.Error(), \"does not contain an application section\") {\n        return fmt.Errorf(\"add Application.Organizations to the channel profile in configtx.yaml: %w\", err)\n    }\n    return err\n}","preventionTips":["Never use an orderer-only profile to create application channels","Validate profiles with configtxgen tooling before channel creation","Keep a template application-channel profile in configtx.yaml and copy it"],"tags":["hyperledger-fabric","configtxgen","channel-creation","configuration"],"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"}