{"record":{"id":"69b96dd8d3cca737","repo":"hyperledger/fabric","slug":"no-peers-available-to-evaluate-chaincode-s-in-cha","errorCode":null,"errorMessage":"no peers available to evaluate chaincode %s in channel %s","messagePattern":"no peers available to evaluate chaincode (.+?) in channel (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/pkg/gateway/registry.go","lineNumber":278,"sourceCode":"\t\t\t\tlocalOrgEndorsers = es\n\t\t\t} else {\n\t\t\t\totherOrgEndorsers = append(otherOrgEndorsers, es...)\n\t\t\t}\n\t\t}\n\t}\n\t// sort all the 'other orgs' endorsers by decreasing block height\n\tsort.Slice(otherOrgEndorsers, sorter(otherOrgEndorsers, \"\"))\n\n\tvar allEndorsers []*endorser\n\tfor _, e := range append(localOrgEndorsers, otherOrgEndorsers...) {\n\t\tallEndorsers = append(allEndorsers, e.endorser)\n\t}\n\tif len(allEndorsers) > 0 {\n\t\tlayout := []*layout{{required: map[string]int{\"g1\": 1}}} // single layout, one group, one endorsement\n\t\tgroupEndorsers := map[string][]*endorser{\"g1\": allEndorsers}\n\t\treturn newPlan(layout, groupEndorsers), nil\n\t}\n\treturn nil, fmt.Errorf(\"no peers available to evaluate chaincode %s in channel %s\", chaincode, channel)\n}\n\nfunc sorter(e []*endorserState, host string) func(i, j int) bool {\n\treturn func(i, j int) bool {\n\t\tif e[i].height == e[j].height {\n\t\t\t// prefer host peer\n\t\t\treturn e[i].endorser.address == host\n\t\t}\n\t\treturn e[i].height > e[j].height\n\t}\n}\n\n// Returns a set of broadcastClients that can order a transaction for the given channel.\nfunc (reg *registry) orderers(channel string) ([]*orderer, int, error) {\n\tvar orderers []*orderer\n\tvar ordererEndpoints []*endpointConfig\n\taddr, exists := reg.channelOrderers.Load(channel)\n\t// if it doesn't exist, get the orderers config for this channel","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/pkg/gateway/registry.go#L260-L296","documentation":"Gateway evaluator: after collecting endorsers across all orgs for the chaincode on the channel, the list is empty — no peers are known/discovered to evaluate the chaincode, so no endorsement plan can be created.","triggerScenarios":"Thrown at internal/pkg/gateway/registry.go:278 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the chaincode is deployed on the channel","Ensure the peer has joined the channel and discovery data is populated","Retry after peers come online"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}