-
Notifications
You must be signed in to change notification settings - Fork 99
Description
UI search fails (TypeError: Cannot read properties of undefined (reading 'map')) and tg-show-graph returns no output
Summary
-
Submitting text in Vector Search or Assistant in Workbench UI errors with:
TypeError: Cannot read properties of undefined (reading 'map') -
CLI graph inspection returns no output:
tg-show-graph # (nothing prints) -
Processors are healthy, flows look correct, and sample documents download + submit successfully.
Environment
- macOS Sequoia 15.5 (24F74) (Apple Silicon)
- Docker Desktop (Linux VM kernel in logs:
6.10.14-linuxkit) - Compose images (from
docker-compose.yaml):trustgraph-flow:1.2.20trustgraph-mcp:1.2.20workbench-ui:1.0.6apachepulsar/pulsar:4.0.5cassandra:4.1.9qdrant:v1.14.1minio:RELEASE.2025-06-13T11-33-47Zprom/prometheus:v2.53.5grafana:12.0.2
- CLI
uvinstalledtrustgraph-cli==1.3.9(installed viauv tool installand also tested withuvx --from trustgraph-cli β¦)trustgraph-base==1.3.9
- TrustGraph version: 0.18.14
What works
Processors are healthy:
tg-show-processor-state
chunker π
metering π
text-completion-rag π
text-completion π
kg-store π
kg-extract-relationships π
store-triples π
kg-extract-definitions π
kg-manager π
query-triples π
config-svc π
pdf-decoder π
metering-rag π
graph-rag π
embeddings π
store-graph-embeddings π
Flows present:
tg-show-flows
+-------+------------------------------------------------------------+
| id | default |
| class | document-rag+graph-rag |
| desc | Default processing flow |
| queue | document-load: persistent://tg/flow/document-load:default |
| | text-load: persistent://tg/flow/text-document-load:default |
+-------+------------------------------------------------------------+
Sample documents load & submit successfully:
tg-load-sample-documents (excerpt)
Report of the Presidential Commission on the Space Shuttle Challenger Accident, Volume 1 :
downloading... done. adding... successful.
A Concise Dictionary of Old Icelandic :
downloading... done. adding... successful.
Annual threat assessment of the U.S. intelligence community - March 2025 :
downloading... done. adding... successful.
The Role of Intelligence and State Policies in International Security :
downloading... done. adding... successful.
Beyond the vigilant state: globalisation and intelligence :
downloading... done. adding... successful.
What doesnβt work
-
CLI:
tg-show-graphprints no output. -
UI: Typing in Vector Search or Assistant throws a frontend runtime error:
Error: TypeError: Cannot read properties of undefined (reading 'map')
Steps to reproduce
- Start the stack with the compose file pinning the images listed above (Pulsar, Cassandra, Qdrant, MinIO, Prometheus, Grafana, Workbench UI, TrustGraph services).
- Install CLI (either of the below reproduces):
uv tool install trustgraph-clithentg-show-processor-state- or
uvx --from trustgraph-cli tg-show-processor-state
- Load sample docs:
tg-load-sample-documents. - Open Workbench UI at
http://localhost:8888. - Go to Vector Search or Assistant, type any query β observe error.
- In a terminal, run
tg-show-graphβ observe no output.
Expected behaviour
tg-show-graphprints triples / graph contents.- UI search panes return results (or at minimum, no crash if results are empty), i.e., graceful handling with an empty list.
Actual behaviour
tg-show-graphprints nothing.- UI shows
TypeError: Cannot read properties of undefined (reading 'map')on query submission.
Additional diagnostics
- Gateway
/metricsresponds (Prometheus scraping OK). - Broker and services report healthy in CLI.
- Available to provide on request:
- API Gateway logs around the failing UI requests
- Browser DevTools β Network response payload for the failing search call
- Frontend console stack trace
tg-show-library-processingoutput- Cassandra counts (e.g.,
triples_by_subject)
Apple Silicon (arm64) note
On macOS (M-series), I hit architecture mismatches when pulling/running some images
(e.g. errors like no matching manifest for linux/arm64/v8 or exec format error).
Workaround I used: force linux/amd64 for the images that donβt publish arm64 builds by adding
a docker-compose.override.yaml:
# docker-compose.override.yaml
# Define an anchor for the amd64 platform once, then merge it into each TG service.
x-amd64: &amd64 { platform: linux/amd64 }
services:
agent-manager:
<<: *amd64
api-gateway:
<<: *amd64
chunker:
<<: *amd64
config-svc:
<<: *amd64
document-embeddings:
<<: *amd64
document-rag:
<<: *amd64
embeddings:
<<: *amd64
graph-embeddings:
<<: *amd64
graph-rag:
<<: *amd64
init-trustgraph:
<<: *amd64
kg-extract-agent:
<<: *amd64
kg-extract-definitions:
<<: *amd64
kg-extract-objects:
<<: *amd64
kg-extract-relationships:
<<: *amd64
kg-manager:
<<: *amd64
kg-store:
<<: *amd64
librarian:
<<: *amd64
mcp-tool:
<<: *amd64
metering:
<<: *amd64
metering-rag:
<<: *amd64
pdf-decoder:
<<: *amd64
prompt:
<<: *amd64
prompt-rag:
<<: *amd64
query-doc-embeddings:
<<: *amd64
query-graph-embeddings:
<<: *amd64
query-triples:
<<: *amd64
store-doc-embeddings:
<<: *amd64
store-graph-embeddings:
<<: *amd64
store-objects:
<<: *amd64
store-triples:
<<: *amd64
text-completion:
<<: *amd64
text-completion-rag:
<<: *amd64
workbench-ui:
<<: *amd64
mcp-server:
<<: *amd64Notes:
- In Docker Desktop, I also enabled Settings β Features in development β βUse Rosetta for x86/amd64 emulation on Apple Siliconβ (when available).
- You can verify image architecture with:
docker buildx imagetools inspect <image:tag>docker image inspect --format '{{.Architecture}}' <image:tag>
- For services that do have arm64 images, donβt force amd64βrunning natively is faster.
Hypotheses (to help triage)
- UI expects a field thatβs undefined when the API returns an empty or error payload (e.g.,
results.map(...)onundefined). A null/empty-state guard may be missing. - Version mismatch: UI
workbench-ui:1.0.6, servicestrustgraph-flow:1.2.20, CLI1.3.9. If the API response schema changed between these, the UI could be mapping a field that the gateway/service no longer returns (or returns under a different key). - Graph not populated: if KG extraction completed but storage/query path isnβt wiring correctly,
tg-show-graphwould be empty and UI vector search could receive an unexpected/empty shape from the gateway.
What would help me move forward
- Confirm the expected API response shape for Vector Search / Assistant endpoints that the UI is mapping over (field names/types).
- Confirm compatible versions matrix between
workbench-ui,trustgraph-flow, andtrustgraph-cli. - Guidance on verifying KG population (which tables/collections to inspect for triples/embeddings, and which service logs to tail during a search).