mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
[GH-ISSUE #11834] issue: after upgrading open-webui in docker get SyntaxError: Unexpected token 'd', "data: {"id"... is not valid JSON #16372
Reference in New Issue
Block a user
Originally created by @K1WIZ on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11834
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
v0.5.16
Ollama Version (if applicable)
0.6.1
Operating System
Ubuntu 22.04.4 LTS
Browser (if applicable)
chrome 132.0.6834.159
Confirmation
README.md.Expected Behavior
should have rendered the ollama response
Actual Behavior
When asking something on the "send a message line" I get this error:
SyntaxError: Unexpected token 'd', "data: {"id"... is not valid JSON
open-webui container logs:
2025-03-18 19:44:14.858 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {}
2025-03-18 19:44:14.977 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "POST /api/v1/chats/ea6afce7-37da-4773-8754-29430a524e6f HTTP/1.0" 200 - {}
2025-03-18 19:44:15.071 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {}
filter_functions=[]
2025-03-18 19:44:16.829 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "POST /api/chat/completions HTTP/1.0" 200 - {}
2025-03-18 19:44:23.660 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.0" 400 - {}
2025-03-18 19:44:33.061 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.0" 400 - {}
2025-03-18 19:44:34.368 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {}
2025-03-18 19:44:40.136 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.0" 400 - {}
Steps to Reproduce
na
Logs & Screenshots
2025-03-18 19:44:14.858 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {}
2025-03-18 19:44:14.977 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "POST /api/v1/chats/ea6afce7-37da-4773-8754-29430a524e6f HTTP/1.0" 200 - {}
2025-03-18 19:44:15.071 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {}
filter_functions=[]
2025-03-18 19:44:16.829 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "POST /api/chat/completions HTTP/1.0" 200 - {}
2025-03-18 19:44:23.660 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.0" 400 - {}
2025-03-18 19:44:33.061 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.0" 400 - {}
2025-03-18 19:44:34.368 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /api/v1/chats/?page=1 HTTP/1.0" 200 - {}
2025-03-18 19:44:40.136 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 64.98.124.27:0 - "GET /ws/socket.io/?EIO=4&transport=websocket HTTP/1.0" 400 - {}
Additional Information
No response
@tjbck commented on GitHub (Mar 19, 2025):
WebSocket is required.
@xiaoliwe commented on GitHub (Apr 4, 2025):
How can we solve this problem with WebSocket? Only to install the WebSocket package on the server?
@JonBCraig commented on GitHub (Apr 15, 2025):
Initially, Open WebUI was functioning correctly. It seemed to be communicating via HTTP/2 at first. However, after an "101 Switching Protocols" response and a connection being established for a period, I consistently receive a
SyntaxError: Unexpected token 'd', "data: {"id"... is not valid JSONerror, regardless of what I send. The console also displays either aconnect_error Error: timeoutor aWebSocket is closed before the connection is established.message.Strangely, if I reopen Open WebUI in a private browsing window, it works fine and uses HTTP/2 as expected. I'm using Caddy as a reverse proxy to the Open WebUI Docker container, and Cloudflare is also acting as a reverse proxy for my domain. What could be causing this?