hyperledger/fabric · error
failed to create application org
Error message
failed to create application org
What it means
Wrapping error in NewApplicationGroup: building an application organization's ConfigGroup (NewApplicationOrgGroup) failed — commonly MSP config loading or org policy errors. The wrapped error identifies which org and why.
Source
Thrown at internal/configtxgen/encoder/encoder.go:364
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")
}
}
applicationGroup.ModPolicy = channelconfig.AdminsPolicyKey
return applicationGroup, nil
}
// 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)View on GitHub (pinned to 2736b63f8f)
Solutions
- Fix the failing organization's MSPDir, MSPType, or policies as indicated by the wrapped error
- Confirm the org exists in the profile's Organizations section and is referenced correctly in Application.Organizations
- Rerun configtxgen after fixing configtx.yaml
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at internal/configtxgen/encoder/encoder.go:364 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/3b43dd696e24e5f2.
Report an issue: GitHub.