[GH-ISSUE #499] Ollama crashes on conversation start #290

Closed
opened 2026-02-22 18:18:47 -05:00 by yindo · 6 comments
Owner

Originally created by @ThatOneCalculator on GitHub (Dec 28, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/499

Only occurs on anything-llm, other frontends don't have this issue. Ollama built from source running on host, https://github.com/jmorganca/ollama/commit/2a2fa3c3298194f4f3790aade78df2f53d170d8e

Screenshot:

image

From the Podman container:

[TELEMETRY SENT] {
  event: 'server_boot',
  distinctId: 'ad98c37a-8a86-4625-bc10-a76a89ba3024',
  properties: { commit: '--' }
}
Primary server listening on port 3001
/app/server/utils/chats/stream.js:240
        fullText += chunk.message.content;
                                  ^

TypeError: Cannot read properties of undefined (reading 'content')
    at /app/server/utils/chats/stream.js:240:35
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Originally posted by @ThatOneCalculator in https://github.com/Mintplex-Labs/anything-llm/issues/495#issuecomment-1871476091

Originally created by @ThatOneCalculator on GitHub (Dec 28, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/499 Only occurs on `anything-llm`, other frontends don't have this issue. Ollama built from source running on host, https://github.com/jmorganca/ollama/commit/2a2fa3c3298194f4f3790aade78df2f53d170d8e Screenshot: ![image](https://github.com/Mintplex-Labs/anything-llm/assets/44733677/eccce662-2f69-4e35-9505-eb06a7bf60e5) From the Podman container: ``` [TELEMETRY SENT] { event: 'server_boot', distinctId: 'ad98c37a-8a86-4625-bc10-a76a89ba3024', properties: { commit: '--' } } Primary server listening on port 3001 /app/server/utils/chats/stream.js:240 fullText += chunk.message.content; ^ TypeError: Cannot read properties of undefined (reading 'content') at /app/server/utils/chats/stream.js:240:35 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ``` _Originally posted by @ThatOneCalculator in https://github.com/Mintplex-Labs/anything-llm/issues/495#issuecomment-1871476091_
yindo closed this issue 2026-02-22 18:18:47 -05:00
Author
Owner

@timothycarambat commented on GitHub (Dec 28, 2023):

Closing for now. Will reopen if #500 did not fix this issue.

Re-pull latest tag from docker and try running an inference again to see if issue persists. If it does will reopen this.

@timothycarambat commented on GitHub (Dec 28, 2023): Closing for now. Will reopen if #500 did not fix this issue. Re-pull latest tag from docker and try running an inference again to see if issue persists. If it does will reopen this.
Author
Owner

@oizucrem commented on GitHub (Jan 4, 2024):

Hi, I'm still having the same issue even if I had pulled and run the docker today for the first time. That is the log from docker :


Caching vectorized results of custom-documents/text.txt-ef38dd64-78e3-422f-8018-ecbe68e6e4cd.json to prevent duplicated embedding.
[TELEMETRY SENT] {
  event: 'documents_embedded_in_workspace',
  distinctId: '2e105bd8-26a0-4976-a6cb-7346ce032ff2',
  properties: {
    LLMSelection: 'ollama',
    Embedder: 'native',
    VectorDbSelection: 'lancedb'
  }
}
/app/server/utils/chats/stream.js:241
        const content = chunk.hasOwnProperty("content") ? chunk.content : chunk;
                              ^

TypeError: Cannot read properties of undefined (reading 'hasOwnProperty')
    at fullText (/app/server/utils/chats/stream.js:241:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v18.19.0

@oizucrem commented on GitHub (Jan 4, 2024): Hi, I'm still having the same issue even if I had pulled and run the docker today for the first time. That is the log from docker : ``` Caching vectorized results of custom-documents/text.txt-ef38dd64-78e3-422f-8018-ecbe68e6e4cd.json to prevent duplicated embedding. [TELEMETRY SENT] { event: 'documents_embedded_in_workspace', distinctId: '2e105bd8-26a0-4976-a6cb-7346ce032ff2', properties: { LLMSelection: 'ollama', Embedder: 'native', VectorDbSelection: 'lancedb' } } /app/server/utils/chats/stream.js:241 const content = chunk.hasOwnProperty("content") ? chunk.content : chunk; ^ TypeError: Cannot read properties of undefined (reading 'hasOwnProperty') at fullText (/app/server/utils/chats/stream.js:241:31) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Node.js v18.19.0 ```
Author
Owner

@timothycarambat commented on GitHub (Jan 4, 2024):

What model are you using?

@timothycarambat commented on GitHub (Jan 4, 2024): What model are you using?
Author
Owner

@oizucrem commented on GitHub (Jan 4, 2024):

I'm using this one: TheBloke/Llama-2-13B-chat-GGUF/llama-2-13b-chat.Q5_K_S.gguf

@oizucrem commented on GitHub (Jan 4, 2024): I'm using this one: TheBloke/Llama-2-13B-chat-GGUF/llama-2-13b-chat.Q5_K_S.gguf
Author
Owner

@oizucrem commented on GitHub (Jan 4, 2024):

Thanks for the support, the problem was mine: the model was filling all the gpu vram, this causes both ollama and anythingllm to crash. I solved by reducing the layers offloaded to the gpu, sorry for bother you.

@oizucrem commented on GitHub (Jan 4, 2024): Thanks for the support, the problem was mine: the model was filling all the gpu vram, this causes both ollama and anythingllm to crash. I solved by reducing the layers offloaded to the gpu, sorry for bother you.
Author
Owner

@timothycarambat commented on GitHub (Jan 4, 2024):

@oizucrem Not a bother at all! We should handle an error like this. Simple path to check to make sure the content chunk is valid.

Will make new issue to handle that.

@timothycarambat commented on GitHub (Jan 4, 2024): @oizucrem Not a bother at all! We should handle an error like this. Simple path to check to make sure the content chunk is valid. Will make new issue to handle that.
yindo changed title from Ollama crashes on conversation start to [GH-ISSUE #499] Ollama crashes on conversation start 2026-06-05 14:34:31 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#290