Docker CPU version cannot chat with models added via a connection except local models - SyntaxError: Unexpected token 'd', "data: {"id"... is not valid JSON #3861

Closed
opened 2025-11-11 15:41:22 -06:00 by GiteaMirror · 7 comments
Owner

Originally created by @honourworldng on GitHub (Feb 15, 2025).


Installation Method

I followed the docker installation having ollama already installed on my macbook pro m1

Environment

  • Open WebUI Version: [e.g., v0.5.11]

  • Operating System: macOS Sequoia 15.3

  • Browser (if applicable): Chrome 133

Confirmation:

  • [x ] I have read and followed all the instructions provided in the README.md.
  • I am on 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 provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

Before I updated my docker container of openwebui using watch tower, I was able to chaat with an external model. Previously, i was using groq, now it is not longer working, I also tried to remove the connection and re-add it, but also didn't work. I have also tried open ai connection which can be seen from the screenshot but also got the same error.

Image

Reproduction Details

Steps to Reproduce:
Do a fresh installation of the docker CPU version and add a connection in admin panel settings, try using one of the external models from the connection.

Originally created by @honourworldng on GitHub (Feb 15, 2025). --- ## Installation Method I followed the docker installation having ollama already installed on my macbook pro m1 ## Environment - **Open WebUI Version:** [e.g., v0.5.11] - **Operating System:** macOS Sequoia 15.3 - **Browser (if applicable):** Chrome 133 **Confirmation:** - [x ] I have read and followed all the instructions provided in the README.md. - [x] I am on 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 provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: Before I updated my docker container of openwebui using watch tower, I was able to chaat with an external model. Previously, i was using groq, now it is not longer working, I also tried to remove the connection and re-add it, but also didn't work. I have also tried open ai connection which can be seen from the screenshot but also got the same error. <img width="1435" alt="Image" src="https://github.com/user-attachments/assets/9585edaa-0e6b-47b5-b9a7-35e3d5ac851b" /> ## Reproduction Details **Steps to Reproduce:** Do a fresh installation of the docker CPU version and add a connection in admin panel settings, try using one of the external models from the connection.
Author
Owner

@honourworldng commented on GitHub (Feb 15, 2025):

I just found out that it works on Safari browser, so something is wrong somewhere

@honourworldng commented on GitHub (Feb 15, 2025): I just found out that it works on Safari browser, so something is wrong somewhere
Author
Owner

@hh1599 commented on GitHub (Feb 15, 2025):

good catch. I just tried on my phone and it worked. No sure why the desktop browser isnt working but clearing my cache didnt help. using brave if it matters.

@hh1599 commented on GitHub (Feb 15, 2025): good catch. I just tried on my phone and it worked. No sure why the desktop browser isnt working but clearing my cache didnt help. using brave if it matters.
Author
Owner

@magnacartatron commented on GitHub (Feb 15, 2025):

For me this is happening on macOS on every device running it. I've upgraded Ollama to latest version and reinstalled open-webui on 3 macOS devices twice. Lost all my config and settings but whatever.

I'm getting the same error for any request, whether to Ollama running locally or OpenAI. It's completely broken.

On chrome at least I can log in and access it, on Safari it goes to a blank page every time.

I've installed using conda env instructions with pip. Recreated multiple new environments to test it in. Nada

I can see that the generation is happening so it connects just fine to Ollama.

E.g. here's the data for a response sent via web sockets.

data: {"id": "llama3.1:8b-instruct-q8_0-e1241e04-1252-40a9-8b95-fa48e2bdb15c", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "I"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-d3803aee-25d3-481d-be5b-2d3a639875ec", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "'m"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-6ecaec29-59e9-498d-a74a-c35abd9ef6c0", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " ready"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-ebcea43b-95ce-434f-902b-26d6c53b5109", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " when"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-bbd75dd0-eda9-4a54-92ea-bed5fd1d1865", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " you"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-bfa6a013-52d7-47c5-bcb6-04888638e63f", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " are"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-a251b20d-cb20-4369-bab6-2949f8ca8956", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "."}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-02e132ca-8769-4952-a4c3-95c878314809", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " What"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-dd393e4e-1f8d-468f-8266-81342bedf89a", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " kind"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-f49c8482-228f-4b50-86a4-fceda355b297", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " of"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-302f960c-fe15-4f5e-806f-b0f3e108e998", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " short"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-b7057cc8-a410-4219-ae70-2502312ca47f", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " Python"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-ad00773b-0bec-452e-a17d-362e5e75ac05", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " program"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-efe69fcc-396a-4d1c-b696-7dc0e6a1a587", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " would"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-2d04f162-7abc-46e7-b27a-d5304660b533", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " you"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-1c1a5bdc-c57d-4f7c-a25e-be27f2b2fd87", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " like"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-a0adb204-b2dd-47d0-910c-044e37f39e05", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " me"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-009095a6-4617-4512-90d9-7de32ac16445", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " to"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-cad696fa-2f08-4791-a862-eeec3bb86400", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " help"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-c46ce307-c7e1-4047-8eaf-1564db5fd1bd", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " with"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-2b0aaca8-de2c-4f4b-86c1-61182a9680a5", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "?"}}], "object": "chat.completion.chunk"}

data: {"id": "llama3.1:8b-instruct-q8_0-0643d220-fd5c-4152-9941-337daa451023", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": "stop", "delta": {}}], "object": "chat.completion.chunk", "usage": {"response_token/s": 33.33, "prompt_token/s": 1747.97, "total_duration": 939482291, "load_duration": 31364916, "prompt_eval_count": 430, "prompt_eval_duration": 246000000, "eval_count": 22, "eval_duration": 660000000, "approximate_total": "0h0m0s"}}

data: [DONE]

But the error is always
SyntaxError: Unexpected token 'd', "data: {"id"... is not valid JSON

@magnacartatron commented on GitHub (Feb 15, 2025): For me this is happening on macOS on every device running it. I've upgraded Ollama to latest version and reinstalled open-webui on 3 macOS devices twice. Lost all my config and settings but whatever. I'm getting the same error for any request, whether to Ollama running locally or OpenAI. It's completely broken. On chrome at least I can log in and access it, on Safari it goes to a blank page every time. I've installed using conda env instructions with pip. Recreated multiple new environments to test it in. Nada I can see that the generation is happening so it connects just fine to Ollama. E.g. here's the data for a response sent via web sockets. ``` data: {"id": "llama3.1:8b-instruct-q8_0-e1241e04-1252-40a9-8b95-fa48e2bdb15c", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "I"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-d3803aee-25d3-481d-be5b-2d3a639875ec", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "'m"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-6ecaec29-59e9-498d-a74a-c35abd9ef6c0", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " ready"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-ebcea43b-95ce-434f-902b-26d6c53b5109", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " when"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-bbd75dd0-eda9-4a54-92ea-bed5fd1d1865", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " you"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-bfa6a013-52d7-47c5-bcb6-04888638e63f", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " are"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-a251b20d-cb20-4369-bab6-2949f8ca8956", "created": 1739633767, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "."}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-02e132ca-8769-4952-a4c3-95c878314809", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " What"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-dd393e4e-1f8d-468f-8266-81342bedf89a", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " kind"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-f49c8482-228f-4b50-86a4-fceda355b297", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " of"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-302f960c-fe15-4f5e-806f-b0f3e108e998", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " short"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-b7057cc8-a410-4219-ae70-2502312ca47f", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " Python"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-ad00773b-0bec-452e-a17d-362e5e75ac05", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " program"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-efe69fcc-396a-4d1c-b696-7dc0e6a1a587", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " would"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-2d04f162-7abc-46e7-b27a-d5304660b533", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " you"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-1c1a5bdc-c57d-4f7c-a25e-be27f2b2fd87", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " like"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-a0adb204-b2dd-47d0-910c-044e37f39e05", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " me"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-009095a6-4617-4512-90d9-7de32ac16445", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " to"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-cad696fa-2f08-4791-a862-eeec3bb86400", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " help"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-c46ce307-c7e1-4047-8eaf-1564db5fd1bd", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": " with"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-2b0aaca8-de2c-4f4b-86c1-61182a9680a5", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": null, "delta": {"content": "?"}}], "object": "chat.completion.chunk"} data: {"id": "llama3.1:8b-instruct-q8_0-0643d220-fd5c-4152-9941-337daa451023", "created": 1739633768, "model": "llama3.1:8b-instruct-q8_0", "choices": [{"index": 0, "logprobs": null, "finish_reason": "stop", "delta": {}}], "object": "chat.completion.chunk", "usage": {"response_token/s": 33.33, "prompt_token/s": 1747.97, "total_duration": 939482291, "load_duration": 31364916, "prompt_eval_count": 430, "prompt_eval_duration": 246000000, "eval_count": 22, "eval_duration": 660000000, "approximate_total": "0h0m0s"}} data: [DONE] ``` But the error is always `SyntaxError: Unexpected token 'd', "data: {"id"... is not valid JSON`
Author
Owner

@honourworldng commented on GitHub (Feb 15, 2025):

I just tried to delete chrome completely, restarted the system and installed google chrome again afresh, it worked as expected with no issues

@honourworldng commented on GitHub (Feb 15, 2025): I just tried to delete chrome completely, restarted the system and installed google chrome again afresh, it worked as expected with no issues
Author
Owner

@tjbck commented on GitHub (Feb 16, 2025):

WebSocket/Browser Cache issue.

Related: https://github.com/open-webui/open-webui/issues/8074

@tjbck commented on GitHub (Feb 16, 2025): WebSocket/Browser Cache issue. Related: https://github.com/open-webui/open-webui/issues/8074
Author
Owner

@magnacartatron commented on GitHub (Feb 16, 2025):

WebSocket/Browser Cache issue.

This doesn't seem to be the issue at all. I've done a fresh install on a brand new machine and I'm getting the same error on macOS. The installation I've used is using conda and pip instructions from your website. The issue persists with the latest version of every browser, Safari, Chrome, Firefox.

@magnacartatron commented on GitHub (Feb 16, 2025): > WebSocket/Browser Cache issue. This doesn't seem to be the issue at all. I've done a fresh install on a brand new machine and I'm getting the same error on macOS. The installation I've used is using conda and pip instructions from your website. The issue persists with the latest version of every browser, Safari, Chrome, Firefox.
Author
Owner

@voznik commented on GitHub (Feb 23, 2025):

https://github.com/open-webui/open-webui/issues/9635#issuecomment-2677010167

I have this issue without any proxy, on local Linux machine, running openwebui with docker & local ollama service, with --host mode and with "Manage Ollama API Connections" setting set to http://127.0.0.1:11434/
I don't understand how "proxy" answer could be applicable

@voznik commented on GitHub (Feb 23, 2025): https://github.com/open-webui/open-webui/issues/9635#issuecomment-2677010167 > I have this issue without any proxy, on local Linux machine, running openwebui with docker & local ollama service, with --host mode and with "Manage Ollama API Connections" setting set to http://127.0.0.1:11434/ I don't understand how "proxy" answer could be applicable
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#3861