{"record":{"id":"55549060e99154b7","repo":"hyperledger/fabric","slug":"no-groups-in-channel-group","errorCode":null,"errorMessage":"no groups in channel group","messagePattern":"no groups in channel group","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/smartbft/configverifier.go","lineNumber":104,"sourceCode":"\t\t\treturn fmt.Errorf(\"data unmarshalling error: %s\", err)\n\t\t}\n\t\treturn cbv.verifyConfigUpdateMsg(envelope, configEnvelope, chdr)\n\tdefault:\n\t\treturn errors.Errorf(\"unexpected envelope type %s\", common.HeaderType_name[chdr.Type])\n\t}\n}\n\nfunc (cbv *ConfigBlockValidator) checkConsentersMatchPolicy(conf *common.Config) error {\n\tif conf == nil {\n\t\treturn fmt.Errorf(\"empty Config\")\n\t}\n\n\tif conf.ChannelGroup == nil {\n\t\treturn fmt.Errorf(\"empty channel group\")\n\t}\n\n\tif len(conf.ChannelGroup.Groups) == 0 {\n\t\treturn fmt.Errorf(\"no groups in channel group\")\n\t}\n\n\tif conf.ChannelGroup.Groups[\"Orderer\"] == nil {\n\t\treturn fmt.Errorf(\"no 'Orderer' group in channel groups\")\n\t}\n\n\tif len(conf.ChannelGroup.Groups[\"Orderer\"].Values) == 0 {\n\t\treturn fmt.Errorf(\"no values in 'Orderer' group\")\n\t}\n\n\tif conf.ChannelGroup.Groups[\"Orderer\"].Values[\"Orderers\"] == nil {\n\t\treturn fmt.Errorf(\"no values in 'Orderer' group\")\n\t}\n\n\tords := &common.Orderers{}\n\tif err := proto.Unmarshal(conf.ChannelGroup.Groups[\"Orderer\"].Values[\"Orderers\"].Value, ords); err != nil {\n\t\treturn err\n\t}","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/configverifier.go#L86-L122","documentation":"A valid channel Config's ChannelGroup must contain sub-groups (typically 'Orderer' and/or 'Application'). If Groups is empty the config tree has no organizational units, so the verifier cannot locate the Orderer group holding the consenters and rejects with 'no groups in channel group'.","triggerScenarios":"checkConsentersMatchPolicy receiving a Config whose ChannelGroup is non-nil but has an empty Groups map — e.g. ChannelGroup was created with only ModPolicy or version fields set.","commonSituations":"Partially constructed config from custom tooling; config blocks generated without the Orderer/Application subtrees; test fixtures with a bare &common.Config{ChannelGroup: &common.ConfigGroup{}}.","solutions":["Include at least the required sub-groups (Orderer, Application, Consortiums as applicable) in ChannelGroup.Groups","Generate the channel config with configtxgen so the standard group hierarchy is present","If migrating/upgrading, re-derive the config from the current channel's latest config block"],"exampleFix":"// before\nchannelGroup := &common.ConfigGroup{} // no groups\n// after\nchannelGroup := &common.ConfigGroup{\n  Groups: map[string]*common.ConfigGroup{\n    \"Orderer\": ordererGroup,\n    \"Application\": applicationGroup,\n  },\n}","handlingStrategy":"validation","validationCode":"func hasGroups(conf *common.Config) bool {\n  return conf != nil && conf.ChannelGroup != nil && len(conf.ChannelGroup.Groups) > 0\n}","typeGuard":"func hasSubGroups(c *common.Config) bool {\n  return c != nil && c.GetChannelGroup() != nil && len(c.GetChannelGroup().GetGroups()) > 0\n}","tryCatchPattern":"if err := cbv.ValidateConfig(envelope); err != nil {\n  if strings.Contains(err.Error(), \"no groups in channel group\") {\n    return fmt.Errorf(\"channel config tree is empty: %w\", err)\n  }\n  return err\n}","preventionTips":["Generate channel config exclusively via configtxgen profiles","Verify the decoded config JSON has an \"groups\" section before submitting updates","Keep config fixtures synchronized with real configtx output"],"tags":["hyperledger-fabric","smartbft","config-validation","channel-group"],"backgroundTag":"empty-configuration","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"}