hyperledger/fabric · error
could not get application config for channel %s
Error message
could not get application config for channel %s
What it means
Thrown by ChaincodeImplicitCollections when the channel config exists but ApplicationConfig() returns ok=false — the channel's config has no Application group. Implicit collections are built per application organization, so app config is mandatory.
Source
Thrown at core/chaincode/lifecycle/deployedcc_infoprovider.go:231
}
if !exists {
// Implicit collections are a v2.0 lifecycle concept, if the chaincode is not in the new lifecycle, return nothing
return nil, nil
}
return vc.ChaincodeImplicitCollections(channelName)
}
// ChaincodeImplicitCollections assumes the chaincode exists in the new lifecycle and returns the implicit collections
func (vc *ValidatorCommitter) ChaincodeImplicitCollections(channelName string) ([]*pb.StaticCollectionConfig, error) {
channelConfig := vc.Resources.ChannelConfigSource.GetStableChannelConfig(channelName)
if channelConfig == nil {
return nil, errors.Errorf("could not get channelconfig for channel %s", channelName)
}
ac, ok := channelConfig.ApplicationConfig()
if !ok {
return nil, errors.Errorf("could not get application config for channel %s", channelName)
}
orgs := ac.Organizations()
implicitCollections := make([]*pb.StaticCollectionConfig, 0, len(orgs))
for _, org := range orgs {
implicitCollections = append(implicitCollections, vc.GenerateImplicitCollectionForOrg(org.MSPID()))
}
return implicitCollections, nil
}
// GenerateImplicitCollectionForOrg generates implicit collection for the org
func (vc *ValidatorCommitter) GenerateImplicitCollectionForOrg(mspid string) *pb.StaticCollectionConfig {
// set Required/MaxPeerCount to 0 if it is other org's implicit collection (mspid does not match peer's local mspid)
// set Required/MaxPeerCount to the config values if it is the peer org's implicit collection (mspid matches peer's local mspid)
requiredPeerCount := 0
maxPeerCount := 0
if mspid == vc.CoreConfig.LocalMSPID {View on GitHub (pinned to 2736b63f8f)
Solutions
- Update the channel config to include an Application group with at least the member organizations.
- Regenerate the channel artifact from a configtx.yaml profile that defines Application: Organizations and Capabilities.
- Validate the current config with configtxlator to confirm the Application group is present.
- Skip implicit collection generation for channels that intentionally have no application config.
Example fix
// configtx.yaml - before (no Application section)
Profiles:
MyChannel:
Orderer: ...
// after
Profiles:
MyChannel:
Orderer: ...
Application:
Organizations:
- *Org1 Defensive patterns
Strategy: validation
Validate before calling
ac, ok := vc.Resources.ChannelConfigSource.GetStableChannelConfig(channelName).ApplicationConfig()
if !ok || len(ac.Organizations()) == 0 {
return fmt.Errorf("channel %s has no application orgs; implicit collections unavailable", channelName)
} Try / catch
ccs, err := vc.ChaincodeImplicitCollections(channelName)
if err != nil && strings.Contains(err.Error(), "could not get application config") {
return nil, fmt.Errorf("fix channel %s config to include Application group: %w", channelName, err)
} Prevention
- Create application channels from profiles that include an Application section with orgs.
- Inspect committed config with configtxlator before defining collections.
- Reject config updates that would remove the Application group.
When it happens
Trigger: Calling ChaincodeImplicitCollections on a channel whose config bundle lacks an Application section (orderer-only config, malformed configtx, or Application group stripped by a config update).
Common situations: Channels created from a configtx profile without an Application section; consortium/system-channel-style configs misused as application channels; config update removing all application orgs.
Related errors
- could not get channelconfig for channel %s
- subpolicy number %d type %T of policy %s is not convertible
- application config does not exist for channel '%s'
- policy '%s' must be defined for channel '%s' before chaincod
- could not retrieve policy for reference '%s' on channel '%s'
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/683a1ee20c73f1e0.
Report an issue: GitHub.