[GH-ISSUE #11834] issue: after upgrading open-webui in docker get SyntaxError: Unexpected token 'd', "data: {"id"... is not valid JSON #31901

Closed
opened 2026-04-25 05:47:26 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @K1WIZ on GitHub (Mar 18, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/11834

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

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

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

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

Originally created by @K1WIZ on GitHub (Mar 18, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/11834 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### 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 - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### 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_
GiteaMirror added the bug label 2026-04-25 05:47:26 -05:00
Author
Owner

@tjbck commented on GitHub (Mar 19, 2025):

WebSocket is required.

<!-- gh-comment-id:2735166860 --> @tjbck commented on GitHub (Mar 19, 2025): WebSocket is required.
Author
Owner

@xiaoliwe commented on GitHub (Apr 4, 2025):

WebSocket is required.

How can we solve this problem with WebSocket? Only to install the WebSocket package on the server?

<!-- gh-comment-id:2777506320 --> @xiaoliwe commented on GitHub (Apr 4, 2025): > WebSocket is required. How can we solve this problem with WebSocket? Only to install the WebSocket package on the server?
Author
Owner

@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 JSON error, regardless of what I send. The console also displays either a connect_error Error: timeout or a WebSocket 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?

<!-- gh-comment-id:2803615321 --> @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 JSON` error, regardless of what I send. The console also displays either a `connect_error Error: timeout` or a `WebSocket 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?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#31901