New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
too much recursion error on Firefox #3028
Comments
Any idea on this issue? |
This is also affecting clients using Firefox 34+ on Ubuntu Linux 14.10. |
I have experienced this issue with FF 34 using the Iron Router package as well. I get the error: // Without {{> yield }} in the base template
Too much recursion ejson.js:394 // With {{> yield }} in the base template
too much recursion. underscore:164 I am using Iron Router with one base template, without and with a {{> yield }} statement. |
For easy reproduction, I have created a minimal example using aldeed:autoform: <body>
{{> quickForm id="quickform" schema="schema"}}
</body> schema = new SimpleSchema({
name: {
type: String
}
}); |
Does someone have a simple repro without external packages? That will make it easier to investigate. |
@avital I was trying to write one but a deeper look at Meteor-Community-Packages/meteor-autoform#333 points to this being not really a Meteor bug but rather a question of Firefox having a smaller recursion limit (at least on Linux). I'd wait and see what they end up with as a fix. |
I just run into this problem. I'm using linux mint I tried http://adamrich.name/recursion.html on different browsers and here are my results:
I thought first that was a bug in Firefox dev edition. I updated to firefox 35 so I have no tests with FF34. I have something like 15 nested templates in my app and when I remove 1 or 2 of them, the bug doesn't show anymore. @avital Repo with no package : https://github.com/darkship/test_much_recursion |
I ran the browser recursion test too:
Thanks for the suggestion :-) |
That is an interesting recursion repo @darkship. How can I track down the recursion in Meteor templates? I would like to help shine some light on this issue, and hopefully improve Meteor's scalability, etc :-) |
After some investigation, it appears that a combination of deeply nested template contexts in the quickform package, together with relatively deep call stacks in the Blaze implementation, are conspiring to trigger the Two opportunities that we've thought about so far:
Given the exploratory nature of these solutions, I'm not sure when we'll be able to provide real results, but we're very glad to know about the problem, and we acknowledge that fixing it will require optimizations in the Blaze implementation. |
Would love a fix too. We have the issue at coyno. |
Same autoform issue here with Firefox 35.0.1 and Meteor 1.0.3.1 on Ubuntu 14.10. Works fine with Chromium. |
An update from the autoform side: I've done some work in Still pretty much guessing. Hopefully I can figure out a clean reproduction. |
Thanks for your work on this issue Eric. :-) How can we coordinate efforts to narrow this down? Edited I thought this was the autoform issue thread. |
Somewhat off-topic, but interestingly relevant is the paper Natural language – no infinity |
I'm getting "Maximum call stack size exceeded" in Chrome when Autovalue is taking another field value, this.siblingField(). I am able to store the field value in a local variable and return a value from the nested array even. The error occurs after I return the value. My form is somewhat complex (arrays of objects in a few fields). Might have to manually create input fields for my use case since this sounds like a complicated fix. I'm still happy all my other simpler forms are working well! |
Seems to be worse with the latest Firefox (36) version on Windows 8 |
I made a nested template example which fails in Firefox in Windows 8 (not tested in 7) |
Hi @benjamn |
@dohomi it's quite stable; this bug is a corner case that doesn't come up in normal circumstances. You might flip it around and ask if Firefox is stable! (After all it is, technically speaking, a Firefox bug.) |
@lalomartins sorry to say but Firefox is one of the major browser at the moment.. Meteor has to adopt its code to Firefox not other way around.. Who can waive all Firefox users on Windows, Linux or older Macs away because you would state its a Firefox bug? Check @mxab simple reproduction package where you see how easy it is to crash your app. In the end as a startup you depend on every single visitor and they won't care who's responsible for the black page they are visiting - they simply never come back. |
@dohomi you're entirely missing the point, so let me spell it out for you. Coming here to disparage the project with “can you really call yourself stable” FUD is unproductive and not acceptable behaviour in an issue tracker. Your users are correct if they don't come back, because as a startup neither meteor or firefox is responsible for the black page your visitors see — you are. You're the only one here trying to shift blame and responsibility. As a startup it's your job to test thoroughly, and honestly, working around browser and/or framework bugs is at least 30% of a web developer's job description. It's especially unpleasant to see you disparaging a project which, I'm sure, already saved you weeks, if not months, of development time, compared to developing whatever you have on any other platform. So really, play nice. This is not the space for this kind of talk. In fact, I don't think anywhere is. And it's not the point how easy it is to crash it. The point is, it doesn't happen under normal usage. Yes, there are big production apps out there. You could easily find out by doing a little research instead of asking here. None of those ran into this bug. I have deployed a few production apps myself and only recently I ran into this. That's the definition of a corner case. It's like saying Windows is not stable because it can bluescreen on occasion. Well d'oh. Software fails. Welcome to real life. |
Hey all. Please consider continuing this discussion on the Meteor forums. At this point it is neither constructive nor salient. On 1 March 2015 14:01:06 EET, Lalo Martins notifications@github.com wrote:
Sent from my Android device with K-9 Mail. Please excuse my brevity. |
@lalomartins I would not specify the error as a bug of firefox since I am not aware of any html/js specification about max callstack / recursion limitations ( but also I haven't googled for it hardcore) I would neither call it a meteor "bug" if you do not take any recursion limitations into account it works as expected, further I think this issue has not surfaced more as there is not official windows development support due to the tree structured nature of my mini cms I cannot avoid deep nesting of templates as soon have you have some more "complex" nesting this problem occurs faster so I think as @benjamn said, blaze/htmljs needs to be tuned. I tried some peeking in blaze / htmljs parts and was printing out the stack size but I haven't found the point where it "explodes". So if someone could point me in the right direction I really would like to find some workarrounds for this issue |
Hi @stbaer and I did some more research on the blaze package, after inserting the "catch" statement to log the errors at
The original example allow the Win8/Firefox 36 to easily nest more then 300 templates @benjamn could this be a possible optimisation or are the undefined access in these cases expected or should be handled differently |
@mxab, sounds promising! I will try to find some time to test those changes against autoform recursion errors. |
Hi @aldeed, like @mxab said, the changes work very well for the https://github.com/mxab/meteor-call-stack-exceed example. But in our project with autoform included firefox shows an 'unresponsive script' popup. @avital or anybody from the meteor team, any thoughts on this? |
To much people have problem with it Meteor-Community-Packages/meteor-autoform#333, can you guys @mdg give us some updates on it plsss ? |
Here's the thing though. When I say it's a Firefox issue, I'm not arguing about blame assignment, because that doesn't help solve the problem. What I'm saying is, it's not clear there's anything autoform or meteor can do to fix it. That doesn't mean it's not worth trying, but ultimately, the best fix just might end up being a pull request to Mozilla (or whatever the Mercurial equivalent is). tl;dr chill |
Fixed on |
wow! |
Awesome! |
Yes, thank you! Now Firefox can once again be a first class citizen of On Thu, Mar 26, 2015, at 03:55 PM, Ben Newman wrote:
Links: |
COOL :) When will the fix get published ? |
@dgreensp, hoping you can sneak this into 1.1 or a patch soon after. |
This way we don't get a stack overflow when materializing nested Views. Certain browser/OS combinations seem to have particularly low budgets (especially Firefox/Windows apparently). Verified by running https://github.com/mxab/meteor-call-stack-exceed on Chrome/Mac. Nesting limit used to be about 160, but now you get unlimited nesting (tried up to 10,000, which renders in about 7-8 seconds). Tested for correctness by running all package tests.
Yup, this is in 1.1-rc.1 |
Seems to have fixed the autoform issues. Thanks! |
Awesome, tnx guys! |
Thanks guys! |
This is definitely much, much better, thanks ! I updated my repo https://github.com/darkship/test_much_recursion. I could go from 1 to 457 (instead of 1 to 12) recursions. Some errors remains when I go back to 1 but it doesn't seem to be bothering. |
This way we don't get a stack overflow when materializing nested Views. Certain browser/OS combinations seem to have particularly low budgets (especially Firefox/Windows apparently). Verified by running https://github.com/mxab/meteor-call-stack-exceed on Chrome/Mac. Nesting limit used to be about 160, but now you get unlimited nesting (tried up to 10,000, which renders in about 7-8 seconds). Tested for correctness by running all package tests.
This way we don't get a stack overflow when materializing nested Views. Certain browser/OS combinations seem to have particularly low budgets (especially Firefox/Windows apparently). Verified by running https://github.com/mxab/meteor-call-stack-exceed on Chrome/Mac. Nesting limit used to be about 160, but now you get unlimited nesting (tried up to 10,000, which renders in about 7-8 seconds). Tested for correctness by running all package tests.
Hello,
I curious if the Meteor team is aware of the too much recursion bug in Firefox:
http://autoform.meteor.com/qfdetails
The error mainly occurs because of the usage of https://docs.meteor.com/#/full/template_parentdata
Template.parentData
. We receive this error on all older Computer/Mac/Linux, the page is not opening at all. On newer Macs the website opens with some minor errors.Thanks, Dominic
The text was updated successfully, but these errors were encountered: