OpenNHP/opennhp · warning
plugin not implemented
Error message
plugin not implemented
What it means
PluginHandlerSymbol is the placeholder returned when no real server plugin (.so) is loaded; every PluginHandler method checks whether the corresponding dlopen symbol was resolved and returns errPluginNotImplemented if it was not. It signals that the handler is a stub and the requested plugin operation (Init, Close, RequestOTP, RegisterAgent, ListService, AuthWithNHP) has no backing implementation.
Solutions
- Check the server's plugin configuration (plugin .so path) and ensure the plugin file exists and is loadable
- Rebuild the plugin with the same Go version as the server binary (go build -buildmode=plugin) and redeploy it
- Confirm plugin loading succeeded at startup by checking the dlopen/openplugin step and its logs before treating handler method failures as plugin bugs
Example fix
// before (config.toml) # [plugin] section missing // after [plugin] path = "plugins/server-plugin.so"
Defensive patterns
Strategy: validation
Validate before calling
h := plugins.GetHandler()
if _, ok := h.(*plugins.PluginHandlerSymbol); ok {
return errors.New("no server plugin loaded; check plugin config")
} Try / catch
if err := h.AuthWithNHP(in); err != nil {
if errors.Is(err, plugins.ErrPluginNotImplemented) || err.Error() == "plugin not implemented" {
return fmt.Errorf("plugin missing: %w", err)
}
return err
} Prevention
- Verify the plugin .so loads at startup and log a fatal error if it does not
- Build the plugin with the exact same Go toolchain version as the daemon
- Add a startup smoke test calling h.Version() and failing if it returns an empty string
- Keep the plugin path in config under health checks
When it happens
Trigger: The server was configured without a valid plugin path, the .so failed to load (wrong ABI, missing dependency), or openplugin returned a stub handler; the server then calls RegisterAgent, AuthWithNHP, ListService, RequestOTP, Init, or Close on that stub.
Common situations: Running nhp-serverd without building/loading the example server plugin; plugin .so built against a different Go version so symbols fail to resolve; typo in plugin config path so the fallback symbol handler is used.
Related errors
- invalid digit count
- unsupported type: %T
- unknown remote provider
- unknown remote provider
- unsupported key type, expect RSA
AI-assisted analysis of OpenNHP/opennhp@6e04ca5ff0 (2026-09-07).
Data as JSON: /api/errors/2aa7bb47bffb69d7.
Report an issue: GitHub.
Appendix: source
Thrown at nhp/plugins/serverpluginhandler.go:43
ListService(*common.NhpListRequest, *NhpServerPluginHelper) (*common.ServerListResultMsg, error)
AuthWithNHP(*common.NhpAuthRequest, *NhpServerPluginHelper) (*common.ServerKnockAckMsg, error)
AuthWithHttp(*gin.Context, *common.HttpKnockRequest, *HttpServerPluginHelper) (*common.ServerKnockAckMsg, error)
}
type PluginHandlerSymbol struct {
sVersion plugin.Symbol
sSignature plugin.Symbol
sExportedData plugin.Symbol
sInit plugin.Symbol
sClose plugin.Symbol
sRequestOTP plugin.Symbol
sRegisterAgent plugin.Symbol
sListService plugin.Symbol
sAuthWithNHP plugin.Symbol
sAuthWithHttp plugin.Symbol
}
var errPluginNotImplemented error = fmt.Errorf("plugin not implemented")
func (s *PluginHandlerSymbol) Version() string {
if s.sVersion == nil {
return ""
}
defer utils.CatchPanic()
return s.sVersion.(func() string)()
}
func (s *PluginHandlerSymbol) Signature() string {
if s.sSignature == nil {
return ""
}
defer utils.CatchPanic()
return s.sSignature.(func() string)()
}View on GitHub (pinned to 6e04ca5ff0)