{"record":{"id":"1927aef58f56fc00","repo":"hyperledger/fabric","slug":"could-not-get-msps","errorCode":null,"errorMessage":"could not get MSPs","messagePattern":"could not get MSPs","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/chaincode/lifecycle/scc.go","lineNumber":853,"sourceCode":"\t}\n\tif coll.MemberOrgsPolicy.GetSignaturePolicy() == nil {\n\t\treturn errors.Errorf(\"collection member org policy is empty for collection '%s'\", coll.Name)\n\t}\n\n\t// calling this constructor ensures extra semantic validation for the policy\n\tpp := &cauthdsl.EnvelopeBasedPolicyProvider{Deserializer: mspMgr}\n\tif _, err := pp.NewPolicy(coll.MemberOrgsPolicy.GetSignaturePolicy()); err != nil {\n\t\treturn errors.WithMessagef(err, \"invalid member org policy for collection '%s'\", coll.Name)\n\t}\n\n\t// make sure that the signature policy is meaningful (only consists of ORs)\n\tif err := validateSpOrConcat(coll.MemberOrgsPolicy.GetSignaturePolicy().Rule); err != nil {\n\t\treturn errors.WithMessagef(err, \"collection-name: %s -- error in member org policy\", coll.Name)\n\t}\n\n\tmsps, err := mspMgr.GetMSPs()\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"could not get MSPs\")\n\t}\n\n\t// make sure that the orgs listed are actually part of the channel\n\t// check all principals in the signature policy\n\tfor _, principal := range coll.MemberOrgsPolicy.GetSignaturePolicy().Identities {\n\t\tvar orgID string\n\t\t// the member org policy only supports certain principal types\n\t\tswitch principal.PrincipalClassification {\n\n\t\tcase mspprotos.MSPPrincipal_ROLE:\n\t\t\tmsprole := &mspprotos.MSPRole{}\n\t\t\terr := proto.Unmarshal(principal.Principal, msprole)\n\t\t\tif err != nil {\n\t\t\t\treturn errors.Wrapf(err, \"collection-name: %s -- cannot unmarshal identity bytes into MSPRole\", coll.GetName())\n\t\t\t}\n\t\t\torgID = msprole.MspIdentifier\n\t\t\t// the msp map is indexed using msp IDs - this behavior is implementation specific, making the following check a bit of a hack\n\t\t\t_, ok := msps[orgID]","sourceCodeStart":835,"sourceCodeEnd":871,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/chaincode/lifecycle/scc.go#L835-L871","documentation":"Returned by validateCollectionConfigMemberOrgsPolicy when the mspMgr cannot supply MSPs while compiling the collection's member-org policy. The policy envelope was structurally present but the MSP context needed to validate it is unavailable at validation time.","triggerScenarios":"Thrown at core/chaincode/lifecycle/scc.go:853 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error and the channel's MSP configuration","Retry after the channel config/MSP setup is healthy"],"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"}