{"record":{"id":"064878b477fd0dc2","repo":"router-for-me/CLIProxyAPI","slug":"plugin-manifest-invalid","errorCode":"plugin_manifest_invalid","errorMessage":"direct plugin version %q not found","messagePattern":"direct plugin version %q not found","errorType":"http","errorClass":null,"httpStatus":502,"severity":"error","filePath":"internal/api/handlers/management/plugin_store.go","lineNumber":385,"sourceCode":"\tif version == \"\" {\n\t\tversion = normalizePluginStoreRequestedVersion(plugin.Version)\n\t}\n\tif normalizePluginStoreRequestedVersion(plugin.Version) == version {\n\t\tplugin.Version = version\n\t\treturn pluginstore.ManifestFromPlugin(source, plugin)\n\t}\n\tfor _, candidate := range plugin.Versions {\n\t\tif normalizePluginStoreRequestedVersion(candidate.Version) != version {\n\t\t\tcontinue\n\t\t}\n\t\tplugin.Version = version\n\t\tplugin.Install = candidate.Install\n\t\tif strings.TrimSpace(plugin.Install.Type) == \"\" {\n\t\t\tplugin.Install.Type = pluginstore.InstallTypeDirect\n\t\t}\n\t\treturn pluginstore.ManifestFromPlugin(source, plugin)\n\t}\n\treturn pluginstore.Manifest{}, fmt.Errorf(\"direct plugin version %q not found\", version)\n}\n\nfunc installPluginStoreGitHubRelease(ctx context.Context, client pluginstore.Client, plugin pluginstore.Plugin, requestedVersion string, options pluginstore.InstallOptions) (pluginstore.InstallResult, error) {\n\tversion := normalizePluginStoreRequestedVersion(requestedVersion)\n\tif version == \"\" {\n\t\treturn client.Install(ctx, plugin, options)\n\t}\n\ttags := pluginStoreReleaseTagCandidates(requestedVersion)\n\terrs := make([]error, 0, len(tags))\n\tfor _, tag := range tags {\n\t\tresult, errInstall := client.InstallVersion(ctx, plugin, tag, version, options)\n\t\tif errInstall == nil {\n\t\t\treturn result, nil\n\t\t}\n\t\terrs = append(errs, fmt.Errorf(\"%s: %w\", tag, errInstall))\n\t}\n\treturn pluginstore.InstallResult{}, fmt.Errorf(\"install release by tag: %w\", errors.Join(errs...))\n}","sourceCodeStart":367,"sourceCodeEnd":403,"githubUrl":"https://github.com/router-for-me/CLIProxyAPI/blob/78f0c4079e3e6273d65d03b5549cffc898703264/internal/api/handlers/management/plugin_store.go#L367-L403","documentation":"Returned by pluginStoreDirectManifest (plugin_store.go:385) with code plugin_manifest_invalid when installing a direct-type plugin whose requested version (after stripping an optional 'v' prefix via normalizePluginStoreRequestedVersion) matches neither the plugin's top-level Version nor any entry in its Versions list. The store's plugin index simply does not know that version.","triggerScenarios":"POST to the management plugin install endpoint with ?version=2.0.0 when the plugin index only lists 1.x; requesting a version that exists upstream but the configured store source has not re-indexed yet; typos like version=v1,2,3.","commonSituations":"Stale plugin-store index (source cache not refreshed after a release); pinning to an old version that was removed from the index; using a fork/store URL that carries different version numbers than the official one.","solutions":["Re-query the plugin store listing for the plugin and copy an exact version string from its Versions array","Retry without ?version to install the plugin's default (top-level) version","Refresh the store source / clear its cache so the index picks up newly published versions","Check for typos and prefix conventions: '1.2.3' and 'v1.2.3' normalize to the same value, but '1.2.3-beta' does not match '1.2.3'"],"exampleFix":"# before\ncurl -X POST -H \"Authorization: Bearer $KEY\" \\\n  'http://127.0.0.1:8000/management/plugin-store/install?plugin_id=foo&version=2.0.0'\n\n# after: use a version present in the index\ncurl -H \"Authorization: Bearer $KEY\" \\\n  'http://127.0.0.1:8000/management/plugin-store/plugins?plugin_id=foo'   # list versions first\ncurl -X POST -H \"Authorization: Bearer $KEY\" \\\n  'http://127.0.0.1:8000/management/plugin-store/install?plugin_id=foo&version=1.4.2'","handlingStrategy":"validation","validationCode":"// Before installing, confirm the requested version exists in the index.\nknown := false\nnorm := func(v string) string { v = strings.TrimSpace(v); return strings.TrimPrefix(strings.ToLower(v), \"v\") }\nif norm(plugin.Version) == norm(requested) {\n\tknown = true\n}\nfor _, c := range plugin.Versions {\n\tif norm(c.Version) == norm(requested) {\n\t\tknown = true\n\t\tbreak\n\t}\n}\nif !known {\n\treturn fmt.Errorf(\"version %s not in index; refresh or omit version\", requested)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["List available versions from the store before pinning an install","Refresh the plugin-store index before installing freshly released versions","Remember 'v1.2.3' and '1.2.3' are equivalent, but any other difference is a mismatch"],"tags":["plugins","plugin-store","versioning","management-api"],"backgroundTag":null,"analyzedSha":"78f0c4079e3e6273d65d03b5549cffc898703264","analyzedAt":"2026-08-15T12:26:37.444Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}