{"record":{"id":"abd36ddb855ab80f","repo":"hyperledger/fabric","slug":"plugin-with-name-s-wasn-t-found-abd36d","errorCode":null,"errorMessage":"plugin with name %s wasn't found","messagePattern":"plugin with name (.+?) wasn't found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/endorser/plugin_endorser.go","lineNumber":172,"sourceCode":"\tendorsement3.SigningIdentityFetcher\n\tTransientStoreRetriever\n}\n\n// EndorseWithPlugin endorses the response with a plugin\nfunc (pe *PluginEndorser) EndorseWithPlugin(pluginName, channelID string, prpBytes []byte, signedProposal *pb.SignedProposal) (*pb.Endorsement, []byte, error) {\n\tplugin, err := pe.getOrCreatePlugin(PluginName(pluginName), channelID)\n\tif err != nil {\n\t\treturn nil, nil, errors.WithMessagef(err, \"plugin with name %s could not be used\", pluginName)\n\t}\n\n\treturn plugin.Endorse(prpBytes, signedProposal)\n}\n\n// getOrCreatePlugin returns a plugin instance for the given plugin name and channel\nfunc (pe *PluginEndorser) getOrCreatePlugin(plugin PluginName, channel string) (endorsement.Plugin, error) {\n\tpluginFactory := pe.PluginFactoryByName(plugin)\n\tif pluginFactory == nil {\n\t\treturn nil, errors.Errorf(\"plugin with name %s wasn't found\", plugin)\n\t}\n\n\tpluginsByChannel := pe.getOrCreatePluginChannelMapping(plugin, pluginFactory)\n\treturn pluginsByChannel.createPluginIfAbsent(channel)\n}\n\nfunc (pe *PluginEndorser) getOrCreatePluginChannelMapping(plugin PluginName, pf endorsement.PluginFactory) *pluginsByChannel {\n\tpe.Lock()\n\tdefer pe.Unlock()\n\tendorserChannelMapping, exists := pe.pluginChannelMapping[plugin]\n\tif !exists {\n\t\tendorserChannelMapping = &pluginsByChannel{\n\t\t\tpluginFactory:    pf,\n\t\t\tchannels2Plugins: make(map[string]endorsement.Plugin),\n\t\t\tpe:               pe,\n\t\t}\n\t\tpe.pluginChannelMapping[plugin] = endorserChannelMapping\n\t}","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/endorser/plugin_endorser.go#L154-L190","documentation":"The endorser was asked to endorse with a plugin whose factory is not registered. Plugins are registered by name at peer startup from core.yaml's handlers config; if the name in the proposal/chaincode endorser mapping has no corresponding PluginFactory, this error is returned.","triggerScenarios":"EndorseWithPlugin -> getOrCreatePlugin where pe.PluginFactoryByName(plugin) returns nil — the plugin name (e.g. 'ESCC', or a custom plugin name from core.yaml handlers.endorsers) is not in the registered factories map.","commonSituations":"Typo in core.yaml handlers.endorsers/endorsersLibrary mapping; custom endorsement plugin .so not deployed to the peer or path wrong; upgrading Fabric where a built-in plugin name changed; missing library file so registration silently skipped.","solutions":["Check core.yaml handlers.endorsers: the plugin name in the chaincode lifecycle endorser mapping must exactly match a key configured there, and the library path must exist in the peer container","Deploy the custom plugin .so to the peer's handlers library directory and restart the peer","Verify peer logs at startup for plugin registration errors","If using built-in endorsement, ensure the chaincode definition references the standard ESCC ('ESCC') rather than a custom name"],"exampleFix":"// core.yaml before (typo)\nhandlers:\n  endorsers:\n    escc:\n      library: /etc/hyperledger/fabric/plugin.so\n// after\nhandlers:\n  endorsers:\n    MyEndorsementPlugin:\n      library: /etc/hyperledger/fabric/plugin.so","handlingStrategy":"validation","validationCode":"// at peer deploy time, assert the configured endorser library exists\nif (!fs.existsSync(handlersConfig.endorsers[name].library)) {\n  throw new Error(`endorser library missing for plugin ${name}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  await contract.submitTransaction(...);\n} catch (e) {\n  if (/plugin with name .* wasn't found/.test(e.message)) {\n    // plugin not registered on this peer: check core.yaml handlers + library deployment\n  }\n  throw e;\n}","preventionTips":["Keep core.yaml handlers.endorsers names exactly in sync with chaincode endorser mappings","Mount custom plugin .so files into the peer container and verify on startup","After Fabric upgrades, re-verify plugin names and library paths","Include a smoke-test endorsement in CI that exercises every configured plugin"],"tags":["hyperledger-fabric","endorser","plugin","configuration"],"backgroundTag":"plugin-not-registered","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"}