TylerBrock / mongo-hacker

MongoDB Shell Enhancements for Hackers
tylerbrock.github.io/mongo-hacker
MIT License
1.79k stars 235 forks source link

TypeError: this._db._initExtraInfo is not a function #161

Closed 4Z4T4R closed 5 years ago

4Z4T4R commented 8 years ago

Originally thought to be an issue with MongoDB Shell. They claim it is a result of Mongo-Hacker. Here's the original ticket at MongoDB with a complete repro procedure.

https://jira.mongodb.org/browse/SERVER-24065

TylerBrock commented 8 years ago

Hey, thanks for reporting this. What version of the shell are you running?

4Z4T4R commented 8 years ago

0.0.13 -- Apologies for failing to mention. :)

TylerBrock commented 8 years ago

no thats ok, :-) but i meant what version of the MongoDB shell are you running?

4Z4T4R commented 8 years ago

v3.2.6 she'll into a v3.2.5 remote server--- details are in the Mongo JIRA. :)

chintan100 commented 5 years ago

I get this error as well. Below is my configuration:

MongoDB shell version v3.6.5
MongoDB server version: 3.2.19
Mongo-Hacker 0.0.14

I am trying to delete earliest 10 records from mongoDB using this query:

db.getCollection('Status').find({}).sort({_created_at:1}).limit(10).remove()
2018-12-25T18:04:27.739+0530 E QUERY    [thread1] TypeError: this._db._initExtraInfo is not a function :
DBQuery.prototype.remove@/Users/xxxxxxxxxx/.mongorc.js:448:5
@(shell):1:1

However, if I just do db.getCollection('Status').find({}).sort({_created_at:1}).limit(10) it works fine and does list the records. If I add .remove(), it gives the above error.