-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Invalid UTF-8 String Causes BSONError When Submitting Data to MongoDB #1745
Comments
Hi! Just for reproduction could you share the input that did this for you ? |
@nsarrazin Invalid UTF-8 strings seem to be automatically converted when stored somewhere or posted on a web page. It's difficult to actually post a string with issues to GitHub. If this can reproduce the issue, that would be great.
|
Yeah this doesn't seem to give an error on my end, I'll see if I can reproduce somehow! |
I am encountering an issue where submitting data to MongoDB results in a BSONError: Invalid UTF-8 string in BSON document. This error occurs when the chat UI input contains an invalid UTF-8 string.
Steps to Reproduce
Error Stack Trace
BSONError: Invalid UTF-8 string in BSON document
at getValidatedString (/app/node_modules/bson/lib/bson.cjs:3052:27)
at deserializeObject (/app/node_modules/bson/lib/bson.cjs:2677:21)
at deserializeObject (/app/node_modules/bson/lib/bson.cjs:2736:25)
at deserializeObject (/app/node_modules/bson/lib/bson.cjs:2754:21)
at deserializeObject (/app/node_modules/bson/lib/bson.cjs:2736:25)
at deserializeObject (/app/node_modules/bson/lib/bson.cjs:2754:21)
at deserializeObject (/app/node_modules/bson/lib/bson.cjs:2736:25)
at internalDeserialize (/app/node_modules/bson/lib/bson.cjs:2587:12)
at Object.deserialize (/app/node_modules/bson/lib/bson.cjs:4063:12)
at BinMsg.parse (/app/node_modules/mongodb/lib/cmap/commands.js:461:54)
Expected Behavior
The system should either:
Actual Behavior
Possible Solutions
The text was updated successfully, but these errors were encountered: