[GH-ISSUE #1736] [BUG]: Cannot read properties of undefined (reading '0') #1132

Closed
opened 2026-02-22 18:23:17 -05:00 by yindo · 11 comments
Owner

Originally created by @Marcus1Pierce on GitHub (Jun 20, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1736

How are you running AnythingLLM?

Docker (local)

What happened?

When i select Embedding Preference to ollama, i have this error when try to generate text.

[OllamaEmbedder] Embedding 1 chunks of text with nomic-embed-text:latest.
TypeError: Cannot read properties of undefined (reading '0')
at Object.similarityResponse (/app/server/utils/vectorDbProviders/chroma/index.js:132:17)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Object.performSimilaritySearch (/app/server/utils/vectorDbProviders/chroma/index.js:359:47)
at async streamChatWithWorkspace (/app/server/utils/chats/stream.js:145:9)
at async /app/server/endpoints/chat.js:86:9

This is on webui
image

Are there known steps to reproduce?

  • Go to settings > Embedding Preference > Select Ollama provider
  • Ask anything on the webui
  • Error show
    image
Originally created by @Marcus1Pierce on GitHub (Jun 20, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1736 ### How are you running AnythingLLM? Docker (local) ### What happened? When i select Embedding Preference to ollama, i have this error when try to generate text. [OllamaEmbedder] Embedding 1 chunks of text with nomic-embed-text:latest. TypeError: Cannot read properties of undefined (reading '0') at Object.similarityResponse (/app/server/utils/vectorDbProviders/chroma/index.js:132:17) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Object.performSimilaritySearch (/app/server/utils/vectorDbProviders/chroma/index.js:359:47) at async streamChatWithWorkspace (/app/server/utils/chats/stream.js:145:9) at async /app/server/endpoints/chat.js:86:9 This is on webui ![image](https://github.com/Mintplex-Labs/anything-llm/assets/72237814/5fa19edb-44e3-4056-81f0-b1e0ec4e7d2a) ### Are there known steps to reproduce? - Go to settings > Embedding Preference > Select Ollama provider - Ask anything on the webui - Error show ![image](https://github.com/Mintplex-Labs/anything-llm/assets/72237814/88473c43-2c0f-433f-96d8-ce35c57144f1)
yindo added the needs info / can't replicate label 2026-02-22 18:23:17 -05:00
yindo closed this issue 2026-02-22 18:23:17 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jun 20, 2024):

What version of Chroma are you using?

@timothycarambat commented on GitHub (Jun 20, 2024): What version of Chroma are you using?
Author
Owner

@Marcus1Pierce commented on GitHub (Jun 21, 2024):

What version of Chroma are you using?

I'm using latest tags on chromadb docker so for now it should be 0.5.3

@Marcus1Pierce commented on GitHub (Jun 21, 2024): > What version of Chroma are you using? I'm using latest tags on chromadb docker so for now it should be 0.5.3
Author
Owner

@timothycarambat commented on GitHub (Jun 21, 2024):

This workspace has documents embedded in it, correct?

@timothycarambat commented on GitHub (Jun 21, 2024): This workspace has documents embedded in it, correct?
Author
Owner

@timothycarambat commented on GitHub (Jun 21, 2024):

Currently unable to replicate:

  • Using OpenAI for LLM
  • Default embedder
  • Chroma @latest

I create a fresh workspace, embed a document, and send a chat and similarity search returns citations for cited answers as well as answers with no citations

@timothycarambat commented on GitHub (Jun 21, 2024): Currently unable to replicate: - Using OpenAI for LLM - Default embedder - Chroma @latest I create a fresh workspace, embed a document, and send a chat and similarity search returns citations for cited answers as well as answers with no citations
Author
Owner

@timothycarambat commented on GitHub (Jun 21, 2024):

The error is coming from Chroma, but it appears the ollama embedder is failing to return a queryVector in this instance.

Are you sending a very large prompt into the workspace or is ollama offline? Because if a null value is passed into chromas search field it will indeed fail

@timothycarambat commented on GitHub (Jun 21, 2024): The error is coming from Chroma, but it appears the ollama embedder is failing to return a queryVector in this instance. Are you sending a very large prompt into the workspace or is ollama offline? Because if a null value is passed into chromas search field it will indeed fail
Author
Owner

@Marcus1Pierce commented on GitHub (Jun 21, 2024):

This workspace has documents embedded in it, correct?

Yes of course.

Currently unable to replicate:

  • Using OpenAI for LLM
  • Default embedder
  • Chroma @latest

I create a fresh workspace, embed a document, and send a chat and similarity search returns citations for cited answers as well as answers with no citations

For LLM i use Ollama too.

For me when i got error, i'm using combined
LLM = Ollama
Embedding = Ollama
Vector Database = Chroma

But if i change Embedding to AnythingLLM Embedder or like this
LLM = Ollama
Embedding = AnythingLLM
Vector Database = Chroma

It works perfectly.

The error is coming from Chroma, but it appears the ollama embedder is failing to return a queryVector in this instance.

At first it looks like that but when i change embedding to AnythingLLM, even when using chroma it works.

Are you sending a very large prompt into the workspace or is ollama offline? Because if a null value is passed into chromas search field it will indeed fail

Nope, just "test" like in the picture.

@Marcus1Pierce commented on GitHub (Jun 21, 2024): > This workspace has documents embedded in it, correct? Yes of course. > Currently unable to replicate: > > * Using OpenAI for LLM > * Default embedder > * Chroma @latest > > I create a fresh workspace, embed a document, and send a chat and similarity search returns citations for cited answers as well as answers with no citations For LLM i use Ollama too. For me when i got error, i'm using combined LLM = Ollama Embedding = Ollama Vector Database = Chroma But if i change Embedding to AnythingLLM Embedder or like this LLM = Ollama Embedding = AnythingLLM Vector Database = Chroma It works perfectly. > The error is coming from Chroma, but it appears the ollama embedder is failing to return a queryVector in this instance. At first it looks like that but when i change embedding to AnythingLLM, even when using chroma it works. > Are you sending a very large prompt into the workspace or is ollama offline? Because if a null value is passed into chromas search field it will indeed fail Nope, just "test" like in the picture.
Author
Owner

@Marcus1Pierce commented on GitHub (Jun 24, 2024):

I don't know what is wrong with my setup or config and i don't even now how i fix the issue, but looks like the error is gone now.

I think it just error in my config not bug.

@Marcus1Pierce commented on GitHub (Jun 24, 2024): I don't know what is wrong with my setup or config and i don't even now how i fix the issue, but looks like the error is gone now. I think it just error in my config not bug.
Author
Owner

@coreyt commented on GitHub (Aug 12, 2024):

In case anyone else runs across this in the future:
I an into this error too. On my side it ended up that ollama was throwing an error because it could not find a device. In this case, there were new GPU drivers that had been installed, but I had not rebooted yet. After a reboot, ollama was fine, and the query through anythingllm worked fine as well.

@coreyt commented on GitHub (Aug 12, 2024): In case anyone else runs across this in the future: I an into this error too. On my side it ended up that ollama was throwing an error because it could not find a device. In this case, there were new GPU drivers that had been installed, but I had not rebooted yet. After a reboot, ollama was fine, and the query through anythingllm worked fine as well.
Author
Owner

@timothycarambat commented on GitHub (Aug 12, 2024):

@coreyt can i ask what version of ollama you were on?

@timothycarambat commented on GitHub (Aug 12, 2024): @coreyt can i ask what version of ollama you were on?
Author
Owner

@ibetho commented on GitHub (Nov 12, 2024):

same issue

@ibetho commented on GitHub (Nov 12, 2024): same issue
Author
Owner

@timothycarambat commented on GitHub (Nov 12, 2024):

@ibetho use the correct docker command as you are probably missing your ENV file in your storage

@timothycarambat commented on GitHub (Nov 12, 2024): @ibetho use the correct [docker command](https://docs.anythingllm.com/installation-docker/local-docker) as you are probably missing your ENV file in your storage
yindo changed title from [BUG]: Cannot read properties of undefined (reading '0') to [GH-ISSUE #1736] [BUG]: Cannot read properties of undefined (reading '0') 2026-06-05 14:39:08 -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#1132