{"record":{"id":"9c5633f731b3066f","repo":"hyperledger/fabric","slug":"no-application-config-for-channel-s","errorCode":null,"errorMessage":"no application config for channel '%s'","messagePattern":"no application config for channel '(.+?)'","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/chaincode/lifecycle/scc.go","lineNumber":571,"sourceCode":"\tfor org, items := range mismatches {\n\t\tmismatchesProto[org] = &lb.CheckCommitReadinessResult_Mismatches{Items: items}\n\t}\n\n\treturn &lb.CheckCommitReadinessResult{\n\t\tApprovals:  approvals,\n\t\tMismatches: mismatchesProto,\n\t}, nil\n}\n\n// CommitChaincodeDefinition is a SCC function that may be dispatched\n// to which routes to the underlying lifecycle implementation.\nfunc (i *Invocation) CommitChaincodeDefinition(input *lb.CommitChaincodeDefinitionArgs) (proto.Message, error) {\n\tif err := i.validateInput(input.Name, input.Version, input.Collections); err != nil {\n\t\treturn nil, errors.WithMessage(err, \"error validating chaincode definition\")\n\t}\n\n\tif i.ApplicationConfig == nil {\n\t\treturn nil, errors.Errorf(\"no application config for channel '%s'\", i.Stub.GetChannelID())\n\t}\n\n\torgs := i.ApplicationConfig.Organizations()\n\topaqueStates := make([]OpaqueState, 0, len(orgs))\n\tvar myOrg string\n\tfor _, org := range orgs {\n\t\topaqueStates = append(opaqueStates, &ChaincodePrivateLedgerShim{\n\t\t\tCollection: implicitcollection.NameForOrg(org.MSPID()),\n\t\t\tStub:       i.Stub,\n\t\t})\n\t\tif org.MSPID() == i.SCC.OrgMSPID {\n\t\t\tmyOrg = i.SCC.OrgMSPID\n\t\t}\n\t}\n\n\tif myOrg == \"\" {\n\t\treturn nil, errors.Errorf(\"impossibly, this peer's org is processing requests for a channel it is not a member of\")\n\t}","sourceCodeStart":553,"sourceCodeEnd":589,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/chaincode/lifecycle/scc.go#L553-L589","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the channel config has a proper Application section with organizations and application capabilities enabled (V2_0)","Re-join the peer to the channel with a correct genesis block that includes application config","Ensure the channel application capability is set to V2_0 before attempting lifecycle commit operations"],"exampleFix":"// before: channelconfig without Application capabilities\nApplication: &Application{ Organizations: [...], Capabilities: ... } // V1_x capability\n// after\nApplication: &Application{ Organizations: [...], Capabilities: map[string]*Capability{ \"V2_0\": {} } }","handlingStrategy":"validation","validationCode":"// Go: before invoking commit, confirm the channel has app config\nfunc channelHasApplicationConfig(chConfig Config) bool {\n    return chConfig != nil && chConfig.Application() != nil && chConfig.Application().Organizations() != nil\n}","typeGuard":null,"tryCatchPattern":"res, err := scc.CommitChaincodeDefinition(args)\nif err != nil && strings.Contains(err.Error(), \"no application config for channel\") {\n    // surface channel-config remediation guidance to the operator\n}","preventionTips":["Enable V2_0 application capabilities on every channel before lifecycle operations","Verify channel config with 'peer channel fetch config' before commit","Ensure peers join channels using genesis blocks containing the Application section"],"tags":["hyperledger-fabric","chaincode-lifecycle","channel-config"],"backgroundTag":"missing-channel-application-config","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"}