I have an application running, and I had some problems when I make a find in a string (even though it is an ObjectId), I already tried to convert the String to ObjectId with mongoose.Types.ObjectId(' 53cb6b9b4f4ddef1ad47f943 ')
(example) and Even then I can not get the return and it returns me the following error:
Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
Also returns me:
this.id.charCodeAt is not a function
Has anyone had this problem yet?
Try trimming the spaces in your string
mongoose.Types.ObjectId ('53cb6b9b4f4ddef1ad47f943')
Sorry, it was typing error ... neat =)
hi i m bikash
Most helpful comment
Try trimming the spaces in your string