gotify/server · error

unknown plugin version (unrecogninzed GetGotifyPluginInfo si

Error message

unknown plugin version (unrecogninzed GetGotifyPluginInfo signature %T)

What it means

Wrap switches on the concrete type of the plugin's GetGotifyPluginInfo symbol to detect the plugin API version. If the symbol's type matches none of the known version signatures, the plugin version is unknown and this error (note the 'unrecogninzed' typo) is returned.

Source

Thrown at plugin/compat/wrap.go:33

		return nil, errors.New("missing GetGotifyPluginInfo symbol")
	}
	switch getInfoHandle := getInfoHandle.(type) {
	case func() papiv1.Info:
		v1 := PluginV1{}

		v1.Info = getInfoHandle()
		newInstanceHandle, err := p.Lookup("NewGotifyPluginInstance")
		if err != nil {
			return nil, errors.New("missing NewGotifyPluginInstance symbol")
		}
		constructor, ok := newInstanceHandle.(func(ctx papiv1.UserContext) papiv1.Plugin)
		if !ok {
			return nil, fmt.Errorf("NewGotifyPluginInstance signature mismatch, func(ctx plugin.UserContext) plugin.Plugin expected, got %T", newInstanceHandle)
		}
		v1.Constructor = constructor
		return v1, nil
	default:
		return nil, fmt.Errorf("unknown plugin version (unrecogninzed GetGotifyPluginInfo signature %T)", getInfoHandle)
	}
}

View on GitHub (pinned to 14bfc25627)

Solutions

  1. Rebuild the plugin against a supported plugin-api version
  2. Verify GetGotifyPluginInfo is declared with one of the supported signatures (e.g. func() (int, plugin.PluginInfo))
  3. Check the plugin's go.mod pins a compatible version of the gotify plugin-api
  4. Confirm you are loading a real Gotify plugin, not an arbitrary shared object

Example fix

// before (unsupported newer API)
func GetGotifyPluginInfo() (int, plugin.PluginInfo, extra.Metadata) { ... }
// after (supported v1)
func GetGotifyPluginInfo() (int, plugin.PluginInfo) { return 1, plugin.PluginInfo{...} }
Defensive patterns

Strategy: type-guard

Validate before calling

sym, err := p.Lookup("GetGotifyPluginInfo")
if err != nil { panic("missing symbol") }
switch sym.(type) {
case func() (int, papiv1.PluginInfo):
    // supported v1
default:
    fmt.Printf("unsupported version signature: %T\n", sym)
}

Type guard

func isSupportedInfoSignature(h interface{}) bool {
    switch h.(type) {
    case func() (int, papiv1.PluginInfo):
        return true
    default:
        return false
    }
}

Try / catch

compat, err := wrapper.Wrap(pluginPath)
if err != nil {
    if strings.Contains(err.Error(), "unknown plugin version") {
        log.Printf("unsupported plugin %s: %v", pluginPath, err)
        return nil
    }
    return err
}

Prevention

When it happens

Trigger: A plugin exports a GetGotifyPluginInfo function whose signature does not match any supported version's expected type, or the symbol is of an unexpected type entirely (e.g. a variable, not a function).

Common situations: Loading a plugin built for a much newer or older plugin-api major version, or loading a non-plugin shared library that happens to export GetGotifyPluginInfo.

Related errors


AI-assisted analysis of gotify/server@14bfc25627 (2026-09-05). Data as JSON: /api/errors/14a3a971d0de2def. Report an issue: GitHub.