{"record":{"id":"442f58b207281bc9","repo":"hyperledger/fabric","slug":"invalid-collection-configuration-supplied-for-chai-442f58","errorCode":null,"errorMessage":"invalid collection configuration supplied for chaincode %s:%s","messagePattern":"invalid collection configuration supplied for chaincode (.+?):(.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/handlers/validation/builtin/v13/lscc_validation_logic.go","lineNumber":295,"sourceCode":"\t\t\t\treturn &commonerrors.VSCCExecutionFailureError{\n\t\t\t\t\tErr: fmt.Errorf(\"unable to check whether collection existed earlier for chaincode %s:%s\",\n\t\t\t\t\t\tcdRWSet.Name, cdRWSet.Version),\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ccp != nil {\n\t\t\treturn policyErr(fmt.Errorf(\"collection data should not exist for chaincode %s:%s\", cdRWSet.Name, cdRWSet.Version))\n\t\t}\n\t}\n\n\t// TODO: Once the new chaincode lifecycle is available (FAB-8724), the following validation\n\t// and other validation performed in ValidateLSCCInvocation can be moved to LSCC itself.\n\tnewCollectionConfigPackage := &pb.CollectionConfigPackage{}\n\n\tif collectionsConfigArg != nil {\n\t\terr := proto.Unmarshal(collectionsConfigArg, newCollectionConfigPackage)\n\t\tif err != nil {\n\t\t\treturn policyErr(fmt.Errorf(\"invalid collection configuration supplied for chaincode %s:%s\",\n\t\t\t\tcdRWSet.Name, cdRWSet.Version))\n\t\t}\n\t} else {\n\t\treturn nil\n\t}\n\n\tif ac.V1_2Validation() {\n\t\tnewCollectionConfigs := newCollectionConfigPackage.GetConfig()\n\t\tif err := validateNewCollectionConfigs(newCollectionConfigs); err != nil {\n\t\t\treturn policyErr(err)\n\t\t}\n\n\t\tif lsccFunc == lscc.UPGRADE {\n\n\t\t\tcollectionCriteria := privdata.CollectionCriteria{Channel: channelName, Namespace: cdRWSet.Name}\n\t\t\t// oldCollectionConfigPackage denotes the existing collection config package in the ledger\n\t\t\toldCollectionConfigPackage, err := privdata.RetrieveCollectionConfigPackageFromState(collectionCriteria, state)\n\t\t\tif err != nil {","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/handlers/validation/builtin/v13/lscc_validation_logic.go#L277-L313","documentation":"Returned by v13 validateRWSetAndCollection when a chaincode being deployed/upgraded has a collection config that fails validation (bad name, counts, or member policy). It wraps the specific collection failure for the named chaincode and version.","triggerScenarios":"Thrown at core/handlers/validation/builtin/v13/lscc_validation_logic.go:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Serialize a valid CollectionConfigPackage in the deploy transaction","Check for SDK/protobuf version mismatches producing bad bytes"],"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"}