Infinite Refresh Bug on Load - Anyone else seeing this?

My application will, occasionally, instead of finishing loading, just begin infinitely reloading the page and never finish.

At first I thought something was wrong with my routing, but I’ve completely replaced my iron:router code with flowrouter code and I’m still seeing the same issue.

I’m using AccountsPassword to autologin users, but I don’t think that’s the culprit because I’m not seeing any of that code getting run.

My best guess at this point is its something in the meteor core, possibly something to do with the session generation. I know we have a pretty large DB cluster, so write/read delay is decently high (1-2 seconds), could that be interfering with the code trying to establish a connection and a session and causing a refresh error?

I turned on console recording during the refreshing and captured these errors:

Notice how the socket keeps trying and failing to be established. At least, I presume that’s what the different callback values mean.

So, tracking down that TypeError, the offending code appears to be:

// loginServiceConfiguration and ConfigError are maintained for backwards compatibility // 148
Meteor.startup(function () { // 149
var ServiceConfiguration = // 150
Package[‘service-configuration’].ServiceConfiguration; // 151
Accounts.loginServiceConfiguration = ServiceConfiguration.configurations; // 152
Accounts.ConfigError = ServiceConfiguration.ConfigError; // 153

What’s odd is that, even after manually installing the service-configuration package its still throwing that error.

Bump. I need help with this.

Edit: Nevermind, still happening.

Both the Blaze.render & No such function: isReady errors look very suspicious (as in awry project code)

May I suggest trying It provides really helpful stack traces

Yeah, I will hook Kadira up, that is a good idea.

The isReady error appears to only happen some small % of the reloads. As far as I can tell its an error in the bootstrapper failing to preload my Global template helpers in the right order.

Blaze.render is throwing me for a loop. I’m wondering if its because I just migrated from iron:router -> flow and the template setup I have (no master, each router contains the full layout) is causing that problem. I’m considering re-engineering it to map to the proposed design but its a hefty amount of work.

I’m almost getting desperate enough to fix this that I’ve been studying React all day and I’m wondering if its worth the effort to dump Blaze with to solve this. My only problem is that it is, at best, a complete Hail Mary.