{"record":{"id":"d6b226ec022ed55b","repo":"gotify/server","slug":"missing-newgotifyplugininstance-symbol","errorCode":null,"errorMessage":"missing NewGotifyPluginInstance symbol","messagePattern":"missing NewGotifyPluginInstance symbol","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/compat/wrap.go","lineNumber":24,"sourceCode":"\t\"plugin\"\n\n\tpapiv1 \"github.com/gotify/plugin-api\"\n)\n\n// Wrap wraps around a raw go plugin to provide typesafe access.\nfunc Wrap(p *plugin.Plugin) (Plugin, error) {\n\tgetInfoHandle, err := p.Lookup(\"GetGotifyPluginInfo\")\n\tif err != nil {\n\t\treturn nil, errors.New(\"missing GetGotifyPluginInfo symbol\")\n\t}\n\tswitch getInfoHandle := getInfoHandle.(type) {\n\tcase func() papiv1.Info:\n\t\tv1 := PluginV1{}\n\n\t\tv1.Info = getInfoHandle()\n\t\tnewInstanceHandle, err := p.Lookup(\"NewGotifyPluginInstance\")\n\t\tif err != nil {\n\t\t\treturn nil, errors.New(\"missing NewGotifyPluginInstance symbol\")\n\t\t}\n\t\tconstructor, ok := newInstanceHandle.(func(ctx papiv1.UserContext) papiv1.Plugin)\n\t\tif !ok {\n\t\t\treturn nil, fmt.Errorf(\"NewGotifyPluginInstance signature mismatch, func(ctx plugin.UserContext) plugin.Plugin expected, got %T\", newInstanceHandle)\n\t\t}\n\t\tv1.Constructor = constructor\n\t\treturn v1, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unknown plugin version (unrecogninzed GetGotifyPluginInfo signature %T)\", getInfoHandle)\n\t}\n}\n","sourceCodeStart":6,"sourceCodeEnd":36,"githubUrl":"https://github.com/gotify/server/blob/14bfc256276775c425f988d621dccfe705de18ac/plugin/compat/wrap.go#L6-L36","documentation":"Wrap() in plugin/compat/wrap.go fails when the plugin exports GetGotifyPluginInfo but not the required NewGotifyPluginInstance symbol. The second Lookup in the v1 branch returns an error, so the plugin has partial/incorrect API conformance: it provides plugin metadata but no instance constructor.","triggerScenarios":"Thrown at plugin/compat/wrap.go:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the required exported constructor func NewGotifyPluginInstance(ctx context.Context) (papiv1.Plugin) to the plugin's main package","Rebuild the .so with the same Go version and platform as the host server","Check the plugin against the plugin-api v1 contract to ensure all required symbols are exported"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"14bfc256276775c425f988d621dccfe705de18ac","analyzedAt":"2026-09-05T12:52:36.781Z","contentChangedAt":"2026-09-05T12:52:36.781Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}