GopeedLab/gopeed · error

extension version is required

Error message

extension version is required

What it means

Extension.validate() requires a non-empty version in manifest.json, checked last (after name and title). The version drives UpgradeCheckExtension/UpgradeExtension comparisons (tempExt.Version != ext.Version), so an empty version would make upgrade detection meaningless and is rejected at install time.

Source

Thrown at pkg/download/extension.go:444

	Disabled bool `json:"disabled"`

	DevMode bool `json:"devMode"`
	// DevPath is the local path of extension source code
	DevPath string `json:"devPath"`

	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

func (e *Extension) validate() error {
	if e.Name == "" {
		return fmt.Errorf("extension name is required")
	}
	if e.Title == "" {
		return fmt.Errorf("extension title is required")
	}
	if e.Version == "" {
		return fmt.Errorf("extension version is required")
	}
	return nil
}

func (e *Extension) buildIdentity() string {
	if e.Author == "" {
		return e.Name
	}
	return e.Author + "@" + e.Name
}

func (e *Extension) buildInstallUrl() string {
	if e.Repository == nil || e.Repository.Url == "" {
		return ""
	}
	repoUrl := e.Repository.Url
	if e.Repository.Directory != "" {
		if strings.HasSuffix(repoUrl, "/") {

View on GitHub (pinned to 7b7327ffb3)

Solutions

  1. Add a semver-compatible "version" (e.g. "1.0.0") to manifest.json
  2. If the manifest is generated, make the pipeline fail when the version variable is empty
  3. Bump the version on every published change so upgrade checks detect it

Example fix

// before (manifest.json)
{ "name": "my-extension", "title": "My Extension" }
// after
{ "name": "my-extension", "title": "My Extension", "version": "1.0.0" }
Defensive patterns

Strategy: validation

Validate before calling

// Go: pre-validate manifest version (needed for upgrade checks)
var m map[string]any
_ = json.Unmarshal(raw, &m)
if s, _ := m["version"].(string); strings.TrimSpace(s) == "" {
    return fmt.Errorf("manifest.json: 'version' is required (e.g. 1.0.0)")
}

Prevention

When it happens

Trigger: manifest.json missing the "version" key or with "version": ""; a semver-like key misspelled ("ver", "v"); version nested inside a metadata object that the flat Extension struct does not read.

Common situations: First publish of an extension where the author filled identity fields but not version; templates using a placeholder token that was substituted to empty; CI-generated manifests with an unset version variable.

Related errors


AI-assisted analysis of GopeedLab/gopeed@7b7327ffb3 (2026-08-16). Data as JSON: /api/errors/9c0ac7063d158e79. Report an issue: GitHub.