I have this weird problem where some requests fails randomly. I have no idea what is causing this behavior. Sometimes it is images not loading and sometimes it is ajax request (cfs/severtime or algolia-search) and some other times everything is fine. It also happen in local and online. Here are two different screenshots where different resources fails to load after refreshing the browser.
Finally found the source of my problem maybe my answer would help other Meteor developers.
I used to do this :
var providersSub = Meteor.subscribe('providers');
Tracker.autorun(function () {
if(!providersSub.ready())
return;
var providerIds = _.pluck(Provider.all().fetch(), '_id'));
...
this.stop();
});
Instead of :
var providersSub = Meteor.subscribe('providers');
Tracker.autorun(function (computation) {
if(!providersSub.ready())
return;
var providerIds = _.pluck(Provider.all().fetch(), '_id'));
...
computation.stop();
});