{"record":{"id":"d815ff5ffd0b3163","repo":"hyperledger/fabric","slug":"unknown-chaincodetype-s-d815ff","errorCode":null,"errorMessage":"unknown chaincodeType: %s","messagePattern":"unknown chaincodeType: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/peer/packaging/platforms.go","lineNumber":62,"sourceCode":"var logger = flogging.MustGetLogger(\"chaincode.platform\")\n\nfunc NewRegistry(platformTypes ...Platform) *Registry {\n\tplatforms := make(map[string]Platform)\n\tfor _, platform := range platformTypes {\n\t\tif _, ok := platforms[platform.Name()]; ok {\n\t\t\tlogger.Panicf(\"Multiple platforms of the same name specified: %s\", platform.Name())\n\t\t}\n\t\tplatforms[platform.Name()] = platform\n\t}\n\treturn &Registry{\n\t\tPlatforms: platforms,\n\t}\n}\n\nfunc (r *Registry) ValidateSpec(ccType, path string) error {\n\tplatform, ok := r.Platforms[ccType]\n\tif !ok {\n\t\treturn fmt.Errorf(\"unknown chaincodeType: %s\", ccType)\n\t}\n\treturn platform.ValidatePath(path)\n}\n\nfunc (r *Registry) NormalizePath(ccType, path string) (string, error) {\n\tplatform, ok := r.Platforms[ccType]\n\tif !ok {\n\t\treturn \"\", fmt.Errorf(\"unknown chaincodeType: %s\", ccType)\n\t}\n\tif normalizer, ok := platform.(NormalizePather); ok {\n\t\treturn normalizer.NormalizePath(path)\n\t}\n\treturn path, nil\n}\n\nfunc (r *Registry) ValidateDeploymentSpec(ccType string, codePackage []byte) error {\n\tplatform, ok := r.Platforms[ccType]\n\tif !ok {","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/peer/packaging/platforms.go#L44-L80","documentation":"ValidateSpec guard: the chaincode type string (e.g., golang, node, java) is not a key in the platform Registry, so no Platform implementation exists to validate the package spec. The at-fault input is the --lang/package ID type supplied by the user.","triggerScenarios":"Thrown at internal/peer/packaging/platforms.go:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported chaincode type: golang, node, or java","Check for typos in the -l/--lang flag","If a custom platform is intended, register it in the platform registry"],"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"}