hyperledger/fabric · error

ApplicationOrg config does not allow sub-groups

Error message

ApplicationOrg config does not allow sub-groups

What it means

Returned by NewApplicationOrgConfig when the application org's ConfigGroup contains sub-groups. Application org groups are leaf nodes in the channel config tree — only values (like AnchorPeers) are allowed, so any child Groups entry is rejected as structurally invalid config.

Solutions

  1. Remove nested groups from the application org group in the channel config
  2. Regenerate the config transaction from a corrected configtx.yaml profile
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at common/channelconfig/applicationorg.go:37 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/ecca95bd893adc3c. Report an issue: GitHub.

Appendix: source

Thrown at common/channelconfig/applicationorg.go:37

	AnchorPeersKey = "AnchorPeers"
)

// ApplicationOrgProtos are deserialized from the config
type ApplicationOrgProtos struct {
	AnchorPeers *pb.AnchorPeers
}

// ApplicationOrgConfig defines the configuration for an application org
type ApplicationOrgConfig struct {
	*OrganizationConfig
	protos *ApplicationOrgProtos
	name   string
}

// NewApplicationOrgConfig creates a new config for an application org
func NewApplicationOrgConfig(id string, orgGroup *cb.ConfigGroup, mspConfig *MSPConfigHandler) (*ApplicationOrgConfig, error) {
	if len(orgGroup.Groups) > 0 {
		return nil, fmt.Errorf("ApplicationOrg config does not allow sub-groups")
	}

	protos := &ApplicationOrgProtos{}
	orgProtos := &OrganizationProtos{}

	if err := DeserializeProtoValuesFromGroup(orgGroup, protos, orgProtos); err != nil {
		return nil, errors.Wrap(err, "failed to deserialize values")
	}

	aoc := &ApplicationOrgConfig{
		name:   id,
		protos: protos,
		OrganizationConfig: &OrganizationConfig{
			name:             id,
			protos:           orgProtos,
			mspConfigHandler: mspConfig,
		},
	}

View on GitHub (pinned to 2736b63f8f)