{"record":{"id":"91c810b3d86581a0","repo":"hyperledger/fabric","slug":"failed-creating-msprole-client","errorCode":null,"errorMessage":"failed creating MSPRole_CLIENT","messagePattern":"failed creating MSPRole_CLIENT","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"msp/mspimplsetup.go","lineNumber":688,"sourceCode":"\terr = msp.postSetupV142(conf)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\treturn nil\n}\n\nfunc (msp *bccspmsp) postSetupV11(conf *m.FabricMSPConfig) error {\n\t// Check for OU enforcement\n\tif !msp.ouEnforcement {\n\t\t// No enforcement required. Call post setup as per V1\n\t\treturn msp.postSetupV1(conf)\n\t}\n\n\t// Check that admins are clients\n\tprincipalBytes, err := proto.Marshal(&m.MSPRole{Role: m.MSPRole_CLIENT, MspIdentifier: msp.name})\n\tif err != nil {\n\t\treturn errors.Wrapf(err, \"failed creating MSPRole_CLIENT\")\n\t}\n\tprincipal := &m.MSPPrincipal{\n\t\tPrincipalClassification: m.MSPPrincipal_ROLE,\n\t\tPrincipal:               principalBytes,\n\t}\n\tfor i, admin := range msp.admins {\n\t\terr = admin.SatisfiesPrincipal(principal)\n\t\tif err != nil {\n\t\t\treturn errors.WithMessagef(err, \"admin %d is invalid\", i)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (msp *bccspmsp) postSetupV142(conf *m.FabricMSPConfig) error {\n\t// Check for OU enforcement\n\tif !msp.ouEnforcement {","sourceCodeStart":670,"sourceCodeEnd":706,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/msp/mspimplsetup.go#L670-L706","documentation":"postSetupV11 wraps a proto.Marshal failure while building the MSPRole_CLIENT principal used to check that admin certificates carry the client OU. Marshalling a just-constructed small protobuf is practically infallible; failure signals a programming error or corrupted protobuf runtime state.","triggerScenarios":"Thrown at msp/mspimplsetup.go:688 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped proto.Marshal error for the exact cause","Verify msp.name and the MSPRole message construction in postSetupV11","Treat as a bug: report or fix rather than retry, since input data does not vary"],"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"}