{"record":{"id":"3b43dd696e24e5f2","repo":"hyperledger/fabric","slug":"failed-to-create-application-org","errorCode":null,"errorMessage":"failed to create application org","messagePattern":"failed to create application org","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/configtxgen/encoder/encoder.go","lineNumber":364,"sourceCode":"func NewApplicationGroup(conf *genesisconfig.Application) (*cb.ConfigGroup, error) {\n\tapplicationGroup := protoutil.NewConfigGroup()\n\tif err := AddPolicies(applicationGroup, conf.Policies, channelconfig.AdminsPolicyKey); err != nil {\n\t\treturn nil, errors.Wrapf(err, \"error adding policies to application group\")\n\t}\n\n\tif len(conf.ACLs) > 0 {\n\t\taddValue(applicationGroup, channelconfig.ACLValues(conf.ACLs), channelconfig.AdminsPolicyKey)\n\t}\n\n\tif len(conf.Capabilities) > 0 {\n\t\taddValue(applicationGroup, channelconfig.CapabilitiesValue(conf.Capabilities), channelconfig.AdminsPolicyKey)\n\t}\n\n\tfor _, org := range conf.Organizations {\n\t\tvar err error\n\t\tapplicationGroup.Groups[org.Name], err = NewApplicationOrgGroup(org)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrap(err, \"failed to create application org\")\n\t\t}\n\t}\n\n\tapplicationGroup.ModPolicy = channelconfig.AdminsPolicyKey\n\treturn applicationGroup, nil\n}\n\n// NewApplicationOrgGroup returns an application org component of the channel configuration.  It defines the crypto material for the organization\n// (its MSP) as well as its anchor peers for use by the gossip network.  It sets the mod_policy of all elements to \"Admins\".\nfunc NewApplicationOrgGroup(conf *genesisconfig.Organization) (*cb.ConfigGroup, error) {\n\tapplicationOrgGroup := protoutil.NewConfigGroup()\n\tapplicationOrgGroup.ModPolicy = channelconfig.AdminsPolicyKey\n\n\tif conf.SkipAsForeign {\n\t\treturn applicationOrgGroup, nil\n\t}\n\n\tmspConfig, err := msp.GetVerifyingMspConfig(conf.MSPDir, conf.ID, conf.MSPType)","sourceCodeStart":346,"sourceCodeEnd":382,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/configtxgen/encoder/encoder.go#L346-L382","documentation":"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.","triggerScenarios":"Thrown at internal/configtxgen/encoder/encoder.go:364 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}