{"record":{"id":"e4b4549d16c07f35","repo":"glanceapp/glance","slug":"missing-timezone-value","errorCode":null,"errorMessage":"missing timezone value","messagePattern":"missing timezone value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/glance/widget-clock.go","lineNumber":33,"sourceCode":"\tHourFormat string        `yaml:\"hour-format\"`\n\tTimezones  []struct {\n\t\tTimezone string `yaml:\"timezone\"`\n\t\tLabel    string `yaml:\"label\"`\n\t} `yaml:\"timezones\"`\n}\n\nfunc (widget *clockWidget) initialize() error {\n\twidget.withTitle(\"Clock\").withError(nil)\n\n\tif widget.HourFormat == \"\" {\n\t\twidget.HourFormat = \"24h\"\n\t} else if widget.HourFormat != \"12h\" && widget.HourFormat != \"24h\" {\n\t\treturn errors.New(\"hour-format must be either 12h or 24h\")\n\t}\n\n\tfor t := range widget.Timezones {\n\t\tif widget.Timezones[t].Timezone == \"\" {\n\t\t\treturn errors.New(\"missing timezone value\")\n\t\t}\n\n\t\tif _, err := time.LoadLocation(widget.Timezones[t].Timezone); err != nil {\n\t\t\treturn fmt.Errorf(\"invalid timezone '%s': %v\", widget.Timezones[t].Timezone, err)\n\t\t}\n\t}\n\n\twidget.cachedHTML = widget.renderTemplate(widget, clockWidgetTemplate)\n\n\treturn nil\n}\n\nfunc (widget *clockWidget) Render() template.HTML {\n\treturn widget.cachedHTML\n}\n","sourceCodeStart":15,"sourceCodeEnd":49,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/widget-clock.go#L15-L49","documentation":"For every mountpoint surfaced by disk.Partitions() plus any explicitly configured ones, Glance calls disk.Usage() and wraps failures as 'getting filesystem usage for %s: %v'. The mountpoint is simply omitted from info.Mountpoints on failure.","triggerScenarios":"disk.Usage(requestedPath) fails: the mountpoint no longer exists (unmounted USB/NFS), a stale/dangling entry in /proc/self/mounts (common with bind mounts in containers), permission denied on the mount root, or statfs failing on network storage that has gone away.","commonSituations":"Auto-discovered partitions (disk.Partitions(false) lists physical mounts) including an unreachable NFS/SMB share; containers where the host's /proc/mounts references paths not present in the container namespace; recently removed removable media.","solutions":["Identify the failing path from the error message and check on the host: df <path> / mount | grep <path>","If the mount is stale (e.g. dead NFS), unmount it properly: sudo umount -l /stale/mount","Hide the problem mount in widget config: mountpoints: { \"/stale/mount\": { hide: true } } or set hide-mountpoints-by-default and whitelist","For containers, filter host mounts so only paths present in the container are requested"],"exampleFix":"// before (glance.yml)\n- type: system\n  # auto-discovers all partitions including dead NFS /mnt/nas\n// after: hide the unreachable mount\n- type: system\n  mountpoints:\n    /mnt/nas:\n      hide: true","handlingStrategy":"validation","validationCode":"if usage, err := disk.Usage(path); err != nil {\n    log.Printf(\"skipping mount %s: %v\", path, err)\n    continue // omit this mountpoint, keep others\n} else {\n    _ = usage\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Hide stale/unreachable mounts via mountpoints: { path: { hide: true } }","Lazy-unmount dead NFS shares (umount -l) so /proc/mounts stops listing them","In containers, only request mountpoints that exist in the container namespace"],"tags":["go","gopsutil","disk","mounts","containers"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}