flipped-aurora/gin-vue-admin · error
server and web plugin names must match
Error message
server and web plugin names must match
What it means
When installing a sub-plugin from an uploaded archive, the installer locates both a server-side and a web-side plugin package inside it. This error is thrown when both parts exist but their extracted plugin names differ. The installer refuses to proceed because server and web halves of a plugin must be installed under the same directory name.
Source
Thrown at server/service/system/auto_code_plugin.go:210
}
if _, err = io.Copy(out, src); err != nil {
out.Close()
return -1, -1, err
}
if err = out.Close(); err != nil {
return -1, -1, err
}
paths, err := utils.Unzip(archivePath, tempDir)
if err != nil {
return -1, -1, err
}
archive, err := findPluginArchive(tempDir, filterFile(paths))
if err != nil {
return -1, -1, err
}
if archive.server != nil && archive.web != nil && archive.server.name != archive.web.name {
return -1, -1, errors.New("server and web plugin names must match")
}
var serverTarget, webTarget string
if archive.server != nil {
serverTarget, err = pluginInstallRoot(global.GVA_CONFIG.AutoCode.Server, parentPlugin)
if err != nil {
return -1, -1, err
}
if err = ensurePluginTargetAvailable(serverTarget, archive.server.name); err != nil {
return -1, -1, err
}
}
if archive.web != nil {
webTarget, err = pluginInstallRoot(global.GVA_CONFIG.AutoCode.Web, parentPlugin)
if err != nil {
return -1, -1, err
}
if err = ensurePluginTargetAvailable(webTarget, archive.web.name); err != nil {View on GitHub (pinned to 3136500ef3)
Solutions
- Extract the archive and rename the web plugin directory (and any references to it) so it exactly matches the server plugin directory name.
- Alternatively rename the server plugin directory to match the web one, whichever name is correct.
- Repackage the archive with matching top-level `server/plugin/<name>` and `web/src/plugin/<name>` paths and retry the install.
- If only one side is intended to ship, remove the other side from the archive so only one part is present.
Example fix
// before (archive layout) server/plugin/payment-gateway/ web/src/plugin/pay-gateway/ // after server/plugin/payment-gateway/ web/src/plugin/payment-gateway/
Defensive patterns
Strategy: validation
Validate before calling
import { readZipEntries } from './zip'
const entries = await readZipEntries(file)
const serverName = entries.find(e => /(^|\/)server\/[^/]+\//.test(e))?.split('/')[1]
const webName = entries.find(e => /(^|\/)web\/src\/plugin\/[^/]+\//.test(e))?.split('/').pop()
if (serverName && webName && serverName !== webName) {
throw new Error(`plugin name mismatch: server=${serverName} web=${webName}`)
} Try / catch
try {
await installPlugin(archive)
} catch (e) {
if (e.message.includes('names must match')) {
showHint('Archive contains differently-named server and web plugins; rename one side and repackage.')
} else { throw e }
} Prevention
- Always package plugins with the official packaging tool instead of zipping folders by hand.
- Keep the server and web plugin directory names identical in source control so packaging cannot diverge.
- Open the zip and verify `server/plugin/<name>` and `web/src/plugin/<name>` match before upload.
When it happens
Trigger: Calling the plugin Install API with a zip archive whose `server/` directory contains plugin `foo` (e.g. server/plugin/foo) while `web/` contains plugin `bar` (e.g. web/src/plugin/bar). Any mismatch between the directory name immediately under the server root and the one under the web root in the archive triggers it.
Common situations: Hand-assembled plugin zips where the web folder was renamed or copied from a differently-named plugin; packaging a new version of the server side but keeping an old web side with a renamed plugin; typo in one of the two directory names; building the archive manually instead of using the plugin packaging tool.
Related errors
- plugin archive contains multiple server plugins
- plugin archive contains multiple web plugins
- invalid plugin archive
- 不能使用已保留的package name
- parent plugin is not a directory
AI-assisted analysis of flipped-aurora/gin-vue-admin@3136500ef3 (2026-08-31).
Data as JSON: /api/errors/e89822052664961f.
Report an issue: GitHub.