# Troubleshooting Guide This guide covers common issues encountered when using the Headlamp Polaris Plugin and their solutions. ## Table of Contents - [Plugin Not Showing in Sidebar](#plugin-not-showing-in-sidebar) - [403 Forbidden Error](#403-forbidden-error) - [404 Not Found Error](#404-not-found-error) - [Plugin Settings Page Empty](#plugin-settings-page-empty) - [Dark Mode Issues](#dark-mode-issues) - [Data Not Loading / Infinite Spinner](#data-not-loading--infinite-spinner) - [Browser Console Errors](#browser-console-errors) - [Network and RBAC Debugging](#network-and-rbac-debugging) - [Plugin Installation Issues](#plugin-installation-issues) - [ArtifactHub Sync Delays](#artifacthub-sync-delays) --- ## Plugin Not Showing in Sidebar ### Symptoms - Plugin appears in Settings → Plugins but sidebar entry is missing - No "Polaris" section in navigation - Routes like `/polaris` return 404 or blank page ### Common Causes **1. Plugin Not Installed** **Check plugin installation**: ```bash # View Headlamp pod logs (plugin sidecar) kubectl logs -n kube-system deployment/headlamp -c headlamp-plugin # Expected output: # Installing plugin from https://github.com/.../headlamp-polaris-plugin-X.Y.Z.tar.gz # Plugin installed successfully ``` **Verify plugin files exist**: ```bash kubectl exec -n kube-system deployment/headlamp -c headlamp -- ls -la /headlamp/plugins/ # Should show: headlamp-polaris-plugin/ ``` **2. JavaScript Cached by Browser** After upgrading the plugin, old JavaScript may be cached. **Solution**: - Hard refresh: Cmd+Shift+R (macOS) or Ctrl+Shift+R (Linux/Windows) - Clear browser cache for Headlamp domain - Open DevTools → Application → Clear Storage → Clear all **3. Plugin Disabled in Settings** **Check Settings → Plugins**: - Navigate to Headlamp Settings → Plugins - Ensure "Polaris" plugin is enabled (toggle should be ON) - If disabled, enable it and refresh the page --- ## 403 Forbidden Error ### Symptoms - Error message: "Error loading Polaris audit data: 403 Forbidden" - Browser console shows 403 response from API proxy - Plugin sidebar shows but data fails to load ### Root Cause User or service account lacks `services/proxy` permission on `polaris-dashboard` service in the `polaris` namespace. ### Solution **1. Verify RBAC Configuration** Check if Role exists: ```bash kubectl get role polaris-proxy-reader -n polaris -o yaml ``` Expected output: ```yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: polaris-proxy-reader namespace: polaris rules: - apiGroups: [''] resources: ['services/proxy'] resourceNames: ['polaris-dashboard'] verbs: ['get'] ``` **2. Verify RoleBinding** For service account mode: ```bash kubectl get rolebinding headlamp-polaris-proxy -n polaris -o yaml ``` Expected subjects: ```yaml subjects: - kind: ServiceAccount name: headlamp namespace: kube-system ``` For OIDC mode: ```bash kubectl get rolebinding -n polaris -o yaml | grep -A 5 polaris-proxy-reader ``` Ensure your user or group is bound to the `polaris-proxy-reader` role. **3. Create Missing RBAC** If RBAC is missing, apply the minimal configuration: ```bash kubectl apply -f - <