SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
-
wrote last edited by [email protected]
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. IsENABLE_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:
log
2025-06-21 10:43:57 open-webui | 2025-06-21 00:43:57.601 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:37276 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:44:58 open-webui | 2025-06-21 00:44:58.114 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:49064 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:45:58 open-webui | 2025-06-21 00:45:58.779 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:55958 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:46:59 open-webui | 2025-06-21 00:46:59.179 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:47424 - "GET /_app/version.json HTTP/1.1" 304 - {}
UPDATE:
- when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
UPDATE 2:
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
Thank you everyone for your help
-
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. IsENABLE_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:
log
2025-06-21 10:43:57 open-webui | 2025-06-21 00:43:57.601 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:37276 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:44:58 open-webui | 2025-06-21 00:44:58.114 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:49064 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:45:58 open-webui | 2025-06-21 00:45:58.779 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:55958 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:46:59 open-webui | 2025-06-21 00:46:59.179 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:47424 - "GET /_app/version.json HTTP/1.1" 304 - {}
UPDATE:
- when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
UPDATE 2:
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
Thank you everyone for your help
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.
-
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. IsENABLE_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:
log
2025-06-21 10:43:57 open-webui | 2025-06-21 00:43:57.601 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:37276 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:44:58 open-webui | 2025-06-21 00:44:58.114 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:49064 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:45:58 open-webui | 2025-06-21 00:45:58.779 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:55958 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:46:59 open-webui | 2025-06-21 00:46:59.179 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:47424 - "GET /_app/version.json HTTP/1.1" 304 - {}
UPDATE:
- when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
UPDATE 2:
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
Thank you everyone for your help
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. -
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. IsENABLE_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:
log
2025-06-21 10:43:57 open-webui | 2025-06-21 00:43:57.601 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:37276 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:44:58 open-webui | 2025-06-21 00:44:58.114 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:49064 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:45:58 open-webui | 2025-06-21 00:45:58.779 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:55958 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:46:59 open-webui | 2025-06-21 00:46:59.179 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:47424 - "GET /_app/version.json HTTP/1.1" 304 - {}
UPDATE:
- when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
UPDATE 2:
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
Thank you everyone for your help
wrote last edited by [email protected]Add an environment block at the same level as
image:
and enable websocket. add- OLLAMA_API_BASE_URL=http://host.docker.internal:11434/api
to the environment block as well. Also make sure olama is running correctly and and the correct port
I think it's a routing problem. Webui needs access to ollama running directly on Windows, and it's not part of the docker compose network.
-
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. IsENABLE_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:
log
2025-06-21 10:43:57 open-webui | 2025-06-21 00:43:57.601 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:37276 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:44:58 open-webui | 2025-06-21 00:44:58.114 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:49064 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:45:58 open-webui | 2025-06-21 00:45:58.779 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:55958 - "GET /_app/version.json HTTP/1.1" 304 - {} 2025-06-21 10:46:59 open-webui | 2025-06-21 00:46:59.179 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.21.0.1:47424 - "GET /_app/version.json HTTP/1.1" 304 - {}
UPDATE:
- when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
UPDATE 2:
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
Thank you everyone for your help
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...
-
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...
Hi how do I check the response?
-
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...
when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
-
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.when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
-
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.
wrote last edited by [email protected]thanks I have enabled websocket but the issue still exists
when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
-
when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
fuckin weird that an extension would inject invalid JSON into an API payload. if you’re gonna make a shady plugin at least test it lol
anyway, if that’s truly the issue i’d be worried about what my extensions were doing, personally.
-
fuckin weird that an extension would inject invalid JSON into an API payload. if you’re gonna make a shady plugin at least test it lol
anyway, if that’s truly the issue i’d be worried about what my extensions were doing, personally.
all the extension I installed is from https://addons.mozilla.org/, is there a quick way to check which extension is "inject invalid JSON into an API payload" ?
-
thanks I have enabled websocket but the issue still exists
when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
Yeah, trying an incognito window without the extensions would be the best place to start then, if you want to continue to use Firefox for it.
-
Yeah, trying an incognito window without the extensions would be the best place to start then, if you want to continue to use Firefox for it.
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled. Don't now why though
-
fuckin weird that an extension would inject invalid JSON into an API payload. if you’re gonna make a shady plugin at least test it lol
anyway, if that’s truly the issue i’d be worried about what my extensions were doing, personally.
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.
The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
-
Yeah, trying an incognito window without the extensions would be the best place to start then, if you want to continue to use Firefox for it.
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.
The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
-
The problem is with this plugin https://addons.mozilla.org/en-US/firefox/addon/chameleon-ext/ Everything works fine with it disabled.
The reason my chameleon breaks openwebui is because I changed a setting in it that it blocks all websocket connection
ah that makes sense
-
when I open http://localhost:3000/ in another browser it works perfectly fine. I think the issue is about the browser I used (firefox with a lot extension installed and setting tweaked)
It could be the
accepts
header then... check if the request includesaccetps: application/json
-
Hi how do I check the response?
F12 should open the browser developer tools, one panel will be the network requests.