hermes - 💡(How to fix) Fix Dashboard infinite reload loop in loopback mode — GET /api/auth/me returns 401 on every page load [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Root Cause:

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Description:

 When running hermes dashboard --host 0.0.0.0 --port 9119 --insecure --skip-build (loopback / non-OAuth mode), the web dashboard enters an infinite full-page reload loop on every page load. The page reloads multiple times per
 second and cannot be interacted with.

 Root Cause:

 The SPA's AuthWidget component calls GET /api/auth/me on mount. In loopback mode there is no OAuth session, so request.state.session is never set. The endpoint raises HTTPException(401):

 python
 sess = getattr(request.state, "session", None)
 if sess is None:
     raise HTTPException(status_code=401, detail="Unauthorized")

 This 401 is caught by fetchJSON()'s global 401 handler in web/src/lib/api.ts, which was designed to handle stale session tokens after a server restart. Since /api/auth/me returns 401 on every request in loopback mode, the first
 API call on every page load triggers window.location.reload(), creating an infinite reload loop.

 Fix applied locally:

 1. hermes_cli/dashboard_auth/routes.py — Return null envelope (200) instead of 401 when session is None
 2. hermes_cli/web_server.py — Added /api/auth/me and /api/auth/providers to _PUBLIC_API_PATHS
 3. web/src/components/AuthWidget.tsx — Guard against null session data in loopback mode

 Expected Behavior:

 In loopback mode, the AuthWidget should either not call /api/auth/me, or the endpoint should return a non-401 response that the AuthWidget can handle gracefully (render nothing).

[

github-issue.md

](url)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING