hyperledger/fabric · error
error adding policies to application group
Error message
error adding policies to application group
What it means
Wrapping error in NewApplicationGroup: AddPolicies failed while installing the application-group policies (Readers/Writers/Admins/LifecycleEndorsement/Endorsement). The wrapped error is typically an invalid policy rule string or unknown policy type declared in the profile's Application.Policies.
Source
Thrown at internal/configtxgen/encoder/encoder.go:349
}
addValue(ordererOrgGroup, channelconfig.MSPValue(mspConfig), channelconfig.AdminsPolicyKey)
if len(conf.OrdererEndpoints) > 0 {
addValue(ordererOrgGroup, channelconfig.EndpointsValue(conf.OrdererEndpoints), channelconfig.AdminsPolicyKey)
} else if channelCapabilities["V3_0"] {
return nil, errors.Errorf("orderer endpoints for organization %s are missing and must be configured when capability V3_0 is enabled", conf.Name)
}
return ordererOrgGroup, nil
}
// NewApplicationGroup returns the application component of the channel configuration. It defines the organizations which are involved
// in application logic like chaincodes, and how these members may interact with the orderer. It sets the mod_policy of all elements to "Admins".
func NewApplicationGroup(conf *genesisconfig.Application) (*cb.ConfigGroup, error) {
applicationGroup := protoutil.NewConfigGroup()
if err := AddPolicies(applicationGroup, conf.Policies, channelconfig.AdminsPolicyKey); err != nil {
return nil, errors.Wrapf(err, "error adding policies to application group")
}
if len(conf.ACLs) > 0 {
addValue(applicationGroup, channelconfig.ACLValues(conf.ACLs), channelconfig.AdminsPolicyKey)
}
if len(conf.Capabilities) > 0 {
addValue(applicationGroup, channelconfig.CapabilitiesValue(conf.Capabilities), channelconfig.AdminsPolicyKey)
}
for _, org := range conf.Organizations {
var err error
applicationGroup.Groups[org.Name], err = NewApplicationOrgGroup(org)
if err != nil {
return nil, errors.Wrap(err, "failed to create application org")
}
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Correct the policy Rule strings or Type values in the profile's Application.Policies per the wrapped error
- Use valid ImplicitMeta rules like "MAJORITY Endorsement" or signature-policy DSL
- Keep the standard policy set for application groups unless custom policies are required
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/configtxgen/encoder/encoder.go:349 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/be924149bee8319f.
Report an issue: GitHub.