Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

182
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda