mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[GH-ISSUE #16136] issue: Intermittent "Unexpected token 'd'" error when streaming responses (v0.6.15) #17791
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dalaoyang on GitHub (Jul 30, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16136
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.6.15
Ollama Version (if applicable)
No response
Operating System
CentOS Linux 8
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
Streaming responses should be handled gracefully and rendered progressively in the chat UI. The frontend should not crash when receiving malformed, partial, or incomplete
data:lines from the SSE stream. Instead, such chunks should be ignored or logged, allowing the session to continue without interruption.Actual Behavior
Intermittently, the UI throws a
SyntaxError: Unexpected token 'd'when parsing streamed SSE responses. This breaks message rendering and requires a page refresh. The issue does not happen consistently.Steps to Reproduce
stream: true):Note: The error appears to be caused by a malformed or partially received SSE
data:chunk being passed toJSON.parse().Logs & Screenshots
This error appears intermittently during chat message streaming. It seems to occur when the frontend attempts to parse a
data:line from the SSE stream as raw JSON.Additional Information
No response
@tjbck commented on GitHub (Jul 30, 2025):
Unable to reproduce, please check your websocket config.