hyperledger/fabric · error
error adding policies to application org group %s
Error message
error adding policies to application org group %s
What it means
Wrapping error in NewApplicationOrgGroup: AddPolicies failed for the application org group named %s. The org's declared policies (typically Readers/Writers/Admins) have an invalid rule or unsupported type; the wrapped error names the exact policy problem.
Source
Thrown at internal/configtxgen/encoder/encoder.go:388
}
// NewApplicationOrgGroup returns an application org component of the channel configuration. It defines the crypto material for the organization
// (its MSP) as well as its anchor peers for use by the gossip network. It sets the mod_policy of all elements to "Admins".
func NewApplicationOrgGroup(conf *genesisconfig.Organization) (*cb.ConfigGroup, error) {
applicationOrgGroup := protoutil.NewConfigGroup()
applicationOrgGroup.ModPolicy = channelconfig.AdminsPolicyKey
if conf.SkipAsForeign {
return applicationOrgGroup, nil
}
mspConfig, err := msp.GetVerifyingMspConfig(conf.MSPDir, conf.ID, conf.MSPType)
if err != nil {
return nil, errors.Wrapf(err, "1 - Error loading MSP configuration for org %s", conf.Name)
}
if err := AddPolicies(applicationOrgGroup, conf.Policies, channelconfig.AdminsPolicyKey); err != nil {
return nil, errors.Wrapf(err, "error adding policies to application org group %s", conf.Name)
}
addValue(applicationOrgGroup, channelconfig.MSPValue(mspConfig), channelconfig.AdminsPolicyKey)
var anchorProtos []*pb.AnchorPeer
for _, anchorPeer := range conf.AnchorPeers {
anchorProtos = append(anchorProtos, &pb.AnchorPeer{
Host: anchorPeer.Host,
Port: int32(anchorPeer.Port),
})
}
// Avoid adding an unnecessary anchor peers element when one is not required. This helps
// prevent a delta from the orderer system channel when computing more complex channel
// creation transactions
if len(anchorProtos) > 0 {
addValue(applicationOrgGroup, channelconfig.AnchorPeersValue(anchorProtos), channelconfig.AdminsPolicyKey)
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Fix the organization's policy Rule/Type values in configtx.yaml per the wrapped error
- Use standard ImplicitMeta rules (e.g. "MAJORITY Endorsement") unless signature policies are required
- Ensure org policies reference valid policy sub-policies and principal names
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/configtxgen/encoder/encoder.go:388 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/63ffbc0264e74e44.
Report an issue: GitHub.