{"record":{"id":"aaf08b1ef398d5d3","repo":"hyperledger/fabric","slug":"invalid-bccspnewopts-version-not-recognized-v","errorCode":null,"errorMessage":"Invalid *BCCSPNewOpts. Version not recognized [%v]","messagePattern":"Invalid \\*BCCSPNewOpts\\. Version not recognized \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"msp/factory.go","lineNumber":58,"sourceCode":"// BCCSPNewOpts contains the options to instantiate a new BCCSP-based (X509) MSP\ntype BCCSPNewOpts struct {\n\tNewBaseOpts\n}\n\n// IdemixNewOpts contains the options to instantiate a new Idemix-based MSP\ntype IdemixNewOpts struct {\n\tNewBaseOpts\n}\n\n// New create a new MSP instance depending on the passed Opts\nfunc New(opts NewOpts, cryptoProvider bccsp.BCCSP) (MSP, error) {\n\tswitch opts.(type) {\n\tcase *BCCSPNewOpts:\n\t\tswitch opts.GetVersion() {\n\t\tcase MSPv1_0, MSPv1_1, MSPv1_3, MSPv1_4_3, MSPv3_0:\n\t\t\treturn newBccspMsp(opts.GetVersion(), cryptoProvider)\n\t\tdefault:\n\t\t\treturn nil, errors.Errorf(\"Invalid *BCCSPNewOpts. Version not recognized [%v]\", opts.GetVersion())\n\t\t}\n\tcase *IdemixNewOpts:\n\t\tswitch opts.GetVersion() {\n\t\tcase MSPv1_3, MSPv1_4_3:\n\t\t\tmsp, err := idemix.NewIdemixMsp(MSPv1_3)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn &idemixMSPWrapper{msp.(*idemix.Idemixmsp)}, nil\n\t\tcase MSPv1_1:\n\t\t\tmsp, err := idemix.NewIdemixMsp(MSPv1_1)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\n\t\t\treturn &idemixMSPWrapper{msp.(*idemix.Idemixmsp)}, nil\n\t\tdefault:","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/msp/factory.go#L40-L76","documentation":"Returned by msp.New when the opts are *BCCSPNewOpts but the requested MSP version is not one of the recognized versions. The factory cannot select a constructor for that version of the X509/BCCSP MSP.","triggerScenarios":"Thrown at msp/factory.go:58 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a recognized MSP version constant in BCCSPNewOpts","Match the version to the peer/network MSP version in use"],"exampleFix":null,"handlingStrategy":"validation","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"}