Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

178
Views
Legacy Meteor application not fetching documents on server

I'm supporting a legacy Meteor 1.2.1 application using MongoDB Atlas and without any apparent code changes, it is suddenly not showing any documents - The code has not been changed for at least 5 months.

Looking in the DB, the documents are there, but on the server side, the find().fetch() calls are all returning 0 documents:

var documents = Articles.find().fetch();
console.log(`++ Found: ${documents.length} articles`);  

logs:

++ Found: 0 articles

Interestingly, if I grab hold of the raw DB connection that Meteor is using and do a query myself, the data is found:

var getDocumentCounts = function (collectionName) {
    var Future = Npm.require('fibers/future'), future = new Future();
    var db = MongoInternals.defaultRemoteCollectionDriver().mongo.db;
    
    db.collection(collectionName).count(
        function(error, results) {
            if (error) throw new Meteor.Error(500, "failed");
            future.return(results);
        }
    );
    return future.wait();
}

var result = getDocumentCounts('articles');
console.log(`articles: ${result}`);

logs:

articles: 259

The application is using some NPM packages, but is using an npm-shrinkwrap.json (legacy again) to ensure the versions of them are not accidentally upgraded during a restart/rebuild.

Node is from the Jurassic era @ v0.10.41

I can't think why the application would suddenly develop this problem. Looking for a simple solution rather than the longwinded "upgrade everything"

Also interestingly, if I connect to my local dev mongo db, everything works fine. The MongDB Atlas is using shards whereas the local mongo is not, but it has had those shards for many many months.

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

My best opinion is that the problem is being caused by the fact that the mongo driver used by your Meteor version is no longer compatible with the mongo version running in Atlas. Check the Atlas MongoDB version, if possible.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!