{"record":{"id":"cbc80bb71d7f60a8","repo":"hyperledger/fabric","slug":"invalid-msp-version-v","errorCode":null,"errorMessage":"Invalid MSP version [%v]","messagePattern":"Invalid MSP version \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"msp/mspimpl.go","lineNumber":149,"sourceCode":"\t\ttheMsp.internalSatisfiesPrincipalInternalFunc = theMsp.satisfiesPrincipalInternalPreV13\n\t\ttheMsp.internalSetupAdmin = theMsp.setupAdminsPreV142\n\tcase MSPv1_3:\n\t\ttheMsp.internalSetupFunc = theMsp.setupV11\n\t\ttheMsp.internalValidateIdentityOusFunc = theMsp.validateIdentityOUsV11\n\t\ttheMsp.internalSatisfiesPrincipalInternalFunc = theMsp.satisfiesPrincipalInternalV13\n\t\ttheMsp.internalSetupAdmin = theMsp.setupAdminsPreV142\n\tcase MSPv1_4_3:\n\t\ttheMsp.internalSetupFunc = theMsp.setupV142\n\t\ttheMsp.internalValidateIdentityOusFunc = theMsp.validateIdentityOUsV142\n\t\ttheMsp.internalSatisfiesPrincipalInternalFunc = theMsp.satisfiesPrincipalInternalV142\n\t\ttheMsp.internalSetupAdmin = theMsp.setupAdminsV142\n\tcase MSPv3_0:\n\t\ttheMsp.internalSetupFunc = theMsp.setupV3\n\t\ttheMsp.internalValidateIdentityOusFunc = theMsp.validateIdentityOUsV142\n\t\ttheMsp.internalSatisfiesPrincipalInternalFunc = theMsp.satisfiesPrincipalInternalV142\n\t\ttheMsp.internalSetupAdmin = theMsp.setupAdminsV142\n\tdefault:\n\t\treturn nil, errors.Errorf(\"Invalid MSP version [%v]\", version)\n\t}\n\n\treturn theMsp, nil\n}\n\n// NewBccspMspWithKeyStore allows to create a BCCSP-based MSP whose underlying\n// crypto material is available through the passed keystore\nfunc NewBccspMspWithKeyStore(version MSPVersion, keyStore bccsp.KeyStore, bccsp bccsp.BCCSP) (MSP, error) {\n\tthisMSP, err := newBccspMsp(version, bccsp)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcsp, err := sw.NewWithParams(\n\t\tfactory.GetDefaultOpts().SW.Security,\n\t\tfactory.GetDefaultOpts().SW.Hash,\n\t\tkeyStore,\n\t)","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/msp/mspimpl.go#L131-L167","documentation":"newBccspMsp assigns internal setup hooks based on the MSP version; only MSPv1_0..MSPv3_0 are handled. Any other version value returns this error, so MSP creation fails before any certificates are loaded.","triggerScenarios":"FabricMSPConfig produced with an MSP version field not recognized by this binary (e.g. channel config serialized by a newer Fabric, or corrupted version byte), then passed to msp.New.","commonSituations":"Upgrading a network where a newer peer wrote a newer MSP version into channel config and an older node tries to parse it; SDKs fabricating MSPConfig with a zero/invalid version.","solutions":["Upgrade the Fabric binary/SDK to a version that supports the MSP version in the config","Re-export the MSP config from a node whose version matches the consuming binary","Inspect the serialized FabricMSPConfig and correct the version field if it was hand-crafted"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Cannot inspect version without unmarshalling; decode FabricMSPConfig first if you control serialization.\nvar fmc m.FabricMSPConfig\nif err := proto.Unmarshal(conf.Config, &fmc); err != nil { return err } // then compare known versions at higher layer","typeGuard":null,"tryCatchPattern":"theMsp, err := msp.New(conf, factory.GetDefault())\nif err != nil && strings.Contains(err.Error(), \"Invalid MSP version\") {\n    return fmt.Errorf(\"this binary does not support the MSP version in config; upgrade Fabric: %w\", err)\n}","preventionTips":["Keep all peers/orderers/SDKs on Fabric versions that share MSP version support","Re-export channel config after upgrades rather than consuming old serialized blobs","Test MSP deserialization against real network config in CI"],"tags":["msp","versioning","compatibility"],"backgroundTag":"unsupported-msp-version","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"}