{"record":{"id":"51a903c71e825233","repo":"glanceapp/glance","slug":"parsing-manifest-json-v","errorCode":null,"errorMessage":"parsing manifest.json: %v","messagePattern":"parsing manifest\\.json: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/glance.go","lineNumber":226,"sourceCode":"\t\t\"image/svg+xml\",\n\t\t\"image/png\",\n\t)\n\n\tif config.Branding.AppName == \"\" {\n\t\tconfig.Branding.AppName = \"Glance\"\n\t}\n\n\tif config.Branding.AppIconURL == \"\" {\n\t\tconfig.Branding.AppIconURL = app.StaticAssetPath(\"app-icon.png\")\n\t}\n\n\tif config.Branding.AppBackgroundColor == \"\" {\n\t\tconfig.Branding.AppBackgroundColor = config.Theme.BackgroundColorAsHex\n\t}\n\n\tmanifest, err := executeTemplateToString(manifestTemplate, templateData{App: app})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parsing manifest.json: %v\", err)\n\t}\n\tapp.parsedManifest = []byte(manifest)\n\n\treturn app, nil\n}\n\nfunc (p *page) updateOutdatedWidgets() {\n\tnow := time.Now()\n\n\tvar wg sync.WaitGroup\n\tcontext := context.Background()\n\n\tfor w := range p.HeadWidgets {\n\t\twidget := p.HeadWidgets[w]\n\n\t\tif !widget.requiresUpdate(&now) {\n\t\t\tcontinue\n\t\t}","sourceCodeStart":208,"sourceCodeEnd":244,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/glance.go#L208-L244","documentation":"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.","triggerScenarios":"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).","commonSituations":"Rare; usually surfaces with unusual combinations like custom themes where BackgroundColorAsHex is empty, or fork modifications to manifestTemplate referencing fields that can be nil.","solutions":["Read the chained template error for the missing/invalid field","Try a minimal config (no branding overrides) and re-add branding fields to isolate the breaking value","If running a fork, check manifestTemplate references match the app struct's fields"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"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.","preventionTips":["Keep branding fields (app-icon-url, background colors) in documented formats","Test branding changes on a dev instance","On forks, keep manifestTemplate fields in sync with the app struct"],"tags":["branding","template","manifest","startup"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}