Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Agent UI failing to upload files to code interpreter consistently #5890

Closed
1 task done
afaq-glowforge opened this issue Feb 15, 2025 · 2 comments
Closed
1 task done
Labels
🐛 bug Something isn't working

Comments

@afaq-glowforge
Copy link

What happened?

When using the agent editor UI and trying to upload files for code interpreter using the "Upload for Code Interpreter" button, the UI is failing consistently with:

{
    "message": "Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_ids' has non-array type null"
}

Version Information

ghcr.io/danny-avila/librechat-dev-api latest 8f2ba4d55a9b 4 days ago 990MB
ghcr.io/danny-avila/librechat-dev-api a319d54564dd 4 days ago 990MB
ghcr.io/danny-avila/librechat-rag-api-dev-lite latest 095db2c2ff3b 8 weeks ago 1.29GB

Steps to Reproduce

  1. Create an agent
  2. During creation, add files for instructions (.py and .txt)
  3. Use Agent successfully
  4. Update files for instructions (many times)
  5. eventually the agent will consistently start throwing the reported error

What browsers are you seeing the problem on?

Chrome

Relevant log output

2025-02-15T01:24:42.240Z debug: [spendTokens] conversationId: d9f28b19-4179-463c-891a-979faecb201d | Context: message | Token usage:
{
  promptTokens: 3120,
  completionTokens: 426,
}
2025-02-15T01:24:42.259Z debug: [spendTokens] No transactions incurred against balance
2025-02-15T01:24:42.260Z debug: [spendTokens] No transactions incurred against balance
2025-02-15T01:24:42.260Z debug: [spendTokens] No transactions incurred against balance
2025-02-15T01:24:42.262Z debug: [saveConvo] api/app/clients/BaseClient.js - saveMessageToDatabase #saveConvo
2025-02-15T01:24:42.277Z debug: [AgentController] Request closed
2025-02-15T01:24:42.673Z debug: [streamAudio] user: 64ef61dae93d5a5d57e64f1b | start stream audio
2025-02-15T01:24:42.673Z info: Custom config file loaded:
2025-02-15T01:24:42.674Z info: {
  "version": "1.0.8",
  "interface": {
    "privacyPolicy": {
      "externalUrl": "https://librechat.ai/privacy-policy",
      "openNewTab": true
 ... [truncated]
2025-02-15T01:24:42.674Z debug: Custom config:
{
  version: "1.0.8",
    privacyPolicy.externalUrl: "https://librechat.ai/privacy-policy",
    privacyPolicy.openNewTab: true,
    termsOfService.externalUrl: "https://librechat.ai/tos",
    termsOfService.openNewTab: true,
    // 1 socialLogin(s)
    registration.socialLogins: ["google"],
    agents.recursionLimit: 100,
}
2025-02-15T01:24:42.674Z error: [streamAudio] user: 64ef61dae93d5a5d57e64f1b | Failed to stream audio: TypeError: Cannot read properties of undefined (reading 'tts')
2025-02-15T01:25:06.786Z debug: [/files] Files deleted successfully: fb8a2194-0c79-436b-93a0-88adaadd3c95
2025-02-15T01:25:08.448Z error: Error deleting file ENOENT: no such file or directory, unlink '/app/uploads/64ef61dae93d5a5d57e64f1b/17c8ca42-d2e3-49da-ad0d-17a8c5d9bbe2__instruction... [truncated]
2025-02-15T01:25:08.450Z debug: [/files] Files deleted successfully: 17c8ca42-d2e3-49da-ad0d-17a8c5d9bbe2
2025-02-15T01:25:09.737Z error: Error deleting file ENOENT: no such file or directory, unlink '/app/uploads/64ef61dae93d5a5d57e64f1b/17c8ca42-d2e3-49da-ad0d-17a8c5d9bbe2__instruction... [truncated]
2025-02-15T01:25:09.740Z debug: [/files] Files deleted successfully: 17c8ca42-d2e3-49da-ad0d-17a8c5d9bbe2
2025-02-15T01:25:12.130Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:25:20.804Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:25:31.073Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:25:45.230Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:26:03.917Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:26:40.804Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:26:56.106Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:29:38.717Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:32:14.703Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]
2025-02-15T01:33:12.233Z debug: File processed successfully.
{
  status: true,
  file_id: "6a234f63-6a19-442f-a383-1694e035808f",
  filename: "instructions.py",
  known_type: true,
}
2025-02-15T01:34:20.845Z debug: [/files] Files deleted successfully: 6a234f63-6a19-442f-a383-1694e035808f
2025-02-15T01:34:20.992Z error: [/files] Error processing file: Plan executor error during findAndModify :: caused by :: Cannot apply $addToSet to non-array field. Field named 'file_... [truncated]

Screenshots

Image

Code of Conduct

  • I agree to follow this project's Code of Conduct
@afaq-glowforge afaq-glowforge added the 🐛 bug Something isn't working label Feb 15, 2025
@danny-avila
Copy link
Owner

Thanks for the report. Can you expand on this step? I can't reproduce this.

Update files for instructions (many times)

@afaq-glowforge
Copy link
Author

That step involved uploading new versions of the instruction file and deleting the old ones over time.
Example of a single instance:

  1. The existing instruction files (a .py and a .txt) work fine
  2. Upload new .py and .txt files (new revision) with the same name
  3. Delete old revision files

We've also had many instances where the agent responds that it cannot find the instruction file attached repeatedly.

Repository owner locked and limited conversation to collaborators Feb 16, 2025
@danny-avila danny-avila converted this issue into discussion #5911 Feb 16, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants