{"record":{"id":"0f221e7764fc8f23","repo":"hyperledger/fabric","slug":"plugin-with-name-s-wasn-t-found-0f221e","errorCode":null,"errorMessage":"plugin with name %s wasn't found","messagePattern":"plugin with name (.+?) wasn't found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"core/committer/txvalidator/v20/plugindispatcher/plugin_validator.go","lineNumber":146,"sourceCode":"\tplugin, err := pv.getOrCreatePlugin(ctx)\n\tif err != nil {\n\t\treturn &validation.ExecutionFailureError{\n\t\t\tReason: fmt.Sprintf(\"plugin with name %s couldn't be used: %v\", ctx.PluginName, err),\n\t\t}\n\t}\n\terr = plugin.Validate(ctx.Block, ctx.Namespace, ctx.Seq, 0, txvalidatorplugin.SerializedPolicy(ctx.Policy))\n\tvalidityStatus := \"valid\"\n\tif err != nil {\n\t\tvalidityStatus = fmt.Sprintf(\"invalid: %v\", err)\n\t}\n\tlogger.Debug(\"Transaction\", ctx.TxID, \"appears to be\", validityStatus)\n\treturn err\n}\n\nfunc (pv *PluginValidator) getOrCreatePlugin(ctx *Context) (validation.Plugin, error) {\n\tpluginFactory := pv.FactoryByName(txvalidatorplugin.Name(ctx.PluginName))\n\tif pluginFactory == nil {\n\t\treturn nil, errors.Errorf(\"plugin with name %s wasn't found\", ctx.PluginName)\n\t}\n\n\tpluginsByChannel := pv.getOrCreatePluginChannelMapping(txvalidatorplugin.Name(ctx.PluginName), pluginFactory)\n\treturn pluginsByChannel.createPluginIfAbsent(ctx.Channel)\n}\n\nfunc (pv *PluginValidator) getOrCreatePluginChannelMapping(plugin txvalidatorplugin.Name, pf validation.PluginFactory) *pluginsByChannel {\n\tpv.Lock()\n\tdefer pv.Unlock()\n\tendorserChannelMapping, exists := pv.pluginChannelMapping[plugin]\n\tif !exists {\n\t\tendorserChannelMapping = &pluginsByChannel{\n\t\t\tpluginFactory:    pf,\n\t\t\tchannels2Plugins: make(map[string]validation.Plugin),\n\t\t\tpv:               pv,\n\t\t}\n\t\tpv.pluginChannelMapping[plugin] = endorserChannelMapping\n\t}","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/committer/txvalidator/v20/plugindispatcher/plugin_validator.go#L128-L164","documentation":"PluginValidator.getOrCreatePlugin looks up a validation-plugin factory by the name stored in the chaincode definition (ctx.PluginName); no factory with that name is registered. Fabric throws this when the peer was not configured with the named validation plugin, so transactions for that chaincode cannot be validated.","triggerScenarios":"A chaincode definition names a custom validation plugin (e.g. plugin 'myvscc') that is absent from the peer's core.yaml validators map or was not registered via the plugin registry — hit at validation time for the first tx of that chaincode.","commonSituations":"Deploying a chaincode with a custom vscc plugin on a peer whose core.yaml lacks the validators.<name> entry; typo in plugin name in the definition; plugin .so/library not present on the peer host; definition approved on one peer image that lacks the plugin used by the channel.","solutions":["Register the plugin in the peer's core.yaml under validators.<pluginName> (library path + command) and restart the peer.","Correct the plugin name in the chaincode definition to one registered on all validating peers (use 'vscc' for default validation).","Deploy the plugin shared library/bytes to every validating peer in the channel.","Ensure all peers run the same build/config so definitions referencing custom plugins resolve everywhere."],"exampleFix":"// before (core.yaml)\nvalidators: {}\n// after\nvalidators:\n  myvscc:\n    library: /etc/hyperledger/fabric/plugins/myvscc.so","handlingStrategy":"validation","validationCode":"// before approving a definition with a custom plugin, check peer config\nconst cfg = yaml.load(fs.readFileSync('core.yaml','utf8')); if (!cfg.validators?.[pluginName]) throw new Error(`plugin ${pluginName} not registered on this peer`);","typeGuard":"function pluginRegistered(cfg, name) { return !!cfg?.validators && Object.prototype.hasOwnProperty.call(cfg.validators, name); }","tryCatchPattern":"try { validate(tx); } catch (err) { if (/plugin with name .* wasn't found/.test(err.message)) { /* register plugin in core.yaml or use 'vscc' */ } else { throw err; } }","preventionTips":["Register every custom validation plugin in core.yaml on all validating peers.","Verify plugin names in definitions against peer config before committing definitions.","Ship plugin libraries with your peer deployment tooling.","Keep peer builds consistent across the channel."],"tags":["hyperledger-fabric","validation-plugin","configuration","peer"],"backgroundTag":"plugin-not-found","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"}