{"record":{"id":"49f48cb91929222e","repo":"hyperledger/fabric","slug":"initializing-policymanager-failed","errorCode":null,"errorMessage":"initializing policymanager failed","messagePattern":"initializing policymanager failed","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/channelconfig/bundle.go","lineNumber":218,"sourceCode":"\t\treturn nil, errors.Wrap(err, \"initializing channelconfig failed\")\n\t}\n\n\tpolicyProviderMap := make(map[int32]policies.Provider)\n\tfor pType := range cb.Policy_PolicyType_name {\n\t\trtype := cb.Policy_PolicyType(pType)\n\t\tswitch rtype {\n\t\tcase cb.Policy_UNKNOWN:\n\t\t\t// Do not register a handler\n\t\tcase cb.Policy_SIGNATURE:\n\t\t\tpolicyProviderMap[pType] = cauthdsl.NewPolicyProvider(channelConfig.MSPManager())\n\t\tcase cb.Policy_MSP:\n\t\t\t// Add hook for MSP Handler here\n\t\t}\n\t}\n\n\tpolicyManager, err := policies.NewManagerImpl(RootGroupKey, policyProviderMap, config.ChannelGroup)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"initializing policymanager failed\")\n\t}\n\n\tconfigtxManager, err := configtx.NewValidatorImpl(channelID, config, RootGroupKey, policyManager)\n\tif err != nil {\n\t\treturn nil, errors.Wrap(err, \"initializing configtx manager failed\")\n\t}\n\n\treturn &Bundle{\n\t\tpolicyManager:   policyManager,\n\t\tchannelConfig:   channelConfig,\n\t\tconfigtxManager: configtxManager,\n\t}, nil\n}\n\nfunc preValidate(config *cb.Config) error {\n\tif config == nil {\n\t\treturn errors.New(\"channelconfig Config cannot be nil\")\n\t}","sourceCodeStart":200,"sourceCodeEnd":236,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/channelconfig/bundle.go#L200-L236","documentation":"Returned by NewBundle when policies.NewManagerImpl fails while building the policy manager from the config's root group. This wraps policy-tree construction failures — e.g. unregistered policy types or malformed policy expressions in the config being loaded.","triggerScenarios":"Thrown at common/channelconfig/bundle.go:218 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the failing policy path/definition","Correct the policy bytes (SignaturePolicy or ImplicitMeta) in the config group"],"exampleFix":null,"handlingStrategy":"try-catch","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"}