Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda