{"record":{"id":"f60ac290a1c3f7ba","repo":"hyperledger/fabric","slug":"refusing-to-generate-application-channel-block-whi","errorCode":null,"errorMessage":"refusing to generate application channel block which is missing application section","messagePattern":"refusing to generate application channel block which is missing application section","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/configtxgen/main.go","lineNumber":44,"sourceCode":"\t\"github.com/pkg/errors\"\n)\n\nvar logger = flogging.MustGetLogger(\"common.tools.configtxgen\")\n\nfunc doOutputBlock(config *genesisconfig.Profile, channelID string, outputBlock string) error {\n\tpgen, err := encoder.NewBootstrapper(config)\n\tif err != nil {\n\t\treturn errors.WithMessage(err, \"could not create bootstrapper\")\n\t}\n\tlogger.Info(\"Generating genesis block\")\n\tif config.Orderer == nil {\n\t\treturn errors.New(\"refusing to generate block which is missing orderer section\")\n\t}\n\tif config.Consortiums != nil {\n\t\tlogger.Error(\"Warning: 'Consortiums' should be nil since system channel is no longer supported in Fabric v3.x\")\n\t} else {\n\t\tif config.Application == nil {\n\t\t\treturn errors.New(\"refusing to generate application channel block which is missing application section\")\n\t\t}\n\t\tlogger.Info(\"Creating application channel genesis block\")\n\t}\n\tgenesisBlock := pgen.GenesisBlockForChannel(channelID)\n\tlogger.Info(\"Writing genesis block\")\n\terr = writeFile(outputBlock, protoutil.MarshalOrPanic(genesisBlock), 0o640)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error writing genesis block: %s\", err)\n\t}\n\treturn nil\n}\n\nfunc doOutputChannelCreateTx(conf, baseProfile *genesisconfig.Profile, channelID string, outputChannelCreateTx string) error {\n\tlogger.Info(\"Generating new channel configtx\")\n\n\tvar configtx *cb.Envelope\n\tvar err error\n\tif baseProfile == nil {","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/cmd/configtxgen/main.go#L26-L62","documentation":"configtxgen guard: when generating an application channel genesis block, the profile has no Consortiums (application-channel mode) but its Application section is nil, so there is no application group to put in the block.","triggerScenarios":"Thrown at cmd/configtxgen/main.go:44 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add an Application section (with at least one organization) to the configtx.yaml profile used with -outputBlock","Ensure the profile name passed via -profile matches a fully defined application channel profile"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}