-
-
Notifications
You must be signed in to change notification settings - Fork 69.1k
[Bug]: Gateway 2026.2.26: API routes return HTML instead of JSON (routing regression) #30295
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Summary
In OpenClaw 2026.2.26, all /api/* endpoints return the SPA HTML page instead of JSON responses, breaking the browser UI and Discord integration.
Version: 2026.2.26 (also tested 2026.2.15 — works fine)
Steps to reproduce
Expected behavior
[{"sessionKey": "...", "model": "..."}]
Actual behavior
<!doctype html>
<title>OpenClaw Control</title> ...OpenClaw version
2026.2.26
Operating system
Win 11
Install method
npm
Logs, screenshots, and evidence
In browser console (F12 → Console), run this and paste the exact output:
fetch('http://127.0.0.1:18789/api/sessions', {
headers: { 'Authorization': 'Bearer YOUR_TOKEN_HERE' }
})
.then(r => r.text().then(txt => ({ status: r.status, body: txt })))
.catch(err => ({ error: err.toString() }))
.then(data => console.log(JSON.stringify(data, null, 2)))
(Replace YOUR_TOKEN_HERE with the auth token from openclaw.json — it's the gateway.auth.token value)
This will show me exactly why the fetch is failing (401, 403, 500, network error, etc.).
Joker#603 — 10:46 PM
{
"status": 200,
"body": "<!doctype html>\n<html lang="en">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1.0" />\n <title>OpenClaw Control</title>\n <meta name="color-scheme" content="dark light" />\n <link rel="icon" type="image/svg+xml" href="./favicon.svg" />\n <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />\n <link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png" />\n <script type="module" crossorigin src="./assets/index-C_C6XOMD.js"></script>\n <link rel="stylesheet" crossorigin href="./assets/index-CM7kTShz.css">\n </head>\n <body>\n <openclaw-app></openclaw-app>\n </body>\n</html>\n"
}
The API endpoint is returning HTML (the control UI page) instead of JSON.Impact and severity
Prevented me from connecting to ollama local qwen models.
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.