{"record":{"id":"31f123641f843b3a","repo":"oauth2-proxy/oauth2-proxy","slug":"error-loading-logo-v","errorCode":null,"errorMessage":"error loading logo: %v","messagePattern":"error loading logo: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/pagewriter/pagewriter.go","lineNumber":71,"sourceCode":"\tSignInMessage string\n\n\t// CustomLogo is the path or URL to a logo to be displayed on the sign in page.\n\t// The logo can be either PNG, JPG/JPEG or SVG.\n\t// If a URL is used, image support depends on the browser.\n\tCustomLogo string\n}\n\n// NewWriter constructs a Writer from the options given to allow\n// rendering of sign-in and error pages.\nfunc NewWriter(opts Opts) (Writer, error) {\n\ttemplates, err := loadTemplates(opts.TemplatesPath)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error loading templates: %v\", err)\n\t}\n\n\tlogoData, err := loadCustomLogo(opts.CustomLogo)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error loading logo: %v\", err)\n\t}\n\n\terrorPage := &errorPageWriter{\n\t\ttemplate:    templates.Lookup(\"error.html\"),\n\t\tproxyPrefix: opts.ProxyPrefix,\n\t\tfooter:      opts.Footer,\n\t\tversion:     opts.Version,\n\t\tdebug:       opts.Debug,\n\t}\n\n\tsignInPage := &signInPageWriter{\n\t\ttemplate:         templates.Lookup(\"sign_in.html\"),\n\t\terrorPageWriter:  errorPage,\n\t\tproxyPrefix:      opts.ProxyPrefix,\n\t\tproviderName:     opts.ProviderName,\n\t\tsignInMessage:    opts.SignInMessage,\n\t\tfooter:           opts.Footer,\n\t\tversion:          opts.Version,","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/oauth2-proxy/oauth2-proxy/blob/33c2eb92dea78204f7a18bc2dfdbccc220f39257/pkg/app/pagewriter/pagewriter.go#L53-L89","documentation":"Wrap error in pagewriter.NewWriter: loadCustomLogo failed to read or decode the configured custom logo (path or URL). The logo must be a PNG, JPG/JPEG or SVG; the error means the asset was unreadable or its format unsupported.","triggerScenarios":"Thrown at pkg/app/pagewriter/pagewriter.go:71 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the custom-logo path/URL is reachable and readable","Convert the image to PNG, JPG or SVG","Check file permissions and that URL fetches are not blocked by network policy"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"33c2eb92dea78204f7a18bc2dfdbccc220f39257","analyzedAt":"2026-09-06T08:51:53.077Z","contentChangedAt":"2026-09-06T08:51:53.077Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}