[GH-ISSUE #4742] [BUG]: Embedded Chat not working Version 1.9 #2996

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

Originally created by @masada-x on GitHub (Dec 9, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4742

How are you running AnythingLLM?

Docker (remote machine)

What happened?

We had few embedded chat workspaces all working fine now suddenly all deleted and cant create new one.

Event logs

Image

Docker Logs
[backend] info: prisma:error
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] error:
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] info: prisma:error
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] error:
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] info: [Event Logged] - embed_created
[backend] info: prisma:error
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] error:
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] info: [Event Logged] - login_event
[backend] info: [Event Logged] - login_event
[backend] info: prisma:error
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] error:
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] info: [Event Logged] - embed_created
[backend] info: prisma:error
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] error:
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] info: [Event Logged] - embed_created

[backend] info: prisma:error
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.
[backend] error:
Invalid prisma.embed_configs.findMany() invocation:

Inconsistent query result: Field workspace is required to return data, got null instead.

Are there known steps to reproduce?

No response

Originally created by @masada-x on GitHub (Dec 9, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4742 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? We had few embedded chat workspaces all working fine now suddenly all deleted and cant create new one. **Event logs** <img width="1195" height="800" alt="Image" src="https://github.com/user-attachments/assets/a74e7170-d10e-46de-bdbb-d6958f0cf533" /> **Docker Logs** [backend] info: prisma:error Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] error: Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] info: prisma:error Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] error: Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] info: [Event Logged] - embed_created [backend] info: prisma:error Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] error: Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] info: [Event Logged] - login_event [backend] info: [Event Logged] - login_event [backend] info: prisma:error Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] error: Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] info: [Event Logged] - embed_created [backend] info: prisma:error Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] error: Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] info: [Event Logged] - embed_created [backend] info: prisma:error Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. [backend] error: Invalid `prisma.embed_configs.findMany()` invocation: Inconsistent query result: Field workspace is required to return data, got `null` instead. ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:32:11 -05:00
yindo closed this issue 2026-02-22 18:32:11 -05:00
Author
Owner

@masada-x commented on GitHub (Dec 9, 2025):

The issue is fixed. The orphaned embedded chats making this problem after deleting thee orphaned all embedded chat visible now and the one I tried to create again its also visible in embedded chat.

to preview
docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c
"SELECT ec.id, ec.workspace_id
FROM embed_configs ec
LEFT JOIN workspaces w ON w.id = ec.workspace_id
WHERE w.id IS NULL
ORDER BY ec.id;"

to delete

General: delete any config whose workspace no longer exists

docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c
"DELETE FROM embed_configs ec
WHERE NOT EXISTS (SELECT 1 FROM workspaces w WHERE w.id = ec.workspace_id);"

Or: just the known ids

docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c
"DELETE FROM embed_configs WHERE id IN (4,5,6,7,8);"

To Verify
docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c
"SELECT COUNT(*) AS remaining_orphans
FROM embed_configs ec
LEFT JOIN workspaces w ON w.id = ec.workspace_id
WHERE w.id IS NULL;"

Enjoy :)

@masada-x commented on GitHub (Dec 9, 2025): The issue is fixed. The orphaned embedded chats making this problem after deleting thee orphaned all embedded chat visible now and the one I tried to create again its also visible in embedded chat. to preview docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c \ "SELECT ec.id, ec.workspace_id FROM embed_configs ec LEFT JOIN workspaces w ON w.id = ec.workspace_id WHERE w.id IS NULL ORDER BY ec.id;" to delete # General: delete any config whose workspace no longer exists docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c \ "DELETE FROM embed_configs ec WHERE NOT EXISTS (SELECT 1 FROM workspaces w WHERE w.id = ec.workspace_id);" # Or: just the known ids docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c \ "DELETE FROM embed_configs WHERE id IN (4,5,6,7,8);" To Verify docker exec -i anythingllm-postgres psql -U anything -d anythingllm -c \ "SELECT COUNT(*) AS remaining_orphans FROM embed_configs ec LEFT JOIN workspaces w ON w.id = ec.workspace_id WHERE w.id IS NULL;" Enjoy :)
Author
Owner

@masada-x commented on GitHub (Dec 9, 2025):

Hope it helps

@masada-x commented on GitHub (Dec 9, 2025): Hope it helps
yindo changed title from [BUG]: Embedded Chat not working Version 1.9 to [GH-ISSUE #4742] [BUG]: Embedded Chat not working Version 1.9 2026-06-05 14:49:44 -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#2996