hyperledger/fabric · error

no application config for channel '%s'

Error message

no application config for channel '%s'

What it means

CommitChaincodeDefinition is the SCC invocation that endorses a chaincode definition commit during the Fabric v2 lifecycle. Before doing any work it requires the peer's ApplicationConfig for the channel, which is loaded when the channel joins the peer. If i.ApplicationConfig is nil, the peer has no application-capable configuration for that channel, so the commit endorsement is rejected.

Source

Thrown at core/chaincode/lifecycle/scc.go:571

	for org, items := range mismatches {
		mismatchesProto[org] = &lb.CheckCommitReadinessResult_Mismatches{Items: items}
	}

	return &lb.CheckCommitReadinessResult{
		Approvals:  approvals,
		Mismatches: mismatchesProto,
	}, nil
}

// CommitChaincodeDefinition is a SCC function that may be dispatched
// to which routes to the underlying lifecycle implementation.
func (i *Invocation) CommitChaincodeDefinition(input *lb.CommitChaincodeDefinitionArgs) (proto.Message, error) {
	if err := i.validateInput(input.Name, input.Version, input.Collections); err != nil {
		return nil, errors.WithMessage(err, "error validating chaincode definition")
	}

	if i.ApplicationConfig == nil {
		return nil, errors.Errorf("no application config for channel '%s'", i.Stub.GetChannelID())
	}

	orgs := i.ApplicationConfig.Organizations()
	opaqueStates := make([]OpaqueState, 0, len(orgs))
	var myOrg string
	for _, org := range orgs {
		opaqueStates = append(opaqueStates, &ChaincodePrivateLedgerShim{
			Collection: implicitcollection.NameForOrg(org.MSPID()),
			Stub:       i.Stub,
		})
		if org.MSPID() == i.SCC.OrgMSPID {
			myOrg = i.SCC.OrgMSPID
		}
	}

	if myOrg == "" {
		return nil, errors.Errorf("impossibly, this peer's org is processing requests for a channel it is not a member of")
	}

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Verify the channel config has a proper Application section with organizations and application capabilities enabled (V2_0)
  2. Re-join the peer to the channel with a correct genesis block that includes application config
  3. Ensure the channel application capability is set to V2_0 before attempting lifecycle commit operations

Example fix

// before: channelconfig without Application capabilities
Application: &Application{ Organizations: [...], Capabilities: ... } // V1_x capability
// after
Application: &Application{ Organizations: [...], Capabilities: map[string]*Capability{ "V2_0": {} } }
Defensive patterns

Strategy: validation

Validate before calling

// Go: before invoking commit, confirm the channel has app config
func channelHasApplicationConfig(chConfig Config) bool {
    return chConfig != nil && chConfig.Application() != nil && chConfig.Application().Organizations() != nil
}

Try / catch

res, err := scc.CommitChaincodeDefinition(args)
if err != nil && strings.Contains(err.Error(), "no application config for channel") {
    // surface channel-config remediation guidance to the operator
}

Prevention

When it happens

Trigger: Invoking the _lifecycle SCC's CommitChaincodeDefinition on a channel whose peer has no application config — typically because the channel config lacks an Application section / capabilities, or the channel's config was not fully loaded on this peer.

Common situations: A channel created without application capabilities (e.g. legacy or system-channel-style config), a peer that has joined the channel via genesis block lacking an Application group, or calling CommitChaincodeDefinition on a channel where the peer is only an orderer-side member.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/9c5633f731b3066f. Report an issue: GitHub.