{"record":{"id":"5b2712f8677c14e7","repo":"hyperledger/fabric","slug":"could-not-get-channel-config-for-channel-s","errorCode":null,"errorMessage":"could not get channel config for channel '%s'","messagePattern":"could not get channel config for channel '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/chaincode/lifecycle/deployedcc_infoprovider.go","lineNumber":268,"sourceCode":"\t\trequiredPeerCount = vc.PrivdataConfig.ImplicitCollDisseminationPolicy.RequiredPeerCount\n\t\tmaxPeerCount = vc.PrivdataConfig.ImplicitCollDisseminationPolicy.MaxPeerCount\n\t}\n\treturn &pb.StaticCollectionConfig{\n\t\tName: implicitcollection.NameForOrg(mspid),\n\t\tMemberOrgsPolicy: &pb.CollectionPolicyConfig{\n\t\t\tPayload: &pb.CollectionPolicyConfig_SignaturePolicy{\n\t\t\t\tSignaturePolicy: policydsl.SignedByMspMember(mspid),\n\t\t\t},\n\t\t},\n\t\tRequiredPeerCount: int32(requiredPeerCount),\n\t\tMaximumPeerCount:  int32(maxPeerCount),\n\t}\n}\n\nfunc (vc *ValidatorCommitter) ImplicitCollectionEndorsementPolicyAsBytes(channelID, orgMSPID string) (policy []byte, unexpectedErr, validationErr error) {\n\tchannelConfig := vc.Resources.ChannelConfigSource.GetStableChannelConfig(channelID)\n\tif channelConfig == nil {\n\t\treturn nil, errors.Errorf(\"could not get channel config for channel '%s'\", channelID), nil\n\t}\n\n\tac, ok := channelConfig.ApplicationConfig()\n\tif !ok {\n\t\treturn nil, errors.Errorf(\"could not get application config for channel '%s'\", channelID), nil\n\t}\n\n\tmatchedOrgName := \"\"\n\tfor orgName, org := range ac.Organizations() {\n\t\tif org.MSPID() == orgMSPID {\n\t\t\tmatchedOrgName = orgName\n\t\t\tbreak\n\t\t}\n\t}\n\n\tif matchedOrgName == \"\" {\n\t\treturn nil, nil, errors.Errorf(\"no org found in channel with MSPID '%s'\", orgMSPID)\n\t}","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/chaincode/lifecycle/deployedcc_infoprovider.go#L250-L286","documentation":"This error is returned by ValidatorCommitter.ImplicitCollectionEndorsementPolicyAsBytes in core/chaincode/lifecycle/deployedcc_infoprovider.go:268 when GetStableChannelConfig(channelID) returns nil. It means the lifecycle layer could not obtain a stable snapshot of the channel's configuration while resolving the implicit collection endorsement policy for an org. It is returned as unexpectedErr (not validationErr), signaling an infrastructure/state problem rather than a bad transaction.","triggerScenarios":"Called via CollectionValidationInfo when validating a transaction that touches an implicit collection (_implicit_org_<MSPID>) and the channel config channel does not exist in the channel config source (e.g. channel not loaded, wrong channelID, ledger/channel being closed or torn down).","commonSituations":"Transactions referencing a channel that no longer exists or was renamed; peer joining/leaving a channel concurrently; a channelID typo in SDK invocation; peer has not fetched channel config yet during startup.","solutions":["Verify the channelID passed to the transaction matches a channel the peer has actually joined (peer channel list).","Re-check that the channel config source is initialized and the channel exists in the ledger before invoking.","Restart/re-sync the peer so channel resources are recreated if the channel was recently modified.","If transient (channel update in flight), retry the transaction after the channel stabilizes."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Go: before invoking, verify the peer knows the channel\nchannels, _ := peerChannelList()\nfound := slices.Contains(channels, channelID)\nif !found { return fmt.Errorf(\"channel %s not joined\", channelID) }","typeGuard":"func hasChannelConfig(src ChannelConfigSource, ch string) bool { return src.GetStableChannelConfig(ch) != nil }","tryCatchPattern":"if unexpectedErr != nil {\n  if strings.Contains(unexpectedErr.Error(), \"could not get channel config\") {\n    // recover: verify channel exists / retry after channel resources ready\n  }\n}","preventionTips":["Always join the channel on the peer before transacting (peer channel join).","Validate channelID spelling against peer channel list.","Avoid invoking during channel removal/config refetch windows.","Add startup checks that channel config is loadable."],"tags":["hyperledger-fabric","chaincode-lifecycle","channel-config","implicit-collection"],"backgroundTag":"channel-config-not-found","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"}