hyperledger/fabric · error
no org found in channel with MSPID '%s'
Error message
no org found in channel with MSPID '%s'
What it means
ImplicitCollectionEndorsementPolicyAsBytes returns this when it scans ac.Organizations() for an org whose MSPID equals orgMSPID and finds none. The implicit collection for that org cannot be built because the org is not a member of the channel's application config. Unlike the previous two errors, this is returned as validationErr, so it fails the transaction validation.
Source
Thrown at core/chaincode/lifecycle/deployedcc_infoprovider.go:285
if channelConfig == nil {
return nil, errors.Errorf("could not get channel config for channel '%s'", channelID), nil
}
ac, ok := channelConfig.ApplicationConfig()
if !ok {
return nil, errors.Errorf("could not get application config for channel '%s'", channelID), nil
}
matchedOrgName := ""
for orgName, org := range ac.Organizations() {
if org.MSPID() == orgMSPID {
matchedOrgName = orgName
break
}
}
if matchedOrgName == "" {
return nil, nil, errors.Errorf("no org found in channel with MSPID '%s'", orgMSPID)
}
policyName := fmt.Sprintf("/Channel/Application/%s/Endorsement", matchedOrgName)
if _, ok := channelConfig.PolicyManager().GetPolicy(policyName); ok {
return protoutil.MarshalOrPanic(&cb.ApplicationPolicy{
Type: &cb.ApplicationPolicy_ChannelConfigPolicyReference{
ChannelConfigPolicyReference: policyName,
},
}), nil, nil
}
// This was a channel which was upgraded or did not define an org level endorsement policy, use a default
// of "any member of the org"
return protoutil.MarshalOrPanic(&cb.ApplicationPolicy{
Type: &cb.ApplicationPolicy_SignaturePolicy{
SignaturePolicy: policydsl.SignedByAnyMember([]string{orgMSPID}),
},View on GitHub (pinned to 2736b63f8f)
Solutions
- Confirm the exact MSPID spelling in the collection definition matches an org in the channel config (case-sensitive).
- Add the missing organization to the channel's Application organizations via a config update.
- Update the chaincode's collection configuration to remove references to orgs not on the channel, then commit a new chaincode definition.
Example fix
// before (collections.json references org not on channel)
{"name":"col","implicitCollectionOrgMSPIDs":["Org3MSP"]}
// after (only MSPIDs present in channel Application config)
{"name":"col","implicitCollectionOrgMSPIDs":["Org1MSP","Org2MSP"]} Defensive patterns
Strategy: validation
Validate before calling
// Go: ensure every MSPID in the collection config is an org on the channel
ac, ok := channelConfig.ApplicationConfig()
if !ok { return err }
orgMSPIDs := map[string]bool{}
for _, org := range ac.Organizations() { orgMSPIDs[org.MSPID()] = true }
for _, msp := range coll.ImplicitCollectionOrgMSPIDs {
if !orgMSPIDs[msp] { return fmt.Errorf("org %s not on channel", msp) }
} Try / catch
if validationErr != nil {
if strings.Contains(validationErr.Error(), "no org found in channel with MSPID") {
// fix collection definition or add org via config update
}
} Prevention
- Keep collections.json MSPIDs in sync with channel membership (case-sensitive).
- Run checkcommitreadiness/peer collection listing before commit.
- Update collections config whenever orgs join/leave the channel.
- Never reuse collection definitions across channels blindly.
When it happens
Trigger: CollectionValidationInfo is asked for the endorsement policy bytes of an implicit collection _implicit_org_<MSPID> where <MSPID> does not appear among the channel's Application organizations.
Common situations: Org removed from the channel but old data/private collections still reference it; MSPID case mismatch (MSPIDs are case-sensitive); validating a chaincode's collections.json that names an org never added to the channel.
Related errors
- MSP for org %s has empty MSP ID
- error parsing principal %s
- Invalid Peer Identity. It must be different from nil.
- '%s' not equal <newest|oldest|config|(number)>
- unmarshalling block: %s
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/e064724b52b8d200.
Report an issue: GitHub.