Skip to content

[04-chromadb] Products cannot connect to Chroma: GetOrCreateCollection fails with NotFound #71

Closed

Description

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run scenario 04-chromadb. The AppHost starts chromadb/chroma without a tag, which is Chroma 1.5.9 today. When Products starts, the ChromaDB client factory in Products/Program.cs calls GetOrCreateCollection("products") and fails.

The same happens running Products alone against chromadb/chroma:1.5.9, with services__chroma__chromaendpoint__0=http://localhost:8000.

Any log messages given by the failure

fail: Program[0]
      Error creating chromaDB client
      ChromaDB.Client.ChromaException: Unexpected status code: NotFound.
         at ChromaDB.Client.Common.HttpClientHelpers.Send[TResponse](HttpClient httpClient, HttpRequestMessage httpRequestMessage)
         at ChromaDB.Client.Common.HttpClientHelpers.Post[TInput,TResponse](HttpClient httpClient, String endpoint, TInput input, RequestQueryParams queryParams)
         at ChromaDB.Client.ChromaClient.GetOrCreateCollection(String name, Dictionary`2 metadata, String tenant, String database)

then:

fail: Program[0]
      Error initializing memory context
      System.AggregateException: One or more errors occurred. (Object reference not set to an instance of an object.)

The ChromaCollectionClient is null, so the semantic search has no collection.

Expected/desired behavior

Products creates the products collection, upserts the product embeddings, and the semantic search queries them.

OS and Version?

Windows 11, with Chroma and SQL Server in Docker (Linux containers).

Versions

  • eShopLite main at 9eb9fb6
  • ChromaDB.Client 1.0.1-ci-13369893450
  • Chroma 1.5.9 (chromadb/chroma, no tag)
  • .NET SDK 10.0.402

Mention any other details that might be useful

Two things break the connection:

  • Program.cs appends /api/v1 without a trailing slash, so the client posts to /api/collections. Chroma 0.5.20 answers 404 there too.
  • With /api/v1/, as in the scenario README, the old client works with Chroma 0.5.20. Chroma 1.x no longer serves the v1 API: 1.5.9 answers 405.

Proposed fix: move the scenario to ChromaDotNet.Client 2.14.0, which uses the v2 API of Chroma 1.x and keeps the ChromaDB.Client namespace. I maintain it. The original ChromaDB.Client package is deprecated on NuGet in favor of ChromaDotNet.Client. A pull request with the fix follows.

Fix: #72

Activity

  1. github-actions commented on Oct 19, 2026

    @github-actions

    👋 Thanks for contributing Federico Laurianti (@Laurianti)! We will review the issue and get back to you soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions