hyperledger/fabric · error
No collection access policy filter computed for
Error message
No collection access policy filter computed for %v
What it means
computeDisseminationPlan could not compute a collection access policy filter for a private rwset collection: either its config was missing from the collection config package or AccessPolicy evaluation failed, so no dissemination plan for pvt data can be built and the distribution is aborted.
Solutions
- Verify the collection access policy implementation returns a non-nil AccessFilter
- Re-check the collection config type in the config package (static vs. unsupported variant)
- Rebuild collection config so a valid static collection config is used
Defensive patterns
Strategy: type-guard
Validate before calling
colAP, err := accessPolicy(colCP, chainID)
if err == nil && colAP.AccessFilter() == nil { /* treat as invalid policy */ } Type guard
func hasFilter(ap privdata.CollectionAccessPolicy) bool { return ap != nil && ap.AccessFilter() != nil } Prevention
- Use standard static collection configs so AccessFilter is implemented
- Never hand-roll CollectionAccessPolicy without a filter
When it happens
Trigger: colAP.AccessFilter() returns nil during computeDisseminationPlan — happens when the computed policy has no filter implementation (unexpected/unsupported policy type).
Common situations: Custom or malformed collection access policy implementation returning nil filter; internal policy construction succeeded but the concrete policy type does not support filtering.
Related errors
- Failed obtaining collection filter for channel
- collection config package for
- configHistoryRetriever is not available
- Could not obtain collection access policy, collection name
- Empty membership
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/2e2928f2de9dc7cd.
Report an issue: GitHub.
Appendix: source
Thrown at gossip/privdata/distributor.go:186
for _, collection := range pvtRwset.CollectionPvtRwset {
colCP, err := d.getCollectionConfig(configPackage, collection)
collectionName := collection.CollectionName
if err != nil {
d.logger.Error("Could not find collection access policy for", namespace, " and collection", collectionName, "error", err)
return nil, errors.WithMessage(err, fmt.Sprint("could not find collection access policy for", namespace, " and collection", collectionName, "error", err))
}
colAP, err := d.AccessPolicy(colCP, d.chainID)
if err != nil {
d.logger.Error("Could not obtain collection access policy, collection name", collectionName, "due to", err)
return nil, errors.Wrap(err, fmt.Sprint("Could not obtain collection access policy, collection name", collectionName, "due to", err))
}
colFilter := colAP.AccessFilter()
if colFilter == nil {
d.logger.Error("Collection access policy for", collectionName, "has no filter")
return nil, errors.Errorf("No collection access policy filter computed for %v", collectionName)
}
pvtDataMsg, err := d.createPrivateDataMessage(txID, namespace, collection, &peer.CollectionConfigPackage{Config: []*peer.CollectionConfig{colCP}}, blkHt)
if err != nil {
return nil, errors.WithStack(err)
}
d.logger.Debugf("Computing dissemination plan for collection [%s]", collectionName)
dPlan, err := d.disseminationPlanForMsg(colAP, colFilter, pvtDataMsg)
if err != nil {
return nil, errors.WithMessagef(err, "could not build private data dissemination plan for chaincode %s and collection %s", namespace, collectionName)
}
disseminationPlan = append(disseminationPlan, dPlan...)
}
}
return disseminationPlan, nil
}
View on GitHub (pinned to 2736b63f8f)