I started a webui container and then I started to get this error in OpenWebUI interface.
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
- latest Ollama on windows
- latest Open WebUI in docker desktop
according to a post online, I should set ENABLE_WEBSOCKET_SUPPORT=True
in my docker compose, but I’m not using reverse proxy. Is ENABLE_WEBSOCKET_SUPPORT=True
necessary?
What could a possible solution be for this?
My docker compose
services:
open-webui:
image: ghcr.io/open-webui/open-webui:cuda
container_name: open-webui
restart: unless-stopped
ports:
- "3000:8080"
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./data:/app/backend/data
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
open-webui:
In my experience that is almost always the server returning an html error page.
Start with inspecting that actual response the first character is probably
<
. The rest of it is likely to be a “not found” or “internal server error” (being the most common) page.Then look at logs…
i would start by seeing what the actually API response is. i haven’t used OpenWebUI, but to me this looks like some kind of error response from the server. you could use an API tester like Bruno. also check your Ollama logs to see if it’s getting the request and any other output there.
Even when you’re not using a reverse proxy, you’re still going to be streaming to that socket.
So I woild recomend that flag still and retest, because the only time I personally have seen that error is when the socket was closed to streaming and it fails to get returned data.
deleted by creator