{"record":{"id":"4bb5bcaa5c42f868","repo":"glanceapp/glance","slug":"assets-directory-does-not-exist-s","errorCode":null,"errorMessage":"assets directory does not exist: %s","messagePattern":"assets directory does not exist: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/config.go","lineNumber":482,"sourceCode":"\n\t\tif len(username) < 3 {\n\t\t\treturn errors.New(\"usernames must be at least 3 characters\")\n\t\t}\n\n\t\tuser := config.Auth.Users[username]\n\n\t\tif user.Password == \"\" {\n\t\t\tif user.PasswordHashString == \"\" {\n\t\t\t\treturn fmt.Errorf(\"user %s must have a password or a password-hash set\", username)\n\t\t\t}\n\t\t} else if len(user.Password) < 6 {\n\t\t\treturn fmt.Errorf(\"the password for %s must be at least 6 characters\", username)\n\t\t}\n\t}\n\n\tif config.Server.AssetsPath != \"\" {\n\t\tif _, err := os.Stat(config.Server.AssetsPath); os.IsNotExist(err) {\n\t\t\treturn fmt.Errorf(\"assets directory does not exist: %s\", config.Server.AssetsPath)\n\t\t}\n\t}\n\n\tfor i := range config.Pages {\n\t\tpage := &config.Pages[i]\n\n\t\tif page.Title == \"\" {\n\t\t\treturn fmt.Errorf(\"page %d has no name\", i+1)\n\t\t}\n\n\t\tif page.Width != \"\" && (page.Width != \"wide\" && page.Width != \"slim\" && page.Width != \"default\") {\n\t\t\treturn fmt.Errorf(\"page %d: width can only be either wide or slim\", i+1)\n\t\t}\n\n\t\tif page.DesktopNavigationWidth != \"\" {\n\t\t\tif page.DesktopNavigationWidth != \"wide\" && page.DesktopNavigationWidth != \"slim\" && page.DesktopNavigationWidth != \"default\" {\n\t\t\t\treturn fmt.Errorf(\"page %d: desktop-navigation-width can only be either wide or slim\", i+1)\n\t\t\t}","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/config.go#L464-L500","documentation":"server.assets-path points to a directory that does not exist on disk (checked with os.Stat / IsNotExist). The assets path is where custom CSS/images/logo live, and glance refuses to start with a configured-but-missing directory.","triggerScenarios":"Setting assets-path in the server block to a path that is absent, misspelled, or not mounted. Note only IsNotExist triggers this — permission errors on the directory pass this check.","commonSituations":"Docker deployments where the host assets folder isn't volume-mounted at the path the container expects; relative path resolved from a different working directory; directory created after config written but server started before; typo in the path.","solutions":["Create the directory (mkdir -p) if it is genuinely missing","Fix the path spelling / make it absolute to avoid cwd ambiguity","In containers, verify the volume mount maps the assets dir to the configured in-container path"],"exampleFix":"# before\nserver:\n  assets-path: /config/assets   # not mounted\n# after (docker-compose)\n# volumes:\n#   - ./assets:/config/assets\nserver:\n  assets-path: /config/assets","handlingStrategy":"validation","validationCode":"if cfg.Server.AssetsPath != \"\" {\n    if _, err := os.Stat(cfg.Server.AssetsPath); errors.Is(err, fs.ErrNotExist) {\n        return fmt.Errorf(\"create %s before starting\", cfg.Server.AssetsPath)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["mkdir -p the assets directory in your deploy script","Use absolute paths matching the container mount point"],"tags":["glance","filesystem","docker","configuration"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}