Skip to content
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]: can't convert to a symbol and validateJson file error #1454

Closed
1 task done
Cinemacloud opened this issue Dec 29, 2023 · 13 comments · Fixed by #1455
Closed
1 task done

[Bug]: can't convert to a symbol and validateJson file error #1454

Cinemacloud opened this issue Dec 29, 2023 · 13 comments · Fixed by #1455
Labels
bug Something isn't working
Milestone

Comments

@Cinemacloud
Copy link

Cinemacloud commented Dec 29, 2023

What happened?

When running backend with npm only, I have setup my keys I believe correctly and try to interact with OpenAI but upon
submitting my question, the socket to openai closes without much explanation but I do see this in the logs of /api

I see this in error log only:
{"level":"error","message":"There was an uncaught error: Cannot convert a Symbol value to a string","stack":"TypeError: Cannot convert a Symbol value to a string\n
at Object. (/usr/local/LibreChat/api/config/parsers.js:138:43)\n
at walker (/usr/local/LibreChat/node_modules/traverse/index.js:169:16)\n
at /usr/local/LibreChat/node_modules/traverse/index.js:190:17\n
at Array.forEach ()\n
at forEach (/usr/local/LibreChat/node_modules/traverse/index.js:19:30)\n
at walker (/usr/local/LibreChat/node_modules/traverse/index.js:185:4)\n
at walk (/usr/local/LibreChat/node_modules/traverse/index.js:208:3)\n
at Traverse.forEach (/usr/local/LibreChat/node_modules/traverse/index.js:255:15)\n
at Printf.template (/usr/local/LibreChat/api/config/parsers.js:132:18)\n
at Printf.transform (/usr/local/LibreChat/node_modules/logform/printf.js:11:26)"}

and this in debug log only:
2023-12-29 22:57:32 info: Connected to MongoDB
2023-12-29 22:57:33 debug: [indexSync] There are 0 messages in the database, 0 indexed
2023-12-29 22:57:33 debug: [indexSync] There are 0 convos in the database, 0 indexed
2023-12-29 22:57:33 info: Server listening at http://74.208.106.176:3080
2023-12-29 22:57:35 debug: [validateJson] files
[""Ai_PDF.json"",""BrowserOp.json"",""Dr_Thoths_Tarot.json"",""DreamInterpreter.json"",""VoxScript.json"",""askyourpdf.json"",""drink_maestro.json"",""earthImagesAndVisualizations.json"",""image_prompt_enhance
2023-12-29 22:57:37 debug: [validateJson] files

Steps to Reproduce

npm run backend:dev

What browsers are you seeing the problem on?

No response

Relevant log output

No response

Screenshots

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Cinemacloud Cinemacloud added the bug Something isn't working label Dec 29, 2023
@fuegovic
Copy link
Collaborator

The same error message was reported on discord: https://discord.com/channels/1086345563026489514/1190419554376110120

@danny-avila
Copy link
Owner

what is your node.js version?

@Cinemacloud Cinemacloud changed the title [Bug]: [Bug]: can't convert to a symbol and validateJson file error Dec 29, 2023
@Cinemacloud
Copy link
Author

v18.18.2

@Cinemacloud
Copy link
Author

The same error message was reported on discord: https://discord.com/channels/1086345563026489514/1190419554376110120

Can you send me an invite to view link or paste contents I'm not authorized to view it

@fuegovic
Copy link
Collaborator

The same error message was reported on discord: https://discord.com/channels/1086345563026489514/1190419554376110120

Can you send me an invite to view link or paste contents I'm not authorized to view it

here it is: https://discord.librechat.ai

@danny-avila
Copy link
Owner

danny-avila commented Dec 29, 2023

v18.18.2

Ok, I can't really reproduce it, this is why I asked for the node version in case that was the culprit. Need a bit more context.

Is this just upon running the server? How exactly did you install LibreChat? Also what is your operating system?

@Cinemacloud
Copy link
Author

v18.18.2

Ok, I can't really reproduce it, this is why I asked for the node version in case that was the culprit. Need a bit more context.

Is this just upon running the server? How exactly did you install LibreChat? Also what is your operating system?

I tried earlier the docker-compose method but I could not seem to connect to the local port or get it to actually use the host and domain and port values from .env so I embarked on manually building it for Linux/Digital Ocean docs generally.

It is on Rock Linux 9.2 and aforementioned Node version running from /usr/local/Librechat

I wish this was as easy to get running as PandoraAi was (btw thanks to you Danny) but its just so simple, Libre looks worthwhile to get integrated and running.

If you want to dm me on discord I can add your pk to ssh if you want to have a look.

@danny-avila
Copy link
Owner

I wish this was as easy to get running as PandoraAi was (btw thanks to you Danny) but its just so simple, Libre looks worthwhile to get integrated and running.

I do think it's easy and I will have a one-click setup solution soon for DigitalOcean.

If you have node/npm setup and running, can you try npm run reinstall from the project directory?

@Cinemacloud
Copy link
Author

Cinemacloud commented Dec 29, 2023

Done then just rerun backend:dev?
Oh and btw I did see this one warning only:

dist/assets/index-JZGSl-ZT.js 642.66 kB │ gzip: 176.62 kB
dist/assets/vendor-e8WVszf_.js 1,605.61 kB │ gzip: 485.45 kB

(!) Some chunks are larger than 500 kB after minification. Consider:

Not sure if that's causal but no errors

@danny-avila
Copy link
Owner

Oh and btw I did see this one warning only:

This can be ignored. It's planned to optimize bundles but it's a non-issue at this point.

Done then just rerun backend:dev?

Yes, then run the app.

@Cinemacloud
Copy link
Author

➜ npm run backend:dev

LibreChat@0.6.5 backend:dev
cross-env NODE_ENV=development npx nodemon api/server/index.js

[nodemon] 3.0.2
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting node api/server/index.js
2023-12-29 23:55:14 info: REDIS_URI not provided, or USE_REDIS not set. Redis module will not be initialized.
2023-12-29 23:55:15 warn: Meilisearch error, search will be disabled
2023-12-29 23:55:16 info: Connected to MongoDB
2023-12-29 23:55:16 error: [indexSync] error fetch failed
2023-12-29 23:55:16 info: Server listening at http://74.208.106.176:3080

@Cinemacloud
Copy link
Author

So I then go here http://kro.ma:3080/c/new

and type 'hi' in chat or whatever and it immediately gives aforementioned error on backend:dev console
and stops till restarted

@danny-avila
Copy link
Owner

As discussed on discord, traverse npm module at version 0.6.7 may be causing the issue, and you might've updated the package somehow. I was able to reproduce with this version, as well as took other measures to completely avoid the issue. I will avoid bumping that package for now, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants