1

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.

enter image description here enter image description here

Frank6
  • 1,193
  • 1
  • 11
  • 23

2 Answers2

2

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();
});
Frank6
  • 1,193
  • 1
  • 11
  • 23
0

take a look at this: What does status=canceled for a resource mean in Chrome Developer Tools?

it seems that your requests aren't failing, they're being canceled by chrome. this usually happens because some javascript alters the DOM and it doesn't end up needing a resource it had started to request. are there any resources that are actually missing from the page once it's rendered?

Community
  • 1
  • 1
user980989
  • 1
  • 1
  • 2
  • Yes I've seen this post but I couldn't identify any place my templates would be rerendered. And yes, all the assets highlighted red are actually missing. – Frank6 Jun 15 '15 at 21:55
  • pretty weird, if you haven't already try setting breakpoints in the Template..rendered and any places where you set dynamic templates or reactive variables. if you can get an example projec to reproduce the bug and post it on meteorpad or github or give a link to a live site that shows the bug that could help find a solution – user980989 Jun 17 '15 at 06:18