[Bug]: LibreChat: TypeError [ERR_INVALID_ARG_TYPE] #651
-
Contact DetailsNo response What happened?Receiving error on initial Steps to ReproduceClone latest main branch Run See log output What browsers are you seeing the problem on?No response Relevant log outputLibreChat | > [email protected] backend
LibreChat | > cross-env NODE_ENV=production node api/server/index.js
LibreChat |
LibreChat |
LibreChat | Clearing sync timeouts before exiting...
LibreChat | node:buffer:330
LibreChat | throw new ERR_INVALID_ARG_TYPE(
LibreChat | ^
LibreChat |
LibreChat | TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
LibreChat | at new NodeError (node:internal/errors:399:5)
LibreChat | at Function.from (node:buffer:330:9)
LibreChat | at Object.<anonymous> (/app/api/utils/crypto.js:2:20)
LibreChat | at Module._compile (node:internal/modules/cjs/loader:1275:14)
LibreChat | at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
LibreChat | at Module.load (node:internal/modules/cjs/loader:1133:32)
LibreChat | at Module._load (node:internal/modules/cjs/loader:972:12)
LibreChat | at Module.require (node:internal/modules/cjs/loader:1157:19)
LibreChat | at require (node:internal/modules/helpers:119:18)
LibreChat | at Object.<anonymous> (/app/api/utils/index.js:2:21) {
LibreChat | code: 'ERR_INVALID_ARG_TYPE'
LibreChat | }
LibreChat |
LibreChat | Node.js v19.9.0
LibreChat |
LibreChat exited with code 1 ScreenshotsCode of Conduct
|
Beta Was this translation helpful? Give feedback.
Answered by
danny-avila
Jul 15, 2023
Replies: 2 comments
-
This is actually expected, but I should add a more meaningful error message. Is this set in your .env file? # For securely storing credentials, you need a fixed key and IV. You can set them here for prod and dev environments
# If you don't set them, the app will crash on startup.
# You need a 32-byte key (64 characters in hex) and 16-byte IV (32 characters in hex)
# Use this replit to generate some quickly: https://replit.com/@daavila/crypto#index.js
# Here are some examples (THESE ARE NOT SECURE!)
CREDS_KEY=f34be427ebb29de8d88c107a71546019685ed8b241d8f2ed00c3df97ad2566f0
CREDS_IV=e2341419ec3dd3d19b13a1a87fafcbfb |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cyclecycle
-
That was the problem. Thanks a lot |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is actually expected, but I should add a more meaningful error message.
Is this set in your .env file?