[GH-ISSUE #324] Chat API broke in latest release #189

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

Originally created by @Britman72 on GitHub (Nov 2, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/324

When the chat API is called it crashes the Docker instance with:

2023-11-02 10:28:19 anything-llm | /app/server/endpoints/api/workspace/index.js:495
2023-11-02 10:28:19 anything-llm | id: uuidv4(),
2023-11-02 10:28:19 anything-llm | ^
2023-11-02 10:28:19 anything-llm |
2023-11-02 10:28:19 anything-llm | ReferenceError: uuidv4 is not defined
2023-11-02 10:28:19 anything-llm | at /app/server/endpoints/api/workspace/index.js:495:15
2023-11-02 10:28:19 anything-llm |
2023-11-02 10:28:19 anything-llm | Node.js v18.18.2
anything-llm exited with code 1

Originally created by @Britman72 on GitHub (Nov 2, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/324 When the chat API is called it crashes the Docker instance with: 2023-11-02 10:28:19 anything-llm | /app/server/endpoints/api/workspace/index.js:495 2023-11-02 10:28:19 anything-llm | id: uuidv4(), 2023-11-02 10:28:19 anything-llm | ^ 2023-11-02 10:28:19 anything-llm | 2023-11-02 10:28:19 anything-llm | ReferenceError: uuidv4 is not defined 2023-11-02 10:28:19 anything-llm | at /app/server/endpoints/api/workspace/index.js:495:15 2023-11-02 10:28:19 anything-llm | 2023-11-02 10:28:19 anything-llm | Node.js v18.18.2 anything-llm exited with code 1
yindo closed this issue 2026-02-22 18:18:17 -05:00
Author
Owner

@Britman72 commented on GitHub (Nov 2, 2023):

Closing this, was a mistake on my end.

@Britman72 commented on GitHub (Nov 2, 2023): Closing this, was a mistake on my end.
Author
Owner

@Britman72 commented on GitHub (Nov 3, 2023):

I am re-opening this. I thought it was due to me switching query mode to conversation mode in the API JSON string, but it turns out this issue is random and what looks like due to the prisma query not returning or getting hung up. It seems to happen once in about a dozen queries and crashes the docker instance. Restarting the instance and issuing the same API call works but then fails randomly again. You can see that it sat at the query for almost 2 minutes before failing.

2023-11-03 09:20:59 anything-llm  | prisma:query SELECT `main`.`workspace_chats`.`id`, `main`.`workspace_chats`.`workspaceId`, `main`.`workspace_chats`.`prompt`, `main`.`workspace_chats`.`response`, `main`.`workspace_chats`.`include`, `main`.`workspace_chats`.`user_id`, `main`.`workspace_chats`.`createdAt`, `main`.`workspace_chats`.`lastUpdatedAt` FROM `main`.`workspace_chats` WHERE (`main`.`workspace_chats`.`workspaceId` = ? AND `main`.`workspace_chats`.`include` = ?) ORDER BY `main`.`workspace_chats`.`id` DESC LIMIT ? OFFSET ?
2023-11-03 09:22:05 anything-llm  | /app/server/endpoints/api/workspace/index.js:495
2023-11-03 09:22:05 anything-llm  |           id: uuidv4(),
2023-11-03 09:22:05 anything-llm  |               ^
2023-11-03 09:22:05 anything-llm  | 
2023-11-03 09:22:05 anything-llm  | ReferenceError: uuidv4 is not defined
2023-11-03 09:22:05 anything-llm  |     at /app/server/endpoints/api/workspace/index.js:495:15
2023-11-03 09:22:05 anything-llm  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2023-11-03 09:22:05 anything-llm  | 
2023-11-03 09:22:05 anything-llm  | Node.js v18.18.2
anything-llm exited with code 1
@Britman72 commented on GitHub (Nov 3, 2023): I am re-opening this. I thought it was due to me switching query mode to conversation mode in the API JSON string, but it turns out this issue is random and what looks like due to the prisma query not returning or getting hung up. It seems to happen once in about a dozen queries and crashes the docker instance. Restarting the instance and issuing the same API call works but then fails randomly again. You can see that it sat at the query for almost 2 minutes before failing. ``` 2023-11-03 09:20:59 anything-llm | prisma:query SELECT `main`.`workspace_chats`.`id`, `main`.`workspace_chats`.`workspaceId`, `main`.`workspace_chats`.`prompt`, `main`.`workspace_chats`.`response`, `main`.`workspace_chats`.`include`, `main`.`workspace_chats`.`user_id`, `main`.`workspace_chats`.`createdAt`, `main`.`workspace_chats`.`lastUpdatedAt` FROM `main`.`workspace_chats` WHERE (`main`.`workspace_chats`.`workspaceId` = ? AND `main`.`workspace_chats`.`include` = ?) ORDER BY `main`.`workspace_chats`.`id` DESC LIMIT ? OFFSET ? 2023-11-03 09:22:05 anything-llm | /app/server/endpoints/api/workspace/index.js:495 2023-11-03 09:22:05 anything-llm | id: uuidv4(), 2023-11-03 09:22:05 anything-llm | ^ 2023-11-03 09:22:05 anything-llm | 2023-11-03 09:22:05 anything-llm | ReferenceError: uuidv4 is not defined 2023-11-03 09:22:05 anything-llm | at /app/server/endpoints/api/workspace/index.js:495:15 2023-11-03 09:22:05 anything-llm | at process.processTicksAndRejections (node:internal/process/task_queues:95:5) 2023-11-03 09:22:05 anything-llm | 2023-11-03 09:22:05 anything-llm | Node.js v18.18.2 anything-llm exited with code 1 ```
yindo changed title from Chat API broke in latest release to [GH-ISSUE #324] Chat API broke in latest release 2026-06-05 14:33:57 -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#189