siyuan-note/siyuan · error
multiple marketplace package manifests found
Error message
multiple marketplace package manifests found
What it means
Returned by ExtractLocalPackage (kernel/bazaar/local.go:63-69) when scanning the extracted local package directory finds more than one manifest file. The function iterates localPackageManifests (plugin.json, theme.json, icon.json, template.json, widget.json) and expects exactly one match. Finding two or more (e.g. both plugin.json and theme.json) is ambiguous — the package type cannot be determined — so the extraction is aborted and cleanup() is called to remove the temp directory.
Source
Thrown at kernel/bazaar/local.go:67
tempPath := filepath.Join(util.TempDir, "bazaar", "local", gulu.Rand.String(7))
cleanup = func() { _ = os.RemoveAll(tempPath) }
if err = extractLocalPackageArchive(archivePath, tempPath); err != nil {
cleanup()
return
}
packagePath, err = localPackageRoot(tempPath)
if err != nil {
cleanup()
return
}
var manifestPath string
for manifestName, packageType := range localPackageManifests {
candidate := filepath.Join(packagePath, manifestName)
if info, statErr := os.Stat(candidate); statErr == nil && info.Mode().IsRegular() {
if manifestPath != "" {
err = errors.New("multiple marketplace package manifests found")
cleanup()
return
}
pkgType = packageType
manifestPath = candidate
}
}
if manifestPath == "" {
err = errors.New("marketplace package manifest not found")
cleanup()
return
}
pkg, err = ParsePackageJSON(manifestPath)
if err != nil || pkg == nil {
err = errors.New("invalid marketplace package manifest")
cleanup()
}View on GitHub (pinned to 251596fc0d)
Solutions
- Ensure the package contains exactly one manifest file matching its intended type
- Remove all but one manifest file from the package root before zipping
- Restructure the package so only the correct manifest is at the root level
Defensive patterns
Strategy: validation
Validate before calling
func countManifests(packagePath string) int {
manifests := []string{"plugin.json", "theme.json", "icon.json", "template.json", "widget.json"}
count := 0
for _, m := range manifests {
if info, err := os.Stat(filepath.Join(packagePath, m)); err == nil && info.Mode().IsRegular() {
count++
}
}
return count
}
// Ensure count == 1 before calling ExtractLocalPackage Prevention
- Include exactly one manifest file in the package root matching its type
- When packaging, verify only the intended manifest exists before zipping
- Use a build script that explicitly selects the manifest file
When it happens
Trigger: Uploading a local marketplace package zip that contains two or more manifest files at the package root (e.g. both plugin.json and widget.json).
Common situations: Package author accidentally included multiple manifest files; zip was created from a directory that combines assets from different package types; manual packaging that copies manifests from different templates.
Related errors
- marketplace package manifest not found
- invalid marketplace package manifest
- marketplace package manifest not found or invalid
- invalid marketplace package archive
- invalid marketplace package type
AI-assisted analysis of siyuan-note/siyuan@251596fc0d (2026-08-12).
Data as JSON: /api/errors/9ffd13dd706e04f5.
Report an issue: GitHub.