glanceapp/glance · error

parsing manifest.json: %v

Error message

parsing manifest.json: %v

What it means

Returned at the very end of newApplication when rendering the PWA manifest.json via the manifestTemplate fails. The template executes against the app struct (branding, theme, asset paths); failure means a template execution error such as a nil pointer in branding/theme data or an invalid value interpolated into JSON.

Source

Thrown at internal/glance/glance.go:226

		"image/svg+xml",
		"image/png",
	)

	if config.Branding.AppName == "" {
		config.Branding.AppName = "Glance"
	}

	if config.Branding.AppIconURL == "" {
		config.Branding.AppIconURL = app.StaticAssetPath("app-icon.png")
	}

	if config.Branding.AppBackgroundColor == "" {
		config.Branding.AppBackgroundColor = config.Theme.BackgroundColorAsHex
	}

	manifest, err := executeTemplateToString(manifestTemplate, templateData{App: app})
	if err != nil {
		return nil, fmt.Errorf("parsing manifest.json: %v", err)
	}
	app.parsedManifest = []byte(manifest)

	return app, nil
}

func (p *page) updateOutdatedWidgets() {
	now := time.Now()

	var wg sync.WaitGroup
	context := context.Background()

	for w := range p.HeadWidgets {
		widget := p.HeadWidgets[w]

		if !widget.requiresUpdate(&now) {
			continue
		}

View on GitHub (pinned to 91324e8de7)

Solutions

  1. Read the chained template error for the missing/invalid field
  2. Try a minimal config (no branding overrides) and re-add branding fields to isolate the breaking value
  3. If running a fork, check manifestTemplate references match the app struct's fields
Defensive patterns

Strategy: try-catch

Try / catch

Wrap newApplication(); on 'parsing manifest.json' log the chained template error and the branding/theme config that was active, then exit. Retrying with identical config is pointless.

Prevention

When it happens

Trigger: executeTemplateToString(manifestTemplate, templateData{App: app}) erroring — typically because config.Branding or config.Theme fields are in a state the template doesn't expect (nil theme-color value, malformed branding values after unusual configs).

Common situations: Rare; usually surfaces with unusual combinations like custom themes where BackgroundColorAsHex is empty, or fork modifications to manifestTemplate referencing fields that can be nil.

Related errors


AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15). Data as JSON: /api/errors/51a903c71e825233. Report an issue: GitHub.