iron-meteor / iron-middleware-stack

Client and server middleware support inspired by Connect.
MIT License
8 stars 13 forks source link

Latest Firefox release breaks when lots of routes being used and only on Windows 7 #13

Open javascriptlove opened 6 years ago

javascriptlove commented 6 years ago

With the latest Firefox release (Firefox Quantum) our service stopped working reporting an error of too big call stack. We have a couple hundreds routes, multiplied by 8 languages, resulting in more than 1000 routes. The problem lies in this line calling next() and then it calls next() inside and so on.. https://github.com/iron-meteor/iron-middleware-stack/blob/master/lib/middleware_stack.js#L188

  var next = Meteor.bindEnvironment(function boundNext (err) {

Apparently the call stack is pretty limited on windows 7, and it crashes on client side... I came up with something like this, it works fine at the moment but i'm worried about hidden consequences? #12

dokithonon commented 4 years ago

I have the same problem with firefox on windows. Did your fix is finally a good solution ? Thanks

javascriptlove commented 4 years ago

@dokithonon I had to use a forked version as in the pull request https://github.com/iron-meteor/iron-middleware-stack/pull/12. Looking that this issue is hanging for 3 years, I'm afraid there's no other way....