{"record":{"id":"8c1f14ff607336d9","repo":"hyperledger/fabric","slug":"msp-type-msptype-unknown","errorCode":null,"errorMessage":"msp type ${mspType} unknown","messagePattern":"msp type (.+?) unknown","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"msp/mgmt/mgmt.go","lineNumber":117,"sourceCode":"\tnewOpts, found := msp.Options[mspType]\n\tif !found {\n\t\tmspLogger.Panicf(\"msp type %s unknown\", mspType)\n\t}\n\n\tmspInst, err := msp.New(newOpts, bccsp)\n\tif err != nil {\n\t\tmspLogger.Fatalf(\"Failed to initialize local MSP, received err %+v\", err)\n\t}\n\tswitch mspType {\n\tcase msp.ProviderTypeToString(msp.FABRIC):\n\t\tmspInst, err = cache.New(mspInst)\n\t\tif err != nil {\n\t\t\tmspLogger.Fatalf(\"Failed to initialize local MSP, received err %+v\", err)\n\t\t}\n\tcase msp.ProviderTypeToString(msp.IDEMIX):\n\t\t// Do nothing\n\tdefault:\n\t\tpanic(\"msp type \" + mspType + \" unknown\")\n\t}\n\n\tmspLogger.Debugf(\"Created new local MSP\")\n\n\treturn mspInst\n}\n\n// GetIdentityDeserializer returns the IdentityDeserializer for the given chain\nfunc GetIdentityDeserializer(chainID string, cryptoProvider bccsp.BCCSP) msp.IdentityDeserializer {\n\tif chainID == \"\" {\n\t\treturn GetLocalMSP(cryptoProvider)\n\t}\n\n\treturn GetManagerForChain(chainID)\n}\n","sourceCodeStart":99,"sourceCodeEnd":133,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/msp/mgmt/mgmt.go#L99-L133","documentation":"loadLocalMSP switches on the configured local MSP provider type (as reported by msp.ProviderTypeToString). Only BCCSP types and IDEMIX are recognized; any other value hits the default case and panics with this message. Note it is a panic, not a returned error, so it terminates the process.","triggerScenarios":"Setting core.yaml msp.provider.type (or invoking mspmgmt with a type string) to an unknown provider string; mixing binaries where provider type constants differ.","commonSituations":"Peer/orderer config mis-edited to an experimental or removed provider type; copying a config from a different Fabric version that named providers differently.","solutions":["Set the local MSP provider type to a valid value such as the BCCSP type (see msp.ProviderTypeToString constants)","Remove or correct the unknown mspType entry in core.yaml and restart the node","Align Fabric binary and config versions so provider type names match"],"exampleFix":"// before\ntype: unknown-provider\n// after\ntype: bccsp","handlingStrategy":"validation","validationCode":"allowed := map[string]bool{\"bccsp\": true, \"idemix\": true}\nif !allowed[strings.ToLower(cfg.MSP.Provider.Type)] {\n    panic(fmt.Sprintf(\"local MSP type %q not supported in this build\", cfg.MSP.Provider.Type))\n}","typeGuard":null,"tryCatchPattern":"// It is a panic, not an error: guard by validating config before calling GetLocalMSP, and wrap startup with a recover in the supervisor.\nfunc safeStart() { defer func() { if r := recover(); r != nil { log.Fatalf(\"local MSP init: %v\", r) } }(); GetLocalMSP() }","preventionTips":["Keep core.yaml provider type aligned with the Fabric binary version in use","Pin and diff config templates against the version's sampleconfig","Fail fast in CI by initializing the local MSP in a smoke test"],"tags":["msp","panic","configuration"],"backgroundTag":"unknown-msp-provider-type","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"}