hyperledger/fabric · error
plugin with name %s wasn't found
Error message
plugin with name %s wasn't found
What it means
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.
Source
Thrown at core/endorser/plugin_endorser.go:172
endorsement3.SigningIdentityFetcher
TransientStoreRetriever
}
// EndorseWithPlugin endorses the response with a plugin
func (pe *PluginEndorser) EndorseWithPlugin(pluginName, channelID string, prpBytes []byte, signedProposal *pb.SignedProposal) (*pb.Endorsement, []byte, error) {
plugin, err := pe.getOrCreatePlugin(PluginName(pluginName), channelID)
if err != nil {
return nil, nil, errors.WithMessagef(err, "plugin with name %s could not be used", pluginName)
}
return plugin.Endorse(prpBytes, signedProposal)
}
// getOrCreatePlugin returns a plugin instance for the given plugin name and channel
func (pe *PluginEndorser) getOrCreatePlugin(plugin PluginName, channel string) (endorsement.Plugin, error) {
pluginFactory := pe.PluginFactoryByName(plugin)
if pluginFactory == nil {
return nil, errors.Errorf("plugin with name %s wasn't found", plugin)
}
pluginsByChannel := pe.getOrCreatePluginChannelMapping(plugin, pluginFactory)
return pluginsByChannel.createPluginIfAbsent(channel)
}
func (pe *PluginEndorser) getOrCreatePluginChannelMapping(plugin PluginName, pf endorsement.PluginFactory) *pluginsByChannel {
pe.Lock()
defer pe.Unlock()
endorserChannelMapping, exists := pe.pluginChannelMapping[plugin]
if !exists {
endorserChannelMapping = &pluginsByChannel{
pluginFactory: pf,
channels2Plugins: make(map[string]endorsement.Plugin),
pe: pe,
}
pe.pluginChannelMapping[plugin] = endorserChannelMapping
}View on GitHub (pinned to 2736b63f8f)
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
Example fix
// core.yaml before (typo)
handlers:
endorsers:
escc:
library: /etc/hyperledger/fabric/plugin.so
// after
handlers:
endorsers:
MyEndorsementPlugin:
library: /etc/hyperledger/fabric/plugin.so Defensive patterns
Strategy: validation
Validate before calling
// at peer deploy time, assert the configured endorser library exists
if (!fs.existsSync(handlersConfig.endorsers[name].library)) {
throw new Error(`endorser library missing for plugin ${name}`);
} Try / catch
try {
await contract.submitTransaction(...);
} catch (e) {
if (/plugin with name .* wasn't found/.test(e.message)) {
// plugin not registered on this peer: check core.yaml handlers + library deployment
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- failed obtaining channel state
- transient store for channel %s was not initialized
- Empty policy element
- failed to initialize block verifier function
- block numbers not maintained in index
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/abd36ddb855ab80f.
Report an issue: GitHub.